 {
     Serial.begin(115200L);
 
+#if defined(USE_WIFI)
     printf("\nConnecting to: %s\n", ssid);
     WiFi.begin(ssid, password);
     uint8_t attempts = 30;

            openmrn.add_gridconnect_port(new Esp32WiFiClientAdapter(client));
        }
    }

    // Call the OpenMRN executor, this needs to be done as often
    // as possible from the loop() method.
    openmrn.loop();
}

    // have performance impact.
    // openmrn.stack()->print_all_packets();

#if defined(USE_CAN)
    // When using the hardware can device it is recommended to also utilize the
    // background task on the ESP32 rather than call openmrn.loop() from the
    // loop method.
    openmrn.start_background_task();

    // Add the hardware CAN device as a bridge
    openmrn.add_can_port(
        new Esp32HardwareCan("esp32can", CAN_RX_PIN, CAN_TX_PIN));
#endif // USE_CAN

#if defined(USE_WIFI)
    // Broadcast this node's hostname with the mDNS service name
    // for a TCP GridConnect endpoint.
    MDNS.addService(openlcb::TcpDefs::MDNS_SERVICE_NAME_GRIDCONNECT_CAN,
        openlcb::TcpDefs::MDNS_PROTOCOL_TCP, OPENMRN_TCP_PORT);
#endif // USE_WIFI
}

void loop()
{
#if defined(USE_WIFI)
    // if the TCP/IP listener has a new client accept it and add it
    // as a new GridConnect port.
    if (openMRNServer.hasClient())
