i have some problems with the celluar radio module and my spider board.
i use NETMF 4.3
i can send sms, connect to the gprs network and dial out.
but i cant recieve any calls or other events.
if i call to the cellular module it rings on the phone but the module dont recnogize.
cellularRadio.ModuleInitialized += cellularRadio_ModuleInitialized;
cellularRadio.PowerOn(40);
cellularRadio.GsmNetworkRegistrationChanged += cellularRadio_GsmNetworkRegistrationChanged;
cellularRadio.SmsReceived += new CellularRadio.SmsReceivedHandler(cellularRadio_SmsReceived);
cellularRadio.SmsListRequested += cellularRadio_SmsListRequested;
cellularRadio.IncomingCall += new CellularRadio.IncomingCallHandler(cellularRadio_IncomingCall);
Hi thx for replay. i used the handler you see in my code above. but dont fire if a sms gets in. have some problems :’( if i connect to my gprs network i get an ip and the connection is fine. but thats all. device dont do any other events than.
What happens if you issue the following after the GSM has registered on the network?
You will need to have an event handler for the SMS list like this.
```cs
void cellularRadio_SmsListRequested(CellularRadio sender, ArrayList smsList)
{
if (smsList != null)
{
foreach (CellularRadio.Sms message in smsList)
{
Debug.Print("");
Debug.Print("----------------------------------------------------------------------------------------------");
Debug.Print("NEW SMS");
Debug.Print("FROM: " + message.TelephoneNumber);
Debug.Print("MSG: " + message.TextMessage);
Debug.Print("WHEN: " + message.Timestamp.ToString());
Debug.Print("STATUS: " + message.Status.ToString());
Debug.Print("POS:" + message.Index.ToString());
Debug.Print("----------------------------------------------------------------------------------------------");
Debug.Print("");
}
}
}
Get this error message after calling the sms list:
#### Exception System.ArgumentOutOfRangeException - CLR_E_OUT_OF_RANGE (5) ####
#### Message:
#### System.String::Substring [IP: 0000] ####
#### Gadgeteer.Modules.GHIElectronics.CellularRadio::DoWork [IP: 0669] ####
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
to
```cs]this.OnSmsReceived(this, sms);[/code
Then at line 1230 move
```cs] response = response.Substring(last); [/code
to the bottom of the do while loop (between lines 1286 & 1287.
In addition to those changes you will need to add the following line to your initialisation code for the GSM
```cs]cellularRadio.SendATCommand("AT+CSDH=0");[/code