Go Down

Topic: GSM.shutdown() does not work (Read 1 time) previous topic - next topic

acitta

I'm running my GSM shield off a solar power pack that I want to check for a message every 10 minutes. I'm trying to reduce power to the arduino board by powering it down and waking it via the watchdog timer.
While the arduino is powered down the leds on the gsm shield remain on so I assume it's still withdrawing power. I tried using the GSM.shutdown() command before sleeping the arduino but it doesn't recognize the shutdown command. Is my gsm library too old? I tried updating all libraries but it didn't solve the problem.

dannable

Which GSM shield are you using?

What does GSM.shutdown() actually do?
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

acitta

So I found the problem. I had downloaded a gsm library from a tutorial website and so it was loading that library instead of the preloaded arduino library. I'm guessing my one didn't have had the shutdown function. I deleted those libraries and it worked. But now the section of code I used from the tutorial doesn't work. Back to the drawing board

Dmitron1036

#3
Jan 09, 2016, 07:25 pm Last Edit: Jan 09, 2016, 07:36 pm by Dmitron1036
I have the same problem (low power consumption too =) ).
gsm.shutdown() does not work the way I wantl.

How I want to shut down the modem: send
"AT+CPOWD=1"
message to SIM900 module. And get responce
"NORMAL POWER DOWN"
message.

I tried to search:
- NORMAL POWER DOWN (no results)
- CPOWD (no results)
- shutdown() => "C:\Program Files\Arduino\libraries\GSM\gsm3shieldv1accessprovider.cpp"

containing text:
//Shutdown.
bool GSM3ShieldV1AccessProvider::shutdown()
{
   unsigned long m;
   bool resp;
   char auxLocate[18];

   theGSM3ShieldV1ModemCore.genericCommand_rqp(_command_AT);
   delay(1000);
   
   // It makes no sense to have an asynchronous shutdown
   pinMode(__RESETPIN__, OUTPUT);
   digitalWrite(__RESETPIN__, HIGH);
   delay(900);
   digitalWrite(__RESETPIN__, LOW);
   theGSM3ShieldV1ModemCore.setStatus(IDLE);
   theGSM3ShieldV1ModemCore.gss.close();
   
   m=millis();
   prepareAuxLocate(PSTR("POWER DOWN"), auxLocate);

   while((millis()-m) < __TOUTSHUTDOWN__)
   {
      delay(1);
      if(theGSM3ShieldV1ModemCore.genericParse_rsp(resp, auxLocate))
         return resp;
   }
   return false;
}


As I understood, It uses __RESETPIN__ to power off.

So,
1) You can use __RESETPIN__
2) or write your own function to power down via AT. (I'll try to do it)
(Or send it to me if you already wrote it, please)

Go Up