1
votes

I know that the USB 3G modems connects to computer by not one serial ports, one of it for diagnostics and for send AT commands and receive answers.

I looking for library for C/++ under linux which universal supports many USB 3G modems and give me possibilities to send AT-commands to modem while it connected via pppd.

If this library not exists I looking for standards which describes rules of creation and using this serial ports.

1
Where do you know from that an USB 3G modem connects to a host by not one serial port, but two... one for diagnostics and the other to send AT commands? Can you argue your statement?garzanti
I connect a lot of different USB 3G modems for tests and all of it connects 3-5 separate ports.Vendi Spancer
So, you cannot make an absolute statement, it depends from manufacturer to manufacturer. It depends how they implemented their drivers, they may use one port or more than one port.garzanti

1 Answers

0
votes

The special characters device files in /dev (e.g. /dev/ttyUSB0) are created at run-time these days. You can set up an udev rule that would match the modem's ID to make some sort of reliably persistent symbolic link. If you make sure you won't interfere with pppd in a wrong manner, you should be able to just write the special file belonging to the device using standard open() / write() calls (unless it is locked, of course).