diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2022-02-03 13:30:07 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2022-02-03 13:32:16 +0100 |
commit | cfb8729d1a810ca6ce0969b0abbb00bc47a3037b (patch) | |
tree | 12b41f4f89d83f838114524ff64b06e8dad47c8f | |
parent | 5153810bd64d2e5f75990a6919134b4948de89d8 (diff) |
contrib/modemu: respond to AT+COPS?lr/modemu-at-cops
This queries the operator code. If NetworkManager got one, it can
connect the modem device automatically without setting the APN.
-rwxr-xr-x | contrib/scripts/modemu.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/scripts/modemu.pl b/contrib/scripts/modemu.pl index 778620237a..8ef1bcbeb7 100755 --- a/contrib/scripts/modemu.pl +++ b/contrib/scripts/modemu.pl @@ -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"; |