ESP32 IDF - Vscode husarnet library problem

I want to use the husarnet library in one of my projects with the ESP32S3. I’m using VSCode with version 5.5.4 of ESP-IDF.

I added the library to my project as a managed component downloaded from the Espressif component registry; in the project’s YML file, it appears as `husarnet/esp_husarnet: ^0.0.15`

My code is very simple

husarnet_client = husarnet_init();

if (husarnet_client != NULL) 
{
 //husarnet_set_dashboard_fqdn(husarnet_client, "app.husarnet.com");  
 husarnet_join(husarnet_client, [HUSARNET_HOSTNAME], [USARNET_JOIN_CODE]); }

The result is as follows

I (11487) uB-SNTP: Start SNTP polling
I (11487) uB-SNTP: srv-pool.ntp.org poll 60 tz CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00
I (11487) uB-SNTP: CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00
I (11997) uB-SNTP: The current date/time is: 06/18/26 - 21:14:31
I (14587) husarnet: Running Husarnet,esp32,,2.0.304
I (14937) husarnet: Husarnet TUN interface initialized
I (14937) husarnet: ngsocket fc94:2692:f36f:444f:5bc1:3f2a:0d95:dbd2 listening on 5582
I (14947) husarnet: establishing connection to base 188.165.23.196:443 (try 1)
I (15037) husarnet: TCP connection to base server established, server address: 188.165.23.196:443
I (15457) husarnet: reestablish connection to [fc94:b01d:1803:8dd8:b293:5c7d:7639:932a]
I (15467) husarnet: send multicast to 1 destinations
I (15617) husarnet: hello 2 from fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
I (15717) husarnet: established secure connection to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
I (15787) husarnet: hello 1 from fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
I (18437) husarnet: send multicast to 1 destinations
I (19057) husarnet: UDP connection to base server established, server address: 188.165.23.196:443
I (19947) husarnet: Sending join request to websetup
E (19947) husarnet: websetup UDP send failed Host is unreachable
I (22437) husarnet: reestablish connection to [fc94:b01d:1803:8dd8:b293:5c7d:7639:932a]
I (22437) husarnet: send multicast to 1 destinations
I (24957) husarnet: Sending join request to websetup
E (24957) husarnet: websetup UDP send failed Host is unreachable
I (26427) husarnet: reestablish connection to [fc94:b01d:1803:8dd8:b293:5c7d:7639:932a]
I (26427) husarnet: send multicast to 1 destinations
I (29967) husarnet: Sending join request to websetup
E (29967) husarnet: websetup UDP send failed Host is unreachable
I (34977) husarnet: Sending join request to websetup
E (34977) husarnet: websetup UDP send failed Host is unreachable
I (39987) husarnet: Sending join request to websetup
E (39987) husarnet: websetup UDP send failed Host is unreachable
I (40467) husarnet: reestablish connection to [fc94:b01d:1803:8dd8:b293:5c7d:7639:932a]
I (44997) husarnet: Sending join request to websetup
E (44997) husarnet: websetup UDP send failed Host is unreachable
I (50007) husarnet: Sending join request to websetup
E (50007) husarnet: websetup UDP send failed Host is unreachable
I (55017) husarnet: Sending join request to websetup
E (55017) husarnet: websetup UDP send failed Host is unreachable
I (60027) husarnet: Sending join request to websetup
E (60027) husarnet: websetup UDP send failed Host is unreachable
I (65037) husarnet: Sending join request to websetup
E (65037) husarnet: websetup UDP send failed Host is unreachable
I (65947) husarnet: reestablish connection to [fc94:b01d:1803:8dd8:b293:5c7d:7639:932a]
E (70047) husarnet: Sending join request to websetup
E (70047) husarnet: websetup UDP send failed Host is unreachable
I (72017) uB-SNTP: The current date/time is: 06/18/26 - 21:15:31
I (75047) husarnet: Sending join request to websetup
E (75047) husarnet: websetup UDP send failed Host is unreachable
I (80057) husarnet: Sending join request to websetup

I don’t understand why it keeps looking for ‘websetup’. If I run a webserver on port 80 of my ESP32S3, I can see a request coming in every time husarnet is activated. It then gets stuck periodically in the loop of requests that appear in the log. As I’m working in C, this is the include file I’m using as an interface between my C and C++ code

HusarnetClient* husarnet_init();
void husarnet_join(
    HusarnetClient* client,
    const char* hostname,
    const char* joinCode);
void husarnet_set_dashboard_fqdn(HusarnetClient* client, const char* fqdn);
uint8_t husarnet_is_joined(HusarnetClient* client);
uint8_t husarnet_get_ip_address(HusarnetClient* client, char* ip, size_t size);

If I add the function husarnet_set_dashboard_fqdn removing the comment, at start-up, I get a ‘guru meditation’ error, resulting in a reset and restart

Can anyone help me figure out where to start to sort this out?

Many thanks to everyone.

Last info: I am in CGNAT network with IPV4 only but I have the same result using a telephone hotspot. I can’t see the ESP32 device in my husarnet dashboard but I see the win10PC connected to same router and network of ESP32

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.