Hi!
I'm trying to update the firmware (Basic 1.11.0 downloaded from Flash App 1.7.0) of an AudioMoth (1.2.0) from a computer running Linux (Debian 12). My user has the necessary permissions to access the connection port, but it seems that the connection to the bootloader is failing ("Error: Unable to establish communication with bootloader. Reconnect AudioMoth and try again"). One strange thing is that the Flash App does not detect any firmware on the device; instead, it only shows "Found an AudioMoth in serial flash mode". For the other devices, the firmware update works in both HID and serial modes. Is it possible that a wrong operation done during a previous update (overwrited bootloader or unplugged device during update) caused the problem? And if yes, is there a way to fix the bootloader?
Below are the logs from the firmware update attempt. Thanks in advance for your help!
Lucas
[2025-04-02 08:59:11.482] [info] Attempting to apply firmware: AudioMoth-Firmware-Basic
[2025-04-02 08:59:11.485] [info] --- Starting communication ---
[2025-04-02 08:59:11.486] [error] USB HID flashing not supported by current AudioMoth. Switching to serial
[2025-04-02 08:59:11.486] [info] Flashing using serial flash...
[2025-04-02 08:59:12.642] [info] Writing data to port: 'i'
[2025-04-02 08:59:12.643] [info] Write complete
[2025-04-02 08:59:14.143] [error] Timed out waiting for response
[2025-04-02 08:59:14.144] [info] Reattempting to check bootloader version. Attempt 1
[2025-04-02 08:59:14.645] [info] Writing data to port: 'i'
[2025-04-02 08:59:14.647] [info] Write complete
[2025-04-02 08:59:16.147] [error] Timed out waiting for response
[2025-04-02 08:59:16.147] [info] Reattempting to check bootloader version. Attempt 2
[2025-04-02 08:59:17.148] [info] Writing data to port: 'i'
[2025-04-02 08:59:17.149] [info] Write complete
[2025-04-02 08:59:18.649] [error] Timed out waiting for response
[2025-04-02 08:59:18.649] [info] Reattempting to check bootloader version. Attempt 3
[2025-04-02 08:59:20.650] [info] Writing data to port: 'i'
[2025-04-02 08:59:20.651] [info] Write complete
[2025-04-02 08:59:22.151] [error] Timed out waiting for response
[2025-04-02 08:59:22.151] [info] Reattempting to check bootloader version. Attempt 4
[2025-04-02 08:59:26.152] [info] Writing data to port: 'i'
[2025-04-02 08:59:26.153] [info] Write complete
[2025-04-02 08:59:27.653] [error] Timed out waiting for response
[2025-04-02 08:59:27.654] [info] Reattempting to check bootloader version. Attempt 5
[2025-04-02 08:59:35.654] [info] Writing data to port: 'i'
[2025-04-02 08:59:35.656] [info] Write complete
[2025-04-02 08:59:37.156] [error] Timed out waiting for response
[2025-04-02 08:59:37.156] [info] --- Gave up trying to check bootloader after 5 failed attempts. ---
Hi Lucas, The AudioMoth has two bootloaders. One built into the firmware that uses USB HID to communicate with the Flash App and one that is installed on the chip by Silicon Labs. The latter one is never overwritten and uses USB serial to communicate with the Flash App. The USB HID one is used whenever available, but the Flash App can also talk to the original serial one (which is also used by the AudioMoth USB Microphone hardware which lacks the external SRAM chip necessary to store the uploaded firmware from the USB HID packets). The USB serial one is always on the chip and allows the device to be recovered if something goes wrong during the flashing of the firmware. In your case, it looks like the Flash App cannot communicate with the USB serial bootloader. It can see that there is a USB serial device present, but it doesn't respond to its requests. On Linux this is most likely due to the permissions at the bottom of the page here: https://www.openacousticdevices.info/applications.
Make sure that you have the SUBSYSTEM=="tty" line in the rules.d file, and you may have to add your user to the dialout group. Then restart and plug the AudioMoth back in to get it all working. We wrote the USB HID bootloader to avoid all this hassle! You can force the AudioMoth back into serial bootloader mode using the 'Show Manual Switch Instruction' in the Flash App. This involves connecting the PROG pins together whilst power is applied via the USB port. This will force any AudioMoth with a corrupted firmware back into the factory-installed USB serial bootloader.
Alex