grab_port fails for AT/PPP port (stuck) in data mode

Norbert van Bolhuis norbert.vanbolhuis at ev-box.com
Mon Aug 30 22:29:40 UTC 2021


Hi,

I'm creating a plugin for Sierra Wireless HL78xx LTE-M modem.
Actually, it is already partly done.

The HL78xx has its own TCP/TLS stack/interface. To use it as
"generic linux network interface" though, PPP is used for the AT/PPP capable
ttyACM1 port. ttyACM0 is the AT control port.

Note: I'm talking about usb (cdc_acm) 'virtual' tty ports. The serial UART
       port (UART1) can be used for PPP as well, but that is another use-case.

The problem I currently have is that the plugin fails to grab
the ttyACM1 port if this port is in data mode. It enters data mode
after the ATD "dial-in" command ("ATD*99***<cid>#1").

The same problem occurs when the ATD "dial-in" command itself, it times
out when the ttyACM1 port is in data mode.

Afaict, there are 2 possible solutions.
-1- implement some proper switching between data and command mode
-2- MM uses ttyACM0 only

I wonder whether -1- is a good option since I don't see any code dealing with
data<->command mode switching. Do you think this is needed in my case?
if yes, How do I issue "+++" to enter AT command mode in (any custom) grab_port?

about -2-, the ATD "dial-in" command probably isn't necessary (since MM
already register with COPS and create/activates the PDP-context/bearer with
CGDCONT/CGACT). Do you think this is a good option?
We do use NetworkManager to start pppd with the right port (ttyACM1), will this still work?

Thanks!

Regards,
Norbert van Bolhuis






More information about the ModemManager-devel mailing list