@@ -104,9 +104,20 @@ Network.ino
104104// ----------------------------------------
105105
106106static const char *networkConsumerTable[] = {
107- " HTTP_CLIENT" , " NTP_SERVER" , " NTRIP_CLIENT" , " NTRIP_SERVER_0" , " NTRIP_SERVER_1" ,
108- " NTRIP_SERVER_2" , " NTRIP_SERVER_3" , " OTA_CLIENT" , " POINTPERFECT_KEY_UPDATE" , " POINTPERFECT_MQTT_CLIENT" ,
109- " TCP_CLIENT" , " TCP_SERVER" , " UDP_SERVER" , " WEB_CONFIG" ,
107+ " HTTP_CLIENT" ,
108+ " NTP_SERVER" ,
109+ " NTRIP_CLIENT" ,
110+ " NTRIP_SERVER_0" ,
111+ " NTRIP_SERVER_1" ,
112+ " NTRIP_SERVER_2" ,
113+ " NTRIP_SERVER_3" ,
114+ " OTA_CLIENT" ,
115+ " POINTPERFECT_KEY_UPDATE" ,
116+ " POINTPERFECT_MQTT_CLIENT" ,
117+ " TCP_CLIENT" ,
118+ " TCP_SERVER" ,
119+ " UDP_SERVER" ,
120+ " WEB_CONFIG" ,
110121};
111122
112123static const int networkConsumerTableEntries = sizeof (networkConsumerTable) / sizeof (networkConsumerTable[0 ]);
@@ -203,7 +214,8 @@ void menuTcpUdp()
203214 if (settings.enableTcpServer )
204215 {
205216 systemPrintf (" 8) Enable NTRIP Caster: %s\r\n " , settings.enableNtripCaster ? " Enabled" : " Disabled" );
206- systemPrintf (" 9) Enable base Caster override: %s\r\n " , settings.baseCasterOverride ? " Enabled" : " Disabled" );
217+ systemPrintf (" 9) Enable base Caster override: %s\r\n " ,
218+ settings.baseCasterOverride ? " Enabled" : " Disabled" );
207219 }
208220
209221 // ------------------------------
@@ -898,6 +910,9 @@ void networkEvent(arduino_event_id_t event, arduino_event_info_t info)
898910{
899911 int index;
900912
913+ if (settings.debugNetworkLayer )
914+ systemPrintf (" event: %d (%s)\r\n " , event, Network.eventName (event));
915+
901916 // Get the index into the networkInterfaceTable for the default interface
902917 index = networkPriority;
903918 if (index < NETWORK_OFFLINE)
@@ -944,6 +959,13 @@ void networkEvent(arduino_event_id_t event, arduino_event_info_t info)
944959 case ARDUINO_EVENT_WIFI_STA_GOT_IP:
945960 case ARDUINO_EVENT_WIFI_STA_GOT_IP6:
946961 case ARDUINO_EVENT_WIFI_STA_LOST_IP:
962+ case ARDUINO_EVENT_WIFI_AP_START:
963+ case ARDUINO_EVENT_WIFI_AP_STOP:
964+ case ARDUINO_EVENT_WIFI_AP_STACONNECTED:
965+ case ARDUINO_EVENT_WIFI_AP_STADISCONNECTED:
966+ case ARDUINO_EVENT_WIFI_AP_STAIPASSIGNED:
967+ case ARDUINO_EVENT_WIFI_AP_PROBEREQRECVED:
968+ case ARDUINO_EVENT_WIFI_AP_GOT_IP6:
947969 wifi.eventHandler (event, info);
948970 break ;
949971#endif // COMPILE_WIFI
@@ -2510,9 +2532,21 @@ void networkUseDefaultInterface()
25102532 isDefault = networkInterfaceTable[index].netif ->isDefault ();
25112533 if (!isDefault)
25122534 networkInterfaceTable[index].netif ->setDefault ();
2535+
2536+ if (settings.debugNetworkLayer )
2537+ networkPrintDefaultInterface ();
25132538 }
25142539}
25152540
2541+ // ----------------------------------------
2542+ // Print the default network interface specs
2543+ // ----------------------------------------
2544+ void networkPrintDefaultInterface ()
2545+ {
2546+ NetworkInterface *irfc = Network.getDefaultInterface ();
2547+ systemPrintln (irfc->printTo (Serial));
2548+ }
2549+
25162550// ----------------------------------------
25172551// Add a network user
25182552// ----------------------------------------
0 commit comments