Appendix A. Configure cellular
settings and retrieve status
information with SetSetting()
This example shows how to set up the cellular module using the
SetSetting()
instruction. It
also illustrates how to retrieve status information from the module in the CRBasic program. This
program can be downloaded from
https://s.campbellsci.com.au/documents/us/miscellaneous/CELL2XX-SetSettings.dld
CRBasic Example 3: Settings configuration and status retrieval
'CR300 Series
Public
battery_voltage
Public
panel_temperature_c
'cell modem diagnostic information
Public
cell_todays_usage
:
Units
cell_todays_usage = KB
Public
cell_yesterdays_usage :
Units
cell_yesterdays_usage = KB
Public
cell_this_months_usage :
Units
cell_this_months_usage = KB
Public
cell_last_months_usage :
Units
cell_last_months_usage = KB
Public
cell_rssi
As Long
:
Units
cell_rssi = DB
Public
cell_info
As String
* 400
Public
cell_ip_address
As String
* 40
Public
cell_rsrp
As Long
Public
cell_rsrq
Public
cell_ecio
Public
cell_status
As String
* 300
Public
cell_state
As String
* 100
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
Appendix A. Configure cellular settings and retrieve status information with SetSetting()
197