Software:VS 2012 with latest SDK.
Hardware:Spider + button + Cellular Radio Module
I simply test the SMS function in Cellular Radio Module but have some problems.
When the GsmNetwork is ok, I press the button to send the SMS.
But, after several times trying, the Debug output of VS is hanging. Can’t see any response when button pressed.
And the D1 and D2 LED turning off, then turning on after 40 seconds, then turning off after 15 seconds…repeat again and again.
Any suggestion?
Thank you so much.
void ProgramStarted()
{
// Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
Debug.Print("Program Started");
cellularRadio.DebugPrintEnabled = true;
cellularRadio.PowerOn(40);
button.ButtonPressed += button_ButtonPressed;
cellularRadio.GsmNetworkRegistrationChanged += cellularRadio_GsmNetworkRegistrationChanged;
}
void button_ButtonPressed(Button sender, Button.ButtonState state)
{
cellularRadio.SendSms("0963354403", "test");
Debug.Print("SMS send");
}
void cellularRadio_GsmNetworkRegistrationChanged(CellularRadio sender, CellularRadio.NetworkRegistrationState networkState)
{
Debug.Print("GSM is ok");
// cellularRadio.SendSms("0963354403","test");
}
Output:
Program Started
The thread ‘’ (0x3) has exited with code 0 (0x0).
CellularRadio : Turning ON
CellularRadio : Turning module on
CellularRadio : <
RDY
CellularRadio : <
+CFUN: 1
+CPIN: READY
CellularRadio : <
+CREG: 0
GSM is ok
CellularRadio : <
+CREG: 2
GSM is ok
CellularRadio : SENT: AT
CellularRadio : SENT: AT+CMGF=1
CellularRadio : <AT
OK
AT+CMGF=1
OK
CellularRadio : SENT: AT+CSDH=0
CellularRadio : <AT+CSDH=0
OK
CellularRadio : SENT: AT+CPBS=“SM”
CellularRadio : SENT: AT+CPMS=“SM”
CellularRadio : <AT+CPBS=“SM”
OK
AT+CPMS=“SM”
+CPMS: 9,30,9,30,9,30
OK
CellularRadio : SENT: AT+CNMI=2,1,0,1,0
CellularRadio : SENT: AT+COLP=1
CellularRadio : <AT+CNMI=2,1,0,1,0
OK
AT+COLP=1
OK
CellularRadio : SENT: AT+CGREG=1
CellularRadio : <AT+CGREG=1
OK
AT+CREG=1
OK
CellularRadio : SENT: AT+CREG=1
The thread ‘’ (0x5) has exited with code 0 (0x0).
CellularRadio : <
Call Ready
CellularRadio : <
+CREG: 1
+CGREG: 0
GSM is ok
CellularRadio : <
+CGREG: 1
CellularRadio : <
+CREG: 1
GSM is ok
CellularRadio : <AT+CMGS=“+0963354403”
SMS send
CellularRadio :
CellularRadio : <
+CMGS: 114
OK
CellularRadio : <AT+CMGS=“+0963354403”
test>
SMS send
CellularRadio : <
+CMGS: 115
OK
CellularRadio : <
+CREG: 1
GSM is ok
CellularRadio : <AT+CMGS=“+0963354403”
SMS send
CellularRadio :