Guys
Thanks for the new Firmware and Apps, very much appreciated.
I'm trying to flash the latest firmware 1.3.0 onto my collection of AudioMoths using the new 1.0.1 flash app. This works fine under win10 but under Linux Mint, I get an error saying unable to open port:-(
The flash app runs and downloads the firmware, but when I click the Flash AudioMoth I get the following:
The configuration app works under Linux, so I feel this is an issue with the flash app.
If it helps here are various bits of config and debug information:
====================
cat /lib/udev/rules.d/99-audiomoth.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="0002", MODE="0666"
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="0003", MODE="0666"
ls -alt /lib/udev/rules.d/99-audiomoth.rules
-rw-r--r-- 1 root root 162 Mar 16 08:01 /lib/udev/rules.d/99-audiomoth.rules
=====================
dmesg when AudioMoth first plugged in:
[79972.344380] usb 2-1.1: new full-speed USB device number 9 using ehci-pci
[79972.455000] usb 2-1.1: New USB device found, idVendor=10c4, idProduct=0002, bcdDevice= 0.00
[79972.455002] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[79972.455003] usb 2-1.1: Product: AudioMoth
[79972.455004] usb 2-1.1: Manufacturer: openacousticdevices.info
[79972.455005] usb 2-1.1: SerialNumber: 0100
[79972.456371] hid-generic 0003:10C4:0002.0007: hiddev1,hidraw3: USB HID v1.11 Device [openacousticdevices.info AudioMoth] on usb-0000:00:1d.0-1.1/input0
dmesg when switched from USB/OFF to CUSTOM
[80040.217515] usb 2-1.1: USB disconnect, device number 9
dmesg after paper clip used to set to bootloader mode
[80102.392227] usb 2-1.1: new full-speed USB device number 10 using ehci-pci
[80102.503464] usb 2-1.1: New USB device found, idVendor=2544, idProduct=0003, bcdDevice= 0.00
[80102.503469] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[80102.503471] usb 2-1.1: Product: EFM32 USB CDC serial port device
[80102.503474] usb 2-1.1: Manufacturer: Energy Micro AS
[80102.504477] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device
====================
extract from /var/log/syslog
Mar 26 12:08:28 TP-X230 mtp-probe: checking bus 2, device 10: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1"
Mar 26 12:08:28 TP-X230 mtp-probe: bus: 2, device: 10 was not an MTP device
Mar 26 12:08:28 TP-X230 upowerd[1202]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.1
Mar 26 12:08:28 TP-X230 upowerd[1202]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0
Mar 26 12:08:28 TP-X230 upowerd[1202]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1
====================
If there's any other logs that you need to see please let me know.
It's not urgent to fix this as I can use Win10 to finish the updates.
It's likely that I'm doing something stupid which is causing this but I would like to know if it's a problem with me, my machine or if a more general fix is required.
Many thanks
EAP
Ok, I applied you advice and it is ok, now. Thank you!
Peter,
Many thanks that fixed it.
Before applying the chmod you suggeste, I checked the permissions on the port, which I should have done earlier. Anyway ls reported the following
linux$ ls -alt /dev/ttyACM0
crw-rw-rw- 1 root dialout 166, 0 Apr 10 11:44 /dev/ttyACM0
So it appears the port is owned by root and only accessible to members of group "dialout".
A bit of digging with Google shows that this is a long term issue/feature with Ubuntu and derivative distributions e.g. Mint.
The recommended solution is to add the user to the "dialout" group with the following command:
sudo usermod -a -G dialout MY_USER_NAME
This fix will survive reboots of the computer and multiple plug/unplug of the AudioMoth.
Many thanks for your help.
EAP
Hi, I had the same problem. I am also using Linux Mint. Please guys share the solution here.
Hi Peter,
I had been wondering where the log files were hiding, now I know!
The file itself is not too long but basically contains the following repeated for each attempt I made to flash the AudioMoth
[2020-03-30 17:02:13.536] [error] {
constructor: 'Error',
stack: 'Error: Error: Permission denied, cannot open /dev/ttyACM0'
}
I checked the permissions on /dev/ttyACM0, and got the following:
ls -alt /dev/tty*
crw-rw---- 1 root dialout 166, 0 Mar 30 16:56 /dev/ttyACM0
I also tried to run the flash app under sudo, but received the following error message:
Running as root without --no-sandbox is not supported.
Finally: I tried running from a terminal rather than from Nemo file manager as I usually do, the result was the same but following is the output at the terminal:
~/linux$ ./AudioMothFlashAppSetup1.0.1.AppImage
Bar created.
Incrementing progress as connection process is complete.
Setting progress bar maximum: 925
Setting version info: 1.3.0
Aborting progress.
Flash bar aborted
Gtk-Message: 17:02:13.573: GtkDialog mapped without a transient parent. This is discouraged.
Clearly this is something in my configuration but I'm at a bit of a loss as to how to proceed. Hopefully there is something in the above that may give you an idea what needs to change.
Many thanks for your help.
EAP
Hi Ewan,
One log which might be useful is the log generated by our app itself. It should be found here on Linux: ~/.config/AudioMoth-Flash/logs
If it's overly long, feel free to email it to me at peter@openacousticdevices.info
Peter