GSM Low-level Tests
This section provides the low-level programming interface of the GSM RF Test Agent. These low level test contructs are the building blocks for test automation scripts.
at
Run an AT command.
xg.at('at+cimi')
xg.at('at+cimi','OK')
xg.at('at+cimi','OK',time_out=10)
Parameters
command
3GPP AT commandexpected_respose
(optional, defaultNone
) expected response from the commandtime_out
(optional, defaultsettings.GLOBAL_DEFAULT_TIMEOUT
) Number of seconds to wait for a response
Returns <String>
response from the AT command
wait
Sleep (wait) for a given period of time
xg.wait(5)
Parameters
seconds
seconds to sleep
ping
Ping a host.
xg.ping('www.google.com')
Parameters
host
(defaultNull
) hosttime_out
(optional, defaultsettings.GLOBAL_DEFAULT_TIMEOUT
) Number of seconds to wait for a response
Returns <String>
s
check_sim
Checks the Status of the SIM
xg.check_sim()
Returns <String>
+CPIN: READY
If a SIM is inserted to the module and is ready to be used
get_imsi
Get the IMSI of the SIM
xg.get_imsi()
Returns <int>
The IMSI (International Mobile Subscriber Identity) of the SIM card. The PIN may need to be entered before reading the IMSI
get_signal_strength
Checks the modem's cellular network signal strength
xg.get_signal_strength()
Returns <int>
signal strength as a percentage
turn_on_radio
Turn ON the radio
xg.turn_on_radio()
Returns <String>
OK
if the Radio was turned ON Successfully
turn_off_radio
Turn OFF the radio
xg.turn_off_radio()
Returns <String>
OK
if the Radio was turned OFF Successfully
restart_modem
Restart the Modem
xg.restart_modem()
Returns <String>
OK
if the Modem was restarted Successfully
change_pdp_context
Specify the input and output format of the short messages to Text Mode
xg.change_pdp_context()
Returns <String>
OK
if the mode was changed to Text successfully
get_pdp_params
Check active PDP Parameters such as APN, IP address, subnet mask, gateway addres, primary and secondary DNS address etc.
xg.get_pdp_parameters()
Returns <String>
active PDP parameters