Problems with the cellular radio

I recently bought the cellular radio by seeed studio, at first it was working perfectly, it sent and recieved messages without any problem but it suddenly stopped working. I didn´t change anything and the modem initialized fine, but that´s all it does. I used the reset button and reinstalled the driver but it still doesn´t work.
Does someone has any suggestions about what could had happened?
Thanks

Hi and welcome to the community. First thing to check is that there is enough power coming from the USB port ( if that’s how you are powering the cerb).
The cellular module is pretty power hungry.

Thanks for replying. I´m feeding the module with the USB and a power hub so the problem shouldn´t be there

Hmm strange, does it initialise at all?? Is there a place where it stops with any exceptions? have you tried putting debug.print steps in to see where it stops working??
I dont have a celular module myself so i cant test it but to more info you can post the more help this community can give. Maybe show us some code too? (dont forget to usse the code tags by selecting your pasted code and clicking on the 0101 button.

I´m using the temp&humidity sensor and I´m trying to send the temperature and humidity that the sensor reads by sms.
This is my code:

            modemGSM.DebugPrintEnabled = true;
            
            modemGSM.PowerOn(50);
           
            modemGSM.ModuleInitialized += new CellularRadio.ModuleInitializedHandler(modemGSM_ModuleInitialized);
            modemGSM.SmsReceived += new CellularRadio.SmsReceivedHandler(modemGSM_SmsReceived);
            modemGSM.SendATCommand("AT");
            modemGSM.SendATCommand("AT+CSQ");
            modemGSM.SendATCommand("AT+CPAS");
            modemGSM.SendATCommand("AT+CSPN?");
           
        
            
            sensorTempHumedad.MeasurementComplete += new TemperatureHumidity.MeasurementCompleteEventHandler(sensorTempHumedad_MeasurementComplete);
           
            sensorTempHumedad.StartContinuousMeasurements();

            Debug.Print("Program Started");
        }


       
        /***************************CELLULAR RADIO**************************************/
        void modemGSM_ModuleInitialized(CellularRadio sender)
        {
            Debug.Print("Módulo inicializado");
            Thread.Sleep(2000);
        }

         void modemGSM_SmsReceived(CellularRadio sender, CellularRadio.Sms message)
        {

            Debug.Print("RETRIEVED");
            Debug.Print("FROM:" + message.TelephoneNumber);
            Debug.Print("MSG:" + message.TextMessage);
            Debug.Print("WHEN:" + message.Timestamp);
            Debug.Print("STATUS:" + message.Status);
            Debug.Print("POS:" + message.Index);
            
        }

       
        /****************************************************************************/

     
        /********************TEMP&HR sensor*************************/
        void sensorTempHumedad_MeasurementComplete(TemperatureHumidity sender, double temperature, double relativeHumidity)
        {
            Debug.Print("Temperature:" + temperature + "Relative Humidity:" + relativeHumidity);
            modemGSM.SendSms("+584129644434", "Temperature:" + temperature + "Relative Humidity:" + relativeHumidity);
            Thread.Sleep(60000);
        }

And this what i get in the output window:

Using mainboard GHIElectronics-FEZHydra version 1.0
CellularRadio : <
NORMAL POWER DOWN

+CREG: 3

+CGREG: 3
>
CellularRadio : Turning ON
CellularRadio : Turning module on
CellularRadio : <
RDY
>
CellularRadio : <
+CFUN: 1

+CPIN: READY
>
CellularRadio : <
+CREG: 0
>
CellularRadio : <
+CREG: 2
>
CellularRadio : SENT: AT

CellularRadio : <AT

OK
>
CellularRadio : SENT: AT+CMGF=1

CellularRadio : <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: 35,35,35,35,35,35

OK
>
CellularRadio : SENT: AT+CNMI=2,1,0,1,0

CellularRadio : <AT+CNMI=2,1,0,1,0

OK
>
CellularRadio : SENT: AT+COLP=1

CellularRadio : <AT+COLP=1

OK
>
CellularRadio : SENT: AT+CGREG=1

CellularRadio : <AT+CGREG=1

OK
>
CellularRadio : SENT: AT+CREG=1

The thread '<No Name>' (0x6) has exited with code 0 (0x0).
CellularRadio : <AT+CREG=1

OK
>
CellularRadio : <
Call Ready
>
CellularRadio : <AT

OK
>
CellularRadio : SENT: AT

CellularRadio : <AT+CSQ

+CSQ: 0,0

OK
>
CellularRadio : SENT: AT+CSQ

CellularRadio : SENT: AT+CPAS

CellularRadio : <AT+CPAS

+CPAS: 2

OK
>
CellularRadio : R:[2]
CellularRadio : SENT: AT+CSPN?

CellularRadio : <AT+CSPN?

+CSPN: "movistar", 0

OK
>
CellularRadio : <
+CREG: 1

+CGREG: 0
>
Program Started
Módulo inicializado
Temperature:25.120000000000001Relative Humidity:47.670000000000002
CellularRadio : <AT

OK
>
CellularRadio : SENT: AT

CellularRadio : <AT+CMGS="+584129644434"

> >
CellularRadio : <Temperature:25.120000000000001Relative Humidity:47.670000000000002>
CellularRadio : <
ERROR
>
CellularRadio : <
+CGREG: 1
>
CellularRadio : <
+CREG: 1
>

You can see that when I try to send a message I get an error. And when I´m sending a message from my cellphone to the module nothing happens, the module never recieves it the sms.

I also use the at command CSQ to see the signal strenght. And as you can see I get 0 rssi and 0 ber.

Am i right in asuming that the Signal and Ber at 0 means no signal / communication to the cell network??. if so then this is why you are nnot able to send or recieve and also why it may have stopped working. Check the antenna connection is ok and hasnt been damaged etc and also check to make sure the SIM card is seated properly.

To follow along with HughB’s comment … If I remember correctly (the code is not available to me right now), there are events in the driver which will happen when your connection state changes.

Also if its a Pay and Go SIM make sure it has come credit :smiley:

Thanks for your replies :slight_smile:
The values that I´m getting reflect that I get no signal. I tried with a different SIM card but I got the same problem. I checked the module and the antenna and everything seems to be alright. I guess that is a hardware problem but there is no much that I can do

If you can, try a different location, it may just be that the signal is low. Also if you have a dual power power module try plugging that in as well just in case its not able to pull enough power throught he USB hub. Or try directly connected to the PC rather than the hub.

I tried in a different location and with 3 sim cards from different providers and still nothing. I´m using a dp module and I´m feeding the cellular radio with both ports. Something in the hardware must be damaged but obviously i won’t be able to fix it.

Thanks for all your tips! :slight_smile:

It sounds like you’ve got ample power. I’ve never seen the module draw more than 500mA even in GPRS mode. It’s probably not hardware, so don’t panic!
It’s important to wait until the GsmNetworkRegistrationChanged event is fired with NetworkRegistrationState.Registered before you try to do any GSM network related activity.
Until then, I’m not sure if you can trust the signal strength readings.
After that you should have no problems with SMS.

Also, it’s not usually a good idea to Thread.Sleep() inside an event handler function. Try using a counter or other timer to enable the SMS.

I tried both of your suggestions and unfortunately they didn’t work. But thanks anyway for your advices :slight_smile:

Hi Maria,
Can you please post the full CellularRadio debug log up until you get the GsmNetworkRegistrationChanged event? I’ll have a look through it for you.
Can you please set up your event handler to look like this:


void cellularRadio_GsmNetworkRegistrationChanged(CellularRadio sender, CellularRadio.NetworkRegistrationState networkState)
{
  Debug.Print("GSM Net Reg: " + networkState)
}

Here is what I get in the output window when I use the GsmNetworkRegistration event:

Using mainboard GHIElectronics-FEZHydra version 1.0
Program Started
CellularRadio : <
NORMAL POWER DOWN

+CREG: 3

+CGREG: 3
>
GSM Net Reg:3
Temperature:21.989999999999998Relative Humidity:50.789999999999999
Temperature:21.989999999999998Relative Humidity:50.729999999999997
Temperature:22Relative Humidity:50.729999999999997
Temperature:22.010000000000002Relative Humidity:50.700000000000003
Temperature:21.989999999999998Relative Humidity:50.700000000000003
Temperature:22.010000000000002Relative Humidity:50.700000000000003
Temperature:22.030000000000001Relative Humidity:50.729999999999997
Temperature:22.030000000000001Relative Humidity:50.700000000000003
Temperature:22.030000000000001Relative Humidity:50.670000000000002
Temperature:22.030000000000001Relative Humidity:50.670000000000002
Temperature:22.030000000000001Relative Humidity:50.670000000000002
Temperature:22.02Relative Humidity:50.640000000000001
Temperature:22.030000000000001Relative Humidity:50.640000000000001
CellularRadio : Turning ON
CellularRadio : Turning module on
CellularRadio : <
RDY
>
CellularRadio : <
+CFUN: 1

+CPIN: READY
>
CellularRadio : <
+CREG: 0
>
GSM Net Reg:0
CellularRadio : <AT

OK
>
CellularRadio : SENT: AT

CellularRadio : SENT: AT+CSQ

CellularRadio : <AT+CSQ

+CSQ: 0,0

OK

+CREG: 2
>
CellularRadio : SENT: AT+CPAS

CellularRadio : <AT+CPAS

+CPAS: 2

OK
>
CellularRadio : R:[2]
CellularRadio : SENT: AT+CSPN

CellularRadio : <AT+CSPN

ERROR
>
CellularRadio : <AT+CMGS="+584129644434"

> Test>
Temperature:22.039999999999999Relative Humidity:50.670000000000002
GSM Net Reg:2
CellularRadio : <
ERROR
>
CellularRadio : SENT: AT

CellularRadio : <AT+CSQ

+CSQ: 0,0

OK
>
CellularRadio : SENT: AT+CSQ

CellularRadio : <AT+CPAS

+CPAS: 2

OK
>
CellularRadio : R:[2]
CellularRadio : SENT: AT+CPAS

CellularRadio : SENT: AT+CSPN

CellularRadio : <AT+CSPN

ERROR
>
CellularRadio : <AT+CMGS="+584129644434"

> >
CellularRadio : <Test>
CellularRadio : <
ERROR
>
CellularRadio : <AT

OK
>
CellularRadio : SENT: AT

CellularRadio : <AT+CMGF=1

OK
>
CellularRadio : SENT: AT+CMGF=1

CellularRadio : <AT+CSDH=0
>
CellularRadio : SENT: AT+CSDH=0

CellularRadio : <
OK
AT+CPBS="SM"

OK
>
CellularRadio : SENT: AT+CPBS="SM"

CellularRadio : SENT: AT+CPMS="SM"

CellularRadio : <AT+CPMS="SM"

+CPMS: 35,35,35,35,35,35

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
>
CellularRadio : SENT: AT+CREG=1

The thread '<No Name>' (0x6) has exited with code 0 (0x0).
CellularRadio : <AT+CREG=1

OK
>
Temperature:22.039999999999999Relative Humidity:50.640000000000001
CellularRadio : <
Call Ready
>
Módulo inicializado
Temperature:22.050000000000001Relative Humidity:50.609999999999999
CellularRadio : <
+CREG: 1

+CGREG: 0
>
GSM Net Reg:1
CellularRadio : SENT: AT

CellularRadio : <AT

OK
>
CellularRadio : SENT: AT+CSQ

CellularRadio : <AT+CSQ

+CSQ: 10,0

OK
>
CellularRadio : SENT: AT+CPAS

CellularRadio : <AT+CPAS

+CPAS: 0

OK
AT+CSPN

ERROR
>
CellularRadio : R:[0]
CellularRadio : SENT: AT+CSPN

CellularRadio : <AT+CMGS="+584129644434"

> >
Temperature:22.039999999999999Relative Humidity:50.609999999999999
CellularRadio : <Test>
CellularRadio : <
ERROR
>
CellularRadio : <
+CGREG: 1
>
Temperature:22.059999999999999Relative Humidity:50.579999999999998
Temperature:22.07Relative Humidity:50.549999999999997
Temperature:22.059999999999999Relative Humidity:50.549999999999997
Temperature:22.09Relative Humidity:50.549999999999997
Temperature:22.09Relative Humidity:50.520000000000003
Temperature:22.100000000000001Relative Humidity:50.520000000000003
Temperature:22.109999999999999Relative Humidity:50.490000000000002
Temperature:22.120000000000001Relative Humidity:50.460000000000001
The program '[1] Micro Framework application: Managed' has exited with code 0 (0x0).

As you can see the message could not be sent even tho the Gsm Network Registration event reflects the module is registered (GSM Net Reg:1)

I had a similar problem, my Seeed GSM modem worked great for a couple of days at sending/recieving SMS messages then stopped sending/receiving eventhough the modem was registering properly to the newtork. The problem was my message storage was full although I never got any error message indicating such. So I wrote a short program that sent the following AT command to the modem: “AT+CMGD=1,4” which deleted the ld messages. I then downloaded my old program and everything started working again. So I then added “AT+CMGD=1,4” after each send_sms call and no problems since.

1 Like

Thank you!. I tried what you said and it is a lot better. Now it´s receiving the messages, the only problem is that it´s not sending them. I tried using the at commad cmgda to erase all the messages (sent, unsent, read and unread), but for some reason I´m getting an error, I don´t know if I´m using it wrong.
I typed:
cellularRadio.SendATCommand(“AT+CMGDA=DEL ALL”);

Using mainboard GHIElectronics-FEZHydra version 1.0
Program Started
Temperature:27Relative Humidity:42.439999999999998
Temperature:27.02Relative Humidity:42.210000000000001
Temperature:27.030000000000001Relative Humidity:42.020000000000003
Temperature:27.010000000000002Relative Humidity:41.880000000000003
Temperature:27Relative Humidity:41.880000000000003
Temperature:26.989999999999998Relative Humidity:41.850000000000001
Temperature:26.989999999999998Relative Humidity:41.82
Temperature:26.989999999999998Relative Humidity:41.82
Temperature:26.989999999999998Relative Humidity:41.82
Temperature:26.989999999999998Relative Humidity:41.82
Temperature:26.98Relative Humidity:41.82
Temperature:26.989999999999998Relative Humidity:41.880000000000003
Temperature:26.98Relative Humidity:41.909999999999997
CellularRadio : Turning ON
CellularRadio : Turning module on
CellularRadio : <
RDY
>
CellularRadio : <
+CFUN: 1

+CPIN: READY
>
CellularRadio : <
+CREG: 0
>
Gsm Net Reg:0
CellularRadio : <AT

OK
>
CellularRadio : SENT: AT

CellularRadio : SENT: AT+CSQ

CellularRadio : <
+CREG: 2
AT+CSQ

+CSQ: 0,0

OK
>
CellularRadio : SENT: AT+CPAS

CellularRadio : <AT+CPAS

+CPAS: 2

OK
>
CellularRadio : R:[2]
CellularRadio : SENT: AT+CMGD=1,4

CellularRadio : <AT+CMGD=1,4

ERROR
>
CellularRadio : SENT: AT+CMGD=2,4

CellularRadio : <AT+CMGD=2,4

ERROR
AT+CMGD=3,4
>
CellularRadio : SENT: AT+CMGD=3,4

CellularRadio : SENT: AT+CMGDA=?

CellularRadio : SENT: AT+CMGDA=DEL ALL

Temperature:27Relative Humidity:41.950000000000003
estado:2
CellularRadio : SENT: AT

CellularRadio : <
OK
AT+CSQ

+CSQ: 0,0

OK
>
CellularRadio : SENT: AT+CSQ

CellularRadio : <AT+CPAS

+CPAS: 2

OK
>
CellularRadio : R:[2]
CellularRadio : SENT: AT+CPAS

CellularRadio : SENT: AT+CMGD=1,4

CellularRadio : <AT+CMGD=1,4

OK
>
CellularRadio : SENT: AT+CMGD=2,4

CellularRadio : <AT+CMGD=2,4

OK
>
CellularRadio : SENT: AT+CMGD=3,4

CellularRadio : <AT+CMGD=3,4

OK
>
CellularRadio : SENT: AT+CMGDA=?

CellularRadio : SENT: AT+CMGDA=DEL ALL

CellularRadio : <AT+CMGDA=?

+CMGDA: ("DEL READ","DEL UNREAD","DEL SENT","DEL UNSENT","DEL INBOX","DEL ALL")

OK
AT+CMGDA=DEL ALL

ERROR
>
CellularRadio : SENT: AT

CellularRadio : <AT

OK
>
CellularRadio : SENT: AT+CMGF=1

CellularRadio : <AT+CMGF=1

OK
>
CellularRadio : SENT: AT+CSDH=0

CellularRadio : <AT+CSDH=0

OK
>
CellularRadio : SENT: AT+CPBS="SM"

CellularRadio : <AT+CPBS="SM"

OK
AT+CPMS="SM"

+CPMS: 0,35,0,35,0,35

OK
>
CellularRadio : SENT: AT+CPMS="SM"

CellularRadio : <AT+CNMI=2,1,0,1,0

OK
>
CellularRadio : SENT: AT+CNMI=2,1,0,1,0

CellularRadio : <AT+COLP=1

OK
>
CellularRadio : SENT: AT+COLP=1

CellularRadio : <AT+CGREG=1

OK
>
CellularRadio : SENT: AT+CGREG=1

CellularRadio : <AT+CREG=1

OK
>
CellularRadio : SENT: AT+CREG=1

The thread '<No Name>' (0x5) has exited with code 0 (0x0).
Temperature:27.030000000000001Relative Humidity:41.950000000000003
CellularRadio : <
Call Ready
>
Módulo inicializado
Temperature:27.02Relative Humidity:41.920000000000002
Temperature:27.02Relative Humidity:41.82
Temperature:27Relative Humidity:41.789999999999999
Temperature:26.969999999999999Relative Humidity:41.810000000000002
Temperature:26.98Relative Humidity:41.880000000000003
Temperature:26.989999999999998Relative Humidity:41.920000000000002
Temperature:27.010000000000002Relative Humidity:41.82
Temperature:27.010000000000002Relative Humidity:41.82
Temperature:27.010000000000002Relative Humidity:41.850000000000001
Temperature:27Relative Humidity:41.82
Temperature:27.02Relative Humidity:41.789999999999999
CellularRadio : <
+CREG: 1

+CGREG: 0
>
Gsm Net Reg:1
CellularRadio : SENT: AT

CellularRadio : <AT

OK
>
CellularRadio : SENT: AT+CSQ

CellularRadio : <AT+CSQ

+CSQ: 7,0

OK
>
CellularRadio : SENT: AT+CPAS

CellularRadio : <AT+CPAS

+CPAS: 0

OK
AT+CMGD=1,4

OK
>
CellularRadio : R:[0]
CellularRadio : SENT: AT+CMGD=1,4

CellularRadio : <AT+CMGD=2,4

OK
>
CellularRadio : SENT: AT+CMGD=2,4

CellularRadio : <AT+CMGD=3,4

OK
>
CellularRadio : SENT: AT+CMGD=3,4

CellularRadio : SENT: AT+CMGDA=?

[b]CellularRadio : <AT+CMGDA=?

+CMGDA: ("DEL READ","DEL UNREAD","DEL SENT","DEL UNSENT","DEL INBOX","DEL ALL")

OK
>
CellularRadio : SENT: AT+CMGDA=DEL ALL

CellularRadio : <AT+CMGDA=DEL ALL

ERROR
>[/b]
Temperature:27.030000000000001Relative Humidity:41.789999999999999
CellularRadio : <
+CGREG: 1
>
Temperature:26.989999999999998Relative Humidity:41.75
Temperature:27.010000000000002Relative Humidity:41.75
Temperature:26.989999999999998Relative Humidity:41.82
Temperature:27Relative Humidity:41.82
Temperature:26.98Relative Humidity:41.82
Temperature:27Relative Humidity:41.850000000000001
Temperature:26.989999999999998Relative Humidity:41.82
Temperature:27.010000000000002Relative Humidity:41.82
CellularRadio : <
+CMTI: "SM",1
>
CellularRadio : SENT: AT+CMGR=1,1

CellularRadio : <AT+CMGR=1,1

+CMGR: "REC UNREAD","+584129644434","","12/11/13,14:43:25-18"
Temphumed

OK
>
CellularRadio : REQ: 1
RETRIEVED
FROM:+584129644434
MSG:Temphumed
WHEN:11/13/2012 14:43:25
STATUS:0
POS:1
SMS recibido del numero1
Comando Temphumed
Temperature:27.030000000000001Relative Humidity:41.789999999999999
SMS recibido solicitando el valor actual de la temperatura y la humedadTemp:27.030000000000001HR:41.789999999999999
CellularRadio : <AT+CMGS="+584129644434"

> >
SMS enviado al numero1
CellularRadio : <Temp:27.030000000000001HR:41.789999999999999
ERROR
>
Temperature:27.039999999999999Relative Humidity:41.82
Temperature:27.039999999999999Relative Humidity:41.82
The program '[11] Micro Framework application: Managed' has exited with code 0 (0x0).

I’m only using the following line of code after I send the sms message:
cellularRadio.SendATCommand(“AT+CMGD=1,4”);

I’m not sure if a DELETE ALL parameter can be used. The following describes the parmaters and is from SIM900 AT Command guide:

0 Delete the message specified in

1 Delete all read messages from preferred message storage,
leaving unread messages and stored mobile originated
messages (whether sent or not) untouched

2 Delete all read messages from preferred message storage
and sent mobile originated messages, leaving unread
messages and unsent mobile originated messages
untouched

3 Delete all read messages from preferred message storage,
sent and unsent mobile originated messages leaving unread
messages untouched

4 Delete all messages from preferred message storage
including unread messages

I think that the problem that I´m having by only using at+cmgd=1,4 it´s that i´m not deleting all the memory spaces. That´s why I wanted to try with the other at command CMGDA , because this one is supposed to delete all the memory, i guess that i´m not using it right.
In the SIM900_ATC_V1.00 says that you should use it like this:

AT+CMGDA=
Parameter:

  1. text mode:
    “DEL READ”
    “DEL UNREAD”
    “DEL SENT”
    “DEL UNSET”
    “DEL INBOX”
    “DEL ALL”

  2. pdu mode
    1 delete all read sms
    2 delete all unread sms
    3 delete all sent sms
    4 delete all unset sms
    5 delete all recived sms
    6 delete all sms

I used
cellularRadio.SendATCommand(“AT+CMGDA=DEL ALL”);
In the output window I´m getting an error and I´m not sure why.