Skip to main content

Troubleshooting Husarnet on ESP32

In this document we describe problems Husarnet users stumbled into in the past. You might find the solution to your problem here, and also it is good resource to gain deeper understanding of the Husarnet system. If you do not see a solution you want, please let us know. Describe your problem and post it on Husarnet Community Forums or contact us at support@husarnet.com if you want to send any sensitive information.

What information to provide while posting problem report?

  • description of the problem and your test setup
  • Husarnet and ESP-IDF log, please make sure that you enable verbose Husarnet logs (HUSARNET_LOG_LEVEL_DEBUG option in menuconfig)
  • providing a minimal reproducible example is always helpful and speeds up the debugging process

It usually is a good idea to have a look at app.husarnet.com - both in the group/network config and element/device tabs. Some of the configuration issues are automatically highlighted there.

Reseting IPv6 address

Husarnet IPv6 address of each ESP32 is stored in the flash (NVS) under the husarnet prefix. If you want to generate a new IPv6 address for you ESP32 run: idf.py erase-flash inside the project folder to clear entire flash memory or use idf.py erase-region nvs to clear only the NVS partition.

Remember to flash the firmware again after erasing the flash!

Multiple devices with the same name

When using Husarnet, make sure that each device has a unique hostname. If two devices have the same hostname, the network may not work correctly and strange behavior may occur (e.g. one device is visible but not accessible from the other).

Collisions are likely to occur on ESP32 as the hostname is usually hardcoded in the firmware. After generating a new identity (e.g. by erasing the flash), remember to either change new hostname to a unique one or remove old device from the dashboard.

Watchdog warnings in logs

In the current implementation device identity generation is a resource-intensive operation. Usually it takes a few seconds to generate a new identity. When system is under load, watchdog may issue a warning. This is considered a normal behavior and should not be a cause for concern.

High latency (ping)

If you experience high latency when pinging other devices in the Husarnet network, it might be caused by the Wi-Fi power saving mode. To disable it, add the following code snippet to your project:

#include "esp_wifi.h"

...

void app_main() {
...
// In order to reduce ping, power saving mode is disabled
esp_wifi_set_ps(WIFI_PS_NONE);
...
}

Remember that disabling power saving mode will increase power consumption.