CRBasic Example 3: CELL200 series settings configuration and status retrieval using terminal
functionality
If (modem_reset_needed = TRUE) Then
Do While (modem_reset_needed = TRUE)
SerialOut(ComSDC11, "reboot" & CRLF, CRLF, 1, 200)
SerialIn(returned_value, ComSDC11, 100, CHR(13), 1000)
If (returned_value = "Reboot started . . ." & CHR(13)) Then
modem_reset_needed = FALSE
returned_value = ""
EndIf
Loop
EndIf
#EndIf
Scan (1, SEC, 3, 0)
PanelTemp(panel_temperature_c, _60Hz)
Battery(battery_voltage)
NextScan
SlowSequence
Scan(2, MIN, 0, 0)
'reset our variables so we know we are getting good data every time
modem_apn = ""
modem_battery_voltage = 0
modem_current_day_usage = 0
modem_current_month_usage = 0
modem_diversity = ""
modem_ecio = 0
modem_ipprotocol = ""
modem_mode = ""
modem_previous_day_usage = 0
modem_previous_month_usage = 0
modem_sdc_address = 0
modem_state = ""
returned_value = ""
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, "show apn" & CRLF, CRLF, 1, 200)
'Query for the modems current APN setting.
SerialIn(modem_apn, ComSDC11, 100, CHR(13), 1000)
SerialFlush(ComSDC11)
SerialOut(COMSDC11, "show rssi" & CRLF, CRLF, 1, 200)
'Query for the modem's 3G signal strength information (RSSI)
SerialIn(returned_value, ComSDC11, 100, CHR(13), 1000)
CELL200-Series 4G LTE Cellular Module 69