Undefined reference to `ping_start' - lwip/app/ping

Hey all !

  1. My goal is: I am trying to periodically check my MQTT connection and restart my device if the connection has been lost and not recovered. We have successfully done this but are attempting to upgrade our mos version from 2.15.0 to 2.20.0.

  2. My actions are: Build the firmware with the following command and mos versions

mos build --local --platform esp8266 --verbose --clean
libs_version: 2.20.0
modules_version: 2.20.0
mongoose_os_version: 2.20.0
  1. The result I see is: The following error is thrown
/opt/Espressif/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/9.2.0/../../../../xtensa-lx106-elf/bin/ld: /.../build/objs/mgos_watchdog.c.o: in function `mgos_watchdog_init_net_timer':
/.../libs/connection_watchdog/src/mgos_watchdog.c:162: undefined reference to `ping_start'

Specific information is given by the following issue

  1. Any ideas on how we would go about fixing this would be amazing :slight_smile:

Looks like your community created watchdog timer assumes some lwIP function is present and exposed.
That might not be the case with current version of mOS, as the linker is failing to find it.
You should ask the maintainers of that library what it needs to be built using current releases. AFAIK, if this is still the case, lwIP in the ESP8266 platform is an Espressif modifed version coming as part of their SDK. mOS is built using a specific version of the SDK. If I correctly followed the release notes: lwip: Check in LWIP sources from ESP8266_NONOS_SDK 3.0.4 mongoose-os-libs/lwip@bb087f2)

Regarding your first paragraph, MQTT connections and pings have low correlation, with ping you can only check routing and only if the net admins involved allow you to do so. I may elaborate if you wish.