CRBasic Example 3: Settings configuration and status retrieval
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)
'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
Appendix A. Configure cellular settings and retrieve status information with SetSetting()
198