CRBasic Example 2: Settings configuration and status retrieval
DataTable
(CELL_DIAGNOSTICS, True, -1)
Sample
(1, cell_todays_usage, FP2) 'or
Sample
(1, Settings.CellUsageToday, FP2)
Sample
(1, cell_yesterdays_usage, FP2)
'or
Sample
(1, Settings.CellUsageYesterday, FP2)
Sample
(1, cell_this_months_usage, FP2)
'or
Sample
(1, Settings.CellUsageMonth, FP2)
Sample
(1, cell_last_months_usage, FP2)
'or
Sample
(1, Settings.CellUsageLastMonth, FP2)
Sample
(1, cell_rssi, IEEE4)
'or
Sample
(1, Settings.CellRSSI, IEEE4)
Sample
(1, cell_info,
String
)
'or
Sample
(1, Settings.CellInfo,
String
)
Sample
(1, cell_ip_address,
String
)
Sample
(1, cell_rsrp, IEEE4)
'or
Sample
(1, Settings.CellRSRP, IEEE4)
Sample
(1, cell_rsrq, FP2)
'or
Sample
(1, Settings.CellRSRQ, FP2)
Sample
(1, cell_ecio, FP2)
'or
Sample
(1, Settings.CellECIO, FP2)
Sample
(1, cell_status,
String
)
'or
Sample
(1, Settings.CellStatus,
String
)
Sample
(1, cell_state,
String
)
'or
Sample
(1, Settings.CellState,
String
)
EndTable
DataTable
(TEST_DATA, True, -1)
DataInterval
(0, 5, Min, 10)
Minimum
(1, battery_voltage, FP2, True, False)
Sample
(1, panel_temperature_c, FP2)
EndTable
'Main Program
BeginProg
'set up attached cell2xx module via CRBasic programming.
SetSetting
("CellEnabled", True)
'Cell modem is enabled, True = enabled, False = disabled
SetSetting
("CellAPN", "****.****")
'Replace *s with APN assigned by cellular provider
SetSetting
("CellPwrStartTime", 1440)
'Automated start-up schedule. Setting is in minutes (into day).
'1440 = Always on. 15 = 00:15 hours, 180 = 03:00 hours, 1380 = 23:00 hours
SetSetting
("CellPwrDuration", 0)
'How long the modem is to stay online after it hits it Start Time.
'Setting is ignored if CellPwrStartTime is set to 1440
SetSetting
("CellPwrRepeat", 0)
CELL200-Series 4G LTE Cellular Module
61