CRBasic Example 2: Settings configuration and status retrieval
'Specifies the interval (in minutes) after the
'first time of the day that the data logger
'powers on its cellular interface, that the
'data logger will power its cellular interface at
'subsequent times throughout the day. 0 = disabled.
SetSetting
("CellBillingDay", 15)
'Tells the modem what day of the month to roll
'over its stats counters. Used to align it with
'my cellular provider’s billing dates.
SetSetting
("CellDiversity", 1)
'Turns on the use of the cell modules diversity
'antenna in the cellular module. 0 = OFF. 1 = ON.
cell_ip_address =
PPPOpen
()
'Just make sure we are ready to go!
Scan
(1,Sec,0,0)
PanelTemp
(panel_temperature_c,60)
Battery
(battery_voltage)
CallTable
TEST_DATA
NextScan
SlowSequence
Scan
(10, Min, 0, 0)
cell_rssi = Settings.CellRSSI
'read RSSI (signal strength) from tower connected to
cell_todays_usage = Settings.CellUsageToday
'usage reported in KB
cell_yesterdays_usage = Settings.CellUsageYesterday
'usage reported in KB
cell_this_months_usage = Settings.CellUsageMonth
'usage reported in KB
cell_last_months_usage = Settings.CellUsageLastMonth
'usage reported in KB
cell_info = Settings.CellInfo
'Cell Info. Same information that shows in the
'DevConfig Cellular Network Status field
cell_status = Settings.CellStatus
'Status of the cellular modem.
cell_state = Settings.CellState
'State that the modem is in. "Network ready." lets me
'know my modem is good to go.
'CellState can be the following (but not limited to):
'"Power off.",
'"Powering up.",
'"Powered up.",
'"SIM authorized.",
'"Setting baud rate.",
'"Waiting for baud rate.",
'"Baud rate set.",
'"Baud rate failure.",
'"Power off. Waiting for retry.",
CELL200-Series 4G LTE Cellular Module
62