Closed agmangas closed 5 years ago
After investigating a bit more into this, it seems the problem was related to collisions between ModemManager and the Hologram SDK.
The Hologram SDK could not access the modem with ModemManager operating in the background. Ignoring the Nova modem from ModemManager fixed this issue:
$ cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
...
[keyfile]
unmanaged-devices=interface-name:ttyACM*
We also added a new udev rule to ignore the device for good measure, although it doesn't seem to be strictly necessary:
$ cat /etc/udev/rules.d/99-ttyacms.rules
ATTRS{idVendor}=="1546" ATTRS{idProduct}=="1102", ENV{ID_MM_DEVICE_IGNORE}="1"
Knowing this, it seems this PR is more of a hack or workaround, so I'm closing it.
Connecting a Nova modem on an Ubuntu Server 18.04 results in multiple ACM devices being created:
When the Hologram SDK checks every port in search of the modem some of those devices will raise a
SerialException
complaining about concurrent access:This uncaught exception breaks the search loop when it could keep going to try to find another port. The PR catches those exceptions, logs them and lets the search loop continue.
In this example (where the PR has already been applied)
ttyACM1
raises aSerialException
butttyACM2
ends up being the working port, and the command succeeds: