I want send AT commands to USB modem connected to raspberry pi. I have found some helps mentioning that USB modem is usually connected as ttyACM or ttyUSB device, but I have no ttyACM or ttyUSB device. I have devices from tty1 to tty63, but I do not know how to identify which one is used by the modem.
I have tried to find the device by storing devices list with the modem unconnected and then compare device list after the modem is pluged in:
ls /dev/ > dev_list_1.txt
(plug the modem in)
ls /dev/ | diff --suppress-common-lines -y - dev_list_.txt
returns to me:
bsg <
sda <
sg0
I have tried to connect the modem with cu tool:
sudo cu -l sda
sudo cu -l sg0
but both returns:
cu: open (/dev/sg0): Permission denied
cu: sg0: Line in use
So I tried also use minicom and configure serial communication to /dev/sg0 or /dev/sda but it does not work either.
So I think I need to find right tty device used by the modem to be able to communicate with it. But how to find it?
lsusb -vvv
will show you much information relating to USB devices connected to the machine you are running. Additionally, you mayphysical USB device hierarchy as a tree. Verbosity can be increased twice with v option...
as the manual page says. – brwsudo raspi-config
and enabled the interface? – brwls -l /dev/serial/by-id
? – Mark Setchell