contrib/modemu: respond to AT+COPS?

This queries the operator code. If NetworkManager got one, it can
connect the modem device automatically without setting the APN.
This commit is contained in:
Lubomir Rintel 2022-02-03 13:30:07 +01:00
parent 5153810bd6
commit cfb8729d1a

View file

@ -190,6 +190,14 @@ while (<$pty>) {
print $pty "\r\n";
print $pty "OK\r\n";
} elsif (/^AT\+COPS\?$/) {
# Current operators
# Not strictly required, but allows NetworkManager to just connect
# the modem device without explicitly setting an APN
print $pty "\r\n";
print $pty "+COPS: 0,2,\"65302\",7\r\n"; # MCCMNC
print $pty "OK\r\n";
} elsif (/^ATD/) {
print $pty "\r\n";
print $pty "CONNECT 28800000\r\n";