   }
 }
 
+bool openFdr()
+{
+  // Open a connection to the floathub server (usually fdr.floathub.net)
+
+
+  #ifdef WIFI_DEBUG_ON
+  debug_info(F("Opening fdr socket"));
+  #endif
+  if(fdr_client.connect(float_hub_server.c_str(), float_hub_server_port))
+  {
+    fdr_client.setNoDelay(true);
+    #ifdef WIFI_DEBUG_ON
+    debug_info(F("Success "));
+    #endif
+    return true;
+  }
+  else
+  {
+    #ifdef WIFI_DEBUG_ON
+    debug_info(F("Failure "));
+    #endif
+  }
+
+  return false;
+}
+
+
+bool push_latest_message_out_socket()
+{
+
+  if(fdr_client.connected())
+  {
+    if(fdr_client.write(latest_message_to_send.c_str(), latest_message_to_send.length()) == latest_message_to_send.length())
+    {
+      if(fdr_client.write("\r\n", 2) == 2)
+      {
+        return true;
+      }
+
+    }
+    #ifdef WIFI_DEBUG_ON
+    debug_info("Socket write failed");
+    #endif
+    return false;
+  }
+  #ifdef WIFI_DEBUG_ON
+  else
+  {
+    debug_info(F("socket write called, but not connected"));
+  }
+  #endif
+
+  return false;
+}
+
+
 void houseKeeping()
 {
   #ifdef STAT_DEBUG_ON
   IPAddress local = WiFi.localIP();
-  debug_info(String(F("WiFi.status()=")) + WiFi.status() + String(F(", IP address: ")) + local.toString()); 
+  debug_info(String(F("WiFi.status()=")) + WiFi.status() + String(F(", IP address: ")) + local.toString() + String(F(", latest_message=")) + latest_message_to_send) ; 
   #endif
 
   long now = millis();

    }
    nmea_client[i].stop();
    nmea_client[i] = nmea_server->available();
    Serial.print("Added nmea client at position ");
    Serial.println(i);
  }

  //

   
  unsigned long current_timestamp = millis();
 

  if(current_timestamp - fdr_communications_previous_timestamp >  fdr_communications_interval)
  {
    fdr_communications_previous_timestamp = current_timestamp;
    fdrHouseKeeping();

  }
  if(current_timestamp - console_previous_timestamp > console_read_interval)
  {
    console_previous_timestamp = current_timestamp;
