Hi, I'm trying to update the firmware and have downloaded the relevant flash app and firmware file. When I run the flash command, however, no serial ports are found. I can't work out what the problem is, could anyone help? I'm using a Linux machine (Ubuntu 18.10)
$ chmod a+x flash
$ ./flash
No serial ports found
Thanks!
Hi folks,
In my case, I could see the port, but not communicate with it, even after adding the custom rule. So I did some further digging.
1. On an Ubuntu 18.04 it appears the rules file should be placed in the
'/etc/udev/rules.d/99-audiomoth.rules' file path. The difference here being that on the Ubuntu 18.04 operating system, the path '/lib/udev/rules.d/' is reserved typically for system installed rules. It means that if you update you operating system, this rule may be removed.
2. After adding the rule above (in the correct location), the command 'sudo service udev restart' is required for the rules to be reloaded.
3. Then you need to remove the device and plug it in again, for the rules to apply.
At this point you can try to flash the device again.
4. If this still fails, check out your account privileges, by finding out what permissions the port requires, by running 'ls -la /dev/ttyACM0' or which ever port your device appears with. This command lists the files which match the '/dev/ttyACM0' and shows the file attributes
ian@xxxx:~/Documents/AudioMoth/Flash$ ls -la /dev/ttyACM0 crw-rw---- 1 root dialout 166, 0 Jan 8 16:37 /dev/ttyACM0
then, by running the command 'groups'
I get a result along the following lines, (on a relatively clean Ubuntu system)
ian@xxxx:~$ groups ian adm tty dialout cdrom sudo dip plugdev lpadmin sambashare
Now, I found that I wasn't a member of the dialout group originally, and had to add myself to that group to get the permissions. This typically would not be required, if the rule was behaving itself.
sudo usermod -a -G dialout $USER
After adding yourself to the group, logout and then log back in. If upon logging back in you're not seeing dialout appear in the 'groups', then reboot the machine.
5. Finally, I have found running 'flash -i /dev/ttyACM0' 3 times, to be a very consistent way to ensure I establish communication and get the serial number, before I try to 'flash -u /dev/ttyACM0 AudioMoth-1.2.2.bin' the device. It's almost like 3 times, is just the magic number that makes it work for me. 2 times, is not enough.
As a result, my flash script looks like:
flash -i /dev/ttyACM0 && flash -i /dev/ttyACM0 && flash -i /dev/ttyACM0 flash -u /dev/ttyACM0 Audiomoth-1.2.2.bin
Hi Ella,
Could you try following the steps given in the "Additional Linux installation notes" at the bottom of the config app installation page:
https://www.openacousticdevices.info/config
Then let me know if anything changes.
Peter
Hi Andy,
Thanks for getting back to me so quickly.
I was actually only on Step 3 when I was getting that message as I was expecting the ports to be displayed then. Once the AudioMoth is plugged in and in programming mode I get this error:
$ ./flash -u /dev/ttyACM0 AudioMoth1.2.1.bin
ERROR: Could not open port
Hi Ella,
Have you put the device into programming mode Correctly? To confirm this, switch the switch to CUSTOM, after the prog pins have been shorted using the paper clip routine, the LEDs should stop flashing. This indicates programming mode.
Andy