Last active
December 11, 2020 12:37
-
-
Save bsmth/1ff4334b11a76c44e6b859f148cc1338 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Descriptioon of the sequence below: | |
# | |
# AT+... <- AT Command sent to modem | |
# OK <- Modem Response | |
//Switch the modem to minimum functionality | |
AT+CFUN=0,0 | |
OK | |
// Verbose Error Reporting to get understandable error reporting (optional) | |
AT+CMEE=2 | |
OK | |
// Only scan for CAT-M Networks | |
AT+QCFG="nwscanseq",02,1 | |
OK | |
// LTE only scan | |
AT+QCFG="nwscanmode",3,1 | |
OK | |
// Search only CAT-M Networks | |
AT+QCFG="iotopmode",0,1 | |
OK | |
// Set CATM1 Bands to LTE Band 20 | |
AT+QCFG="band",0,80000,0 | |
OK | |
AT+QCFG="roamservice",255,1 | |
OK | |
AT+QCFG="servicedomain",2,1 | |
OK | |
// Enable Radio | |
AT+CFUN=1,0 | |
OK | |
// Define PDP context using EMnify APN | |
AT+CGDCONT=1,"IP","em",, | |
OK | |
// Manual Registration to O2 | |
AT+COPS=1,2,"26203",8 | |
AT+COPS=1,2,"26203",8 | |
OK | |
AT+COPS? | |
+COPS: 0 | |
OK | |
// Check signal Quality | |
AT+CSQ | |
+CSQ: 99,99 | |
OK | |
// Query Network Info | |
AT+QNWINFO | |
+QNWINFO: No Service | |
// Repeat Manual Operator selection & Signal Quality check until +CSQ is below 30... | |
OK | |
AT+COPS=1,2,"26203",8 | |
OK | |
AT+COPS? | |
+COPS: 1,2,"26203",8 | |
OK | |
// Adequate Signal Reported | |
AT+CSQ | |
+CSQ: 28,99 | |
OK | |
// CAT-M1 Network available for registration | |
AT+QNWINFO | |
+QNWINFO: "CAT-M1","26203","LTE BAND 20",6200 | |
OK | |
// Check registration status | |
AT+CREG? | |
+CREG: 0,5 // <- indicates roaming | |
OK | |
AT+CGREG? | |
+CGREG: 0,4 | |
OK | |
AT+CEREG? | |
+CEREG: 0,5 // <- indicates roaming | |
OK | |
// At this point, the PDP context is active and the device may make HTTP requests | |
AT+QHTTPCFG="contextid",1 | |
OK | |
AT+QHTTPCFG="requestheader",1 | |
OK | |
AT+QHTTPCFG="responseheader",1 | |
OK | |
AT+QHTTPURL=43,80 | |
CONNECT | |
https://my-server-..... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment