emonHub ttyUSB0 USB serial adapter

Great! Sorry for the false starts, late night, tired and fiddly mobile are not a good combination.

For future readers, the command is basically a search for serial or USB devices with commonly used address prefixes eg “ttyAMA” “ttyACM” “ttyUSB” “ttyS” and “serial”.

ls -la /dev/{tty{ACM,AMA,S,USB},serial}*

would have returned something like (in this instance)

pi@emonpi(rw):~$ ls -la /dev/{tty{AMA,S,USB},serial}*
ls: cannot access /dev/ttyUSB*: No such file or directory
ls: cannot access /dev/serial*: No such file or directory
crw-rw---- 1 root dialout 204, 64 Jan 31 23:30 /dev/ttyACM0
crw-rw---- 1 root dialout 204, 64 Jan 31 23:30 /dev/ttyAMA0
crw-rw---- 1 root dialout   4, 64 Jan 31 23:24 /dev/ttyS0

with the STM32 attached and then

pi@emonpi(rw):~$ ls -la /dev/{tty{AMA,S,USB},serial}*
ls: cannot access /dev/ttyACM*: No such file or directory
ls: cannot access /dev/ttyUSB*: No such file or directory
ls: cannot access /dev/serial*: No such file or directory
crw-rw---- 1 root dialout 204, 64 Jan 31 23:30 /dev/ttyAMA0
crw-rw---- 1 root dialout   4, 64 Jan 31 23:24 /dev/ttyS0

with it disconnected

in the first “connected” result the line

crw-rw---- 1 root dialout 204, 64 Jan 31 23:30 /dev/ttyACM0

tells us there is a device using the /dev/ttyACM0 address and then in the second “disconnected” result that line no longer exists, but there is a new line showing no devices were found with an address prefix ttyACM

ls: cannot access /dev/ttyACM*: No such file or directory

In this example '/dev/ttyS0andttyAMA0` are the Pi3’s 2 inbuilt UART serial ports, used by the bluetooth and GPIO.