From cfb8729d1a810ca6ce0969b0abbb00bc47a3037b Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 3 Feb 2022 13:30:07 +0100 Subject: 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. --- contrib/scripts/modemu.pl | 8 ++++++++ 1 file changed, 8 insertions(+) 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"; -- cgit v1.2.3