openLuat / LuatOS

LuatOS -- Powerful embedded Lua Engine for IoT devices, with many components and low memory requirements (16K RAM, 128K Flash)
https://wiki.luatos.com
MIT License
452 stars 102 forks source link

how to set prefered operator with LUA #94

Open 0x0fe opened 1 year ago

0x0fe commented 1 year ago

Hello, we need to be able to define a prefered operator, just like AT+COPS or AT+CPOL, what is the correct way to do this from LUA?

wendal commented 1 year ago

Air780E ?

0x0fe commented 1 year ago

yes

0x0fe commented 1 year ago

@wendal any update on this?

AT+COPS=?
+COPS: (2,"T-Mobile USA","TMO","310260"),,(0-4),(0-2)
OK
Available Networks:
Network Name->T-Mobile USA
Network ID->310260
Network Status->Current
AT+COPS?
+COPS: 0,0,"T-Mobile USA"
OK
Device is currently on "T-Mobile USA" network.
AT+COPS=1,0,"TMO"
ERROR
AT+COPS=1,1,"T-Mobile USA"
ERROR
AT+CREG?
+CREG: 0,1
OK
The device is registered in home network.
AT+COPS=2
OK
Network selection sucessful.
Updating the list...
AT+COPS=?
ERROR
Unable to find networks.
AT+COPS?
+COPS: 2
OK
AT+COPS=1,2,"310260"
OK
Network selection sucessful.
Updating the list...
AT+COPS=?
+COPS: (2,"T-Mobile USA","TMO","310260"),,(0-4),(0-2)
OK
AT+COPS=0,0, "TMO"
OK
Network selection sucessful.
Updating the list...
AT+COPS=?
+COPS: (2,"T-Mobile USA","TMO","310260"),,(0-4),(0-2)
OK
Available Networks:
Network Name->T-Mobile USA
Network ID->310260
Network Status->Current