Goal: Flash our AM devices from 1.2.1 to 1.4.0
Issue: The Flash app returns a “Failed to open port” error
Computer Settings: Dell Latitude E5540 laptop running Windows 10 Pro, 64-bit OS and x64 processor.
Detailed Description of the Problem:
I wanted to flash our AudioMoth (AM) devices (10 in total) to upgrade the firmware from 1.2.1. to 1.4.0. First, I connected one of our AMs to the computer via USB cord (2.0) to check if the USB was working / the configuration app recognized the AM. The configuration app did see the AM and gave me the warning that I should update to the most recent firmware. Further, the flash app recognized the device and that it was in using the 1.2.1 firmware.
I then clicked on, and followed, the instructions to manually switch to Flash Mode.
Disconnected the AM from the USB
Set the switch to CUSTOM and removed batteries
Connected AM to computer via USB
Both LEDs were flashing
Used a metal paperclip to connect the two contacts marked “PROG”until the LEDs stopped flashing (sidenote: my computer makes a USB connect/disconnect sound at this point)
App displays the the verify connection message: “Current status: found audiomoth in flash mode with a serial bootloader”
Next, I followed the instructions and set the switch to USB/OFF and tried to flash the AM. Note that at this point the Flash AudioMoth button is that brighter green and selectable.
At this point the Flash progress bar very briefly appears and then I get the following error: "Failed to open port. Could not connect to AudioMoth. Reconnect device and flash again."
I disconnected and reconnected the AM to the computer via USB in order to try again. However, on reconnecting the USB it appears the Flash app no longer recognizes / can find the AM. I did not hear a USB connection noise. I tried restarting my computer and repeating all of the above with the next AM and nothing changed.
I also tried the old way of flashing an AM from the command line. Following the same steps as listed in the offline manual under "Flashing the firmware" I got the flash.exe from your github and put it in the same folder as the 1.4.0.bin. I was able to check ports using flash.exe but trying to flash to a selected port fails and returns the "Incorrect arguments" error.
Appreciate any guidance given. Thank you!
Could you email me at peter@openacousticdevices.info and I'll send you an installer for a slightly tweaked version of the flash app I'm working on. I've added the ability to quickly find the log file wherever it is your app is putting it.
Peter
Hi, just following up about the flash app. We have a log file which could shed a bit more light on the issue. On Windows it can be found at: %USERPROFILE%\AppData\Roaming\AudioMoth-Flash\logs\audiomoth_flash.log
It's likely to be quite a long file, so pastebin might be required to share the contents.
Peter
This was also the clearest problem description we've seen!
Great. Glad it's working now. I'll get Peter to follow up about the Flash App as that should be working fine - it's what we use everyday to flash devices.
Hi Alex,
Thanks very much for your help. Running the command line instruction with the proper notation you provided (flash -u COM4 1.4.0.bin) worked.
With regards to the Flash App, following the "LED are not flashing" steps give me the same error as before. I'm able to go through each step until I press "Flash Audiomoth" and the port error appears. As I've had success flashing the devices via command line, I'd consider my issue solved. Appreciate it!
It looks like your AudioMoth may have started flashing and corrupted the application firmware. You can get it to start in serial bootloader mode by following the instructions under 'Show Manual Switch Instructions' and saying the LED are not flashing at the first step. This basically involves holding the paperclip on the terminals whilst the AudioMoth is powered up via the USB cable.
You can also check the serial number to check the communication: flash -i COM4
Sorry you are having problems with the Flash App. The command line instruction will work if you do: flash -u COM4 1.4.0.bin Is COM4 the port that appeared when you connected the AudioMoth using the paper clip to put it into bootloader mode?