
CRBasic Example 3: CELL200 series settings configuration and status retrieval using terminal
functionality
'Send a CRLF and wait CELL2xx prompt before continuing on.
SerialOut
(ComSDC11,
"deep sleep"
& CRLF, CRLF, 1, 200)
'put the modem into low power mode
SerialIn
(returned_value, ComSDC11, 100,
CHR
(13), 1000)
If
(returned_value =
"Sleep enabled."
&
CHR
(13))
Then
modem_is_off = TRUE
returned_value =
""
EndIf
Loop
EndIf
If
((TimeIsBetween(0, 10, 60, Min)
OR TimeIsBetween
(58, 60, 60, Min)) _
AND
modem_is_off
<>
FALSE)
Then
'turn the modem on at the top of the hour in a 10 minute windows
'PPPOpen'Uncomment line for CR1000, CR800 series, and CR3000.
Do Until
(modem_is_off = FALSE)
SerialFlush
(ComSDC11)
'clean out any garbage characters that might have come in.
SerialOut
(ComSDC11, CRLF ,
"CELL2xx>"
, 1, 200)
'Send a CRLF and wait CELL2xx prompt before continuing on.
SerialOut
(ComSDC11,
"wakeup"
& CRLF, CRLF, 1, 200)
'bring the modem fully back online
SerialIn
(returned_value, ComSDC11, 100,
CHR
(13), 1000)
If
(returned_value =
"Sleep disabled."
&
CHR
(13))
Then
modem_is_off = FALSE
returned_value =
""
EndIf
Loop
EndIf
Loop
EndSequence
EndProg
C.2 Status commands
Status commands show current values of the information being requested. Some correspond to
settings and others are tied to diagnostic information. All values returned are strings. Not all
modems return all values. Values returned are also dependent on the network the device is
connected to.
show apn
Displays the APN (Access Point Name) currently used by the cellular module. Corresponds with
the APN setting in the web interface of the cellular module.
CELL200-Series 4G LTE Cellular Module
72