Post a new topicPost a reply Page 1 of 1   [ 10 posts ]
Author Message
 Post subject: Interrupt triggered SMS, ACC and RTC
PostPosted: Thu May 10, 2012 11:02 am 

Joined: Fri Nov 25, 2011 2:28 pm
Posts: 62
I've been trying to use the EventsBoard to monitor several sockets simultaneously, with interrupts associated with these, with RTC alarms (for regular reports/logs) and ACC interrupts.

I've been debugging and have removed all sensor board code, so I have two types of trigger - Accelerometer interrupt, and RTC alarm.


Quote:
#define MAX_TRIES 2
uint8_t timeout = 0;
uint8_t isAlarm = 0;
uint8_t acc_ints = 0;

void setup(){
  USB.begin();
  USB.println("USB port started...");
  
  USB.println("^^^^^^^^^^^^^^^^^^^START SETUP WINDOW^^^^^^^^^^^^^^^^^^^^^^^");
  
  ACC.ON();
  USB.println("ACC ON...");
  
  RTC.ON();
  USB.println("RTC ON...");
  
  for(uint8_t i=0;i<10;i++) Utils.blinkLEDs(100);
  
  USB.println("^^^^^^^^^^^^^^^^^^^END SETUP WINDOW^^^^^^^^^^^^^^^^^^^^^^^");
}


void loop(){
  USB.println("^^^^^^^^^^^^^^^^^^^START LOOP WINDOW^^^^^^^^^^^^^^^^^^^^^^^");
  if( intFlag & ACC_INT )USB.println("FLAG ACC active ");
  if( intFlag & RTC_INT )USB.println("FLAG RTC active ");
  RTC.setAlarm1("00:00:00:30",RTC_ABSOLUTE,RTC_ALM1_MODE5);
  USB.print("Alarm1: ");
  USB.println(RTC.getAlarm1());
 
  ACC.setFF();
  ACC.setDD();
  USB.print("ACC INTERRUPTS SET! ");
  
  PWR.sleep(UART0_OFF | UART1_OFF | BAT_OFF);//sleep, wake if RTC or ACC INT
  RTC.ON();
  USB.begin();
  
  if( intFlag & ACC_INT )
  {
      USB.print("\nACC INTERRUPT! >>>>\t");
      USB.println(RTC.getTime());
      acc_ints++;
      USB.print("\tACC ints:\t");
      USB.println(acc_ints,DEC);
      isAlarm = 1;
      //generateSMSBody();
      sendSMS();
      intFlag &= ~(ACC_INT); // Clear flag
  }
  
  if (intFlag & RTC_INT)
  {
      intFlag &= ~(RTC_INT);
      USB.print("\nRTC INTERRUPT! >>>>\t");
      USB.println(RTC.getTime());
      isAlarm = 0;
      //generateSMSBody();
      sendSMS();
  }
  if( intFlag & ACC_INT )USB.println("FLAG ACC active i ");
  if( intFlag & RTC_INT )USB.println("FLAG RTC active i ");
  if( intFlag & ACC_INT )USB.println("************FLAG ACC ACTIVE***********");
  USB.println("^^^^^^^^^^^^^^^^^^^END LOOP WINDOW^^^^^^^^^^^^^^^^^^^^^^^");
}

void sendSMS(){
  // setup for GPRS seial port
  GPRS.ON();
  USB.println("GPRS module ready...");
  Utils.setLED(LED1,LED_ON); 
  
  // waiting while GPRS connects to the network (for
  //while(!GPRS.check());
  while((timeout<MAX_TRIES)&&(!GPRS.check())){ //while in time and not connected...
    USB.print("timeout = ");
    USB.println(timeout,DEC);
    timeout++;
        USB.print("sendCommand('+CREG')..... ");
        if(GPRS.sendCommand("+CREG")) USB.print("sendCommand OK");
        else USB.print("sendCommand NOT OK");
        //GPRS.sendCommand("+CSQ");
        USB.print("answer_command: ");
        USB.println(GPRS.answer_command);
        //delay(1000);
  }
  
  timeout = 0;
  
  if(GPRS.check()){
      USB.println("GPRS connected to the network");
      Utils.setLED(LED0,LED_ON); 
      
      // configure SMS and Incoming Calls
      if(GPRS.setInfoIncomingCall()) USB.println("Info Incoming Call OK");
      if(GPRS.setInfoIncomingSMS()) USB.println("Info Incoming SMS OK");
      if(GPRS.setTextModeSMS()) USB.println("Text Mode SMS OK");
      
      if(isAlarm == 1)
      {
          if(GPRS.sendSMS("ALARM","08********")) USB.println("SMS Sent OK"); // * should be replaced by the desired tlfn number
          else{
             USB.println("Error sending Alarm sms");
              for(uint8_t i=0;i<10;i++) Utils.blinkLEDs(50);
          }
      }
      else if(isAlarm == 0)
      {
          if(GPRS.sendSMS("LOG","08********")) USB.println("SMS Sent OK"); // * should be replaced by the desired tlfn number
          else{
             USB.println("Error sending Log sms");
              for(uint8_t i=0;i<10;i++) Utils.blinkLEDs(50);
          }
      }
      else USB.println("isAlarm Error (isAlarm != ( 0 or 1))");
  }
  
  else{
    USB.println("GPRS connect timed out");
  }
  
  delay(50);
  GPRS.setMode(GPRS_HIBERNATE);
  USB.println("GPRS mode set to HIBERNATE");
  Utils.setLED(LED0,LED_OFF); 
  Utils.setLED(LED1,LED_OFF); 
}



This sketch will detect the interrupts as normal, with both ACC interrupts and the Alarm1 interrupts working seemingly independent of one another - as desired.
The GPRS behaviour is thus:

> If I do not cause an ACC interrupt, or disable it's operation, the Reporting / Alarm1, or RTC int, triggered SMS's are sent successfully, with a 95%+ success rate in connecting / sending OK.

> If I disable the RTC ints, The ACC interrupt triggered SMS's are sent successfully with a high success rate.

> If I load the above coded unaltered to the mote, The RTC int triggered (Log) will connect / send as SMS untill the ACC int is generated, then strange behaviour occurs:
-The ACC interrupt will wake the mote up - and sendSMS() is called.
-sendSMS() may connect (but with a less than 50% success rate)
-if a GPRS connection is successfully created the configuration does not succeed - typically configuring 'Incoming calls' but not 'Incoming SMS' or 'Text mode' - It times out and I recieve "Error sending Alarm sms" when the Unconfigured tranmission is attempted.
-if configuration is completed (with a low success rate) the SMS may be sent while "Error sending Alarm sms" is still 'USB.print'ed.
-if the connection fails (times out) the AT ('+CREG') command is typically responded to with a "sendCommand NOT OK" and
Quote:
answer_command:
>

-After the the unsucessful connection all ACC or RTC generated SMS's fail as the GPRS module will not connect, or respond to AT commands after this. It hangs indefinately after USB.print("sendCommand('+CREG')..... ");

The two types of trigger have worked together - but only for one pair of messages, i.e. a Log then an Alarm SMS. The low success rate in the Combined log & alarms is not due to GPRS alone - as each functionality demonstrates the desired performance (reconnect & transmission reliability) on it's own. The interrupts working as long as is GPRS disabled leads me to conclude the issue may not be there either.
I am having real difficulty diagnosing the source of these connection failures,
any advice or help is greatly appreciated.

Thank you.


Top
 Profile  
 
 Post subject: Re: Interrupt triggered SMS, ACC and RTC
PostPosted: Fri May 11, 2012 4:16 pm 

Joined: Fri Nov 25, 2011 2:28 pm
Posts: 62
Hello again,

I've been using the GPRS.flag data field to get specific error types for the operational difficulties.

When I send successfully I get 0 across the board (as expected).

When I try to send an Alarm SMS The flag gets updated to 8 or 9 - i.e. SMS error or SMS and Power errors.

I get the SMS error when the GPRS module connects to the network, then configures OK, but gives the "Error sending Alarm sms" error message - despite sending the SMS (in the majority of cases. The SMS is sent, and received, before the "Error sending Alarm sms" is printed - indicating (from my understanding) that the GPRS.sendSMS() gets the error AT answer, and responds appropriately, despite the GPRS module sending the SMS!).

The '9' or SMS and Power Error is obtained when The GPRS module is set to hibernate - I have not yet confirmed wether this occurs or not - just that the flag is incremented (+1).

After both the errors are recieved the GPRS behaviour remains inconsistant - Timing out before connecting is typical but also hanging waiting for AT commands to send.
Very occasionally the GPRS module will return to normal operation, albeit briefly, after an error / timeout occurs.

Thanks.


Top
 Profile  
 
 Post subject: Re: Interrupt triggered SMS, ACC and RTC
PostPosted: Tue May 15, 2012 2:51 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7830
LiamatTitan,

Many thanks for your clear explanation and sorry for our silence.

We will make some test about your issue, trying to figure out what is going on.

Thanks for your understanding.

Regards.


Top
 OnlineProfile  
 
 Post subject: Re: Interrupt triggered SMS, ACC and RTC
PostPosted: Fri May 18, 2012 1:49 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7830
Hi LiamatTitan,

These are some recommendations:
1. You must put just one ACC interrupt option: Choose between FF and DD
2. The RTC alarm is set in an ABSOLUTE way. Don't you think, it should be set as an OFFSET reference (RTC_OFFSET instead RTC_ABSOLUTE)?
3. Try disabling the ACC interruptions after checking them. Inside the: if( intFlag & ACC_INT ) condition, put ACC.unsetFF();


Best regards


Top
 OnlineProfile  
 
 Post subject: Re: Interrupt triggered SMS, ACC and RTC
PostPosted: Mon May 21, 2012 11:19 am 

Joined: Fri Nov 25, 2011 2:28 pm
Posts: 62
Hello again,

Thank you for your reply.
I've taken your suggestions on board and have implemented them in my sketch.
I've removed ACC.setDD(); , changed the ACC.deepSleep argument to RTC_OFFSET , and in the
if( intFlag & ACC_INT ) condition have replaced the:
Quote:
intFlag &= ~(ACC_INT); // Clear flag
flag unsetter with:
Quote:
ACC.unsetFF();


The behavior is unchanged :( , with slightly different behaviour needed no trigger the accelerometer.

I am still unclear as to how the interrupt cycle affects The GPRS module power cycle as it appears to do.

I will retry the sketch, and a version using the events board instead of the accelerometer to generate the interrupts for the alarm GSM SMS.

I'd be glad if you would assist me further in finding the issue with this sketch, as I would like to include ACC ints along with the sensor board innts - and will need to have logs / alarms working simultaneously on most motes.

Thanks for your help.


Top
 Profile  
 
 Post subject: Re: Interrupt triggered SMS, ACC and RTC
PostPosted: Mon May 21, 2012 11:27 am 

Joined: Fri Nov 25, 2011 2:28 pm
Posts: 62
LiamatTitan wrote:

The behavior is unchanged :( , with slightly different behaviour needed *to trigger the accelerometer.
.


Top
 Profile  
 
 Post subject: Re: Interrupt triggered SMS, ACC and RTC
PostPosted: Tue May 22, 2012 12:25 pm 

Joined: Fri Nov 25, 2011 2:28 pm
Posts: 62
Hi,

I came across this thread: http://www.libelium.com/forum/viewtopic.php?f=16&t=8501&hilit=gprs+power
Where yoshi_jd was having GPRS issues too.

I took some of the suggestions made and incorporated them into my own code:

Quote:
if you use RTC in your code try clearing interrupt flags to avoid GPRS conflicts with RTC.clearAlarmFlag();


and:
Quote:
So if you use Utils.setMuxGPS(); you are removing power from GPRS by choosing other multiplexor output.


Below is the edited code in full, including the GPRS flag function (Thanks to marc de hoogh ;) )

Quote:
#define MAX_TRIES 2
uint8_t timeout = 0;
uint8_t isAlarm = 0;
uint8_t acc_ints = 0;

void setup(){
  USB.begin();
  USB.println("USB port started...");
  
  USB.println("^^^^^^^^^^^^^^^^^^^START SETUP WINDOW^^^^^^^^^^^^^^^^^^^^^^^");
  
  ACC.ON();
  USB.println("ACC ON...");
  
  RTC.ON();
  USB.println("RTC ON...");
  
  RTC.setTime("12:10:20:03:17:35:00");
  
  for(uint8_t i=0;i<10;i++) Utils.blinkLEDs(100);
  
  USB.println("^^^^^^^^^^^^^^^^^^^END SETUP WINDOW^^^^^^^^^^^^^^^^^^^^^^^");
}


void loop(){
  USB.println("^^^^^^^^^^^^^^^^^^^START LOOP WINDOW^^^^^^^^^^^^^^^^^^^^^^^");
  USB.print("ACC ints:\t");
  USB.println(acc_ints,DEC);
  if( intFlag & ACC_INT )USB.println("FLAG ACC active ");
  if( intFlag & RTC_INT )USB.println("FLAG RTC active ");
  //RTC.setAlarm1("00:00:00:30",RTC_ABSOLUTE,RTC_ALM1_MODE5);
  USB.print("Alarm1: ");
  USB.println(RTC.getAlarm1());
 
  ACC.setFF();
  //ACC.setDD();
  USB.print("ACC INTERRUPTS SET! ");
  
  //PWR.sleep(UART0_OFF | UART1_OFF | BAT_OFF);//sleep, wake if RTC or ACC INT
  PWR.deepSleep("00:00:00:15", RTC_OFFSET, RTC_ALM1_MODE5, UART0_OFF | UART1_OFF | BAT_OFF);//sleep, wake if RTC or ACC INT
  RTC.ON();
  USB.begin();
  
  if( intFlag & ACC_INT )
  {
      USB.print("\n>>>>>> ACC INTERRUPT! >>>>\t");
      USB.println(RTC.getTime());
      acc_ints++;
      USB.print("\tACC ints:\t");
      USB.println(acc_ints,DEC);
      isAlarm = 1;
      //generateSMSBody();
      sendSMS();
      //intFlag &= ~(ACC_INT); // Clear flag
      ACC.unsetFF();
      if( intFlag & ACC_INT )USB.println("************FLAG ACC ACTIVE***********");
  }
  
  if (intFlag & RTC_INT)
  {
      //intFlag &= ~(RTC_INT);
      RTC.clearAlarmFlag();
      USB.print("\n>>>>>>>> RTC INTERRUPT! >>>>\t");
      USB.println(RTC.getTime());
      isAlarm = 0;
      //generateSMSBody();
      sendSMS();
  }
  if( intFlag & ACC_INT )USB.println("FLAG ACC active i ");
  if( intFlag & RTC_INT )USB.println("FLAG RTC active i ");
  
  USB.println("^^^^^^^^^^^^^^^^^^^END LOOP WINDOW^^^^^^^^^^^^^^^^^^^^^^^");
}

void sendSMS(){
  // setup for GPRS seial port
  GPRS.ON();
  USB.println("GPRS module ready...");
  Utils.setLED(LED1,LED_ON); 
  
  // waiting while GPRS connects to the network (for
  //while(!GPRS.check());
  while((timeout<MAX_TRIES)&&(!GPRS.check())){ //while in time and not connected...
    USB.print("timeout = ");
    USB.println(timeout,DEC);
    timeout++;
    reportGPRSStatus("GPRS connecting...");
       // USB.print("sendCommand('+CREG')..... ");
       // if(GPRS.sendCommand("+CREG")) USB.print("sendCommand OK");
       // else USB.print("sendCommand NOT OK");
       //GPRS.sendCommand("+CSQ");
        //USB.print("answer_command: ");
       // USB.println(GPRS.answer_command);
        //delay(1000);
  }
  
  timeout = 0;
  
  if(GPRS.check()){
      USB.println("GPRS connected to the network");
      Utils.setLED(LED0,LED_ON); 
      reportGPRSStatus("GPRS connected");
      
      // configure SMS and Incoming Calls
      if(GPRS.setInfoIncomingCall()) USB.println("Info Incoming Call OK");
      if(GPRS.setInfoIncomingSMS()) USB.println("Info Incoming SMS OK");
      if(GPRS.setTextModeSMS()) USB.println("Text Mode SMS OK");
      
      if(isAlarm == 1)
      {
          if(GPRS.sendSMS("ALARM","08********")) USB.println("SMS Sent OK"); // * should be replaced by the desired tlfn number
          else{
             USB.println("Error sending Alarm sms");
              for(uint8_t i=0;i<10;i++) Utils.blinkLEDs(50);
          }
      }
      else if(isAlarm == 0)
      {
          if(GPRS.sendSMS("LOG","08********")) USB.println("SMS Sent OK"); // * should be replaced by the desired tlfn number
          else{
             USB.println("Error sending Log sms");
              for(uint8_t i=0;i<10;i++) Utils.blinkLEDs(50);
          }
      }
      else USB.println("isAlarm Error (isAlarm != ( 0 or 1))");
  }
  
  else{
    USB.println("GPRS connect timed out");
     reportGPRSStatus("GPRS connect failure!");
  }
  
  delay(50);
  GPRS.setMode(GPRS_HIBERNATE);
  USB.println("GPRS mode set to HIBERNATE");
  Utils.setLED(LED0,LED_OFF); 
  Utils.setLED(LED1,LED_OFF); 
  reportGPRSStatus("GPRS operation completed");
      
  Utils.setMuxGPS();
  USB.println("Multiplexer set to GPS!!!!");
}

void reportGPRSStatus(char *statusPrefix) {
  int gprsFlag=GPRS.flag;
  USB.print("GPRS status after '");
  USB.print(statusPrefix);
  USB.print("': ");
  USB.print(gprsFlag);
  USB.println(".");
  if (gprsFlag&1) USB.println(" Error powering up the GRPS module.");
  if (gprsFlag&2) USB.println(" Error making a call.");
  if (gprsFlag&4) USB.println(" Error hanging up a call.");
  if (gprsFlag&8) USB.println(" Error while working with SMS.");
  if (gprsFlag&16) USB.println(" Error setting the PIN.");
  if (gprsFlag&32) USB.println(" Error receiving a call.");
  if (gprsFlag&64) USB.println(" Error receiving a SMS.");
  if (gprsFlag&128) USB.println(" Error configuring the GPRS connection.");
  if (gprsFlag&256) USB.println(" Error setting the pattern of the TCP connection.");
  if (gprsFlag&512) USB.println(" Error setting the timer for the TCP connection.");
  if (gprsFlag&1024) USB.println(" Error setting the profile for the TCP connection.");
  if (gprsFlag&2048) USB.println(" Error setting the socket.");
  if (gprsFlag&4096) USB.println(" Error checking the connection.");
  if (gprsFlag&8192) USB.println(" Error closing the socket.");
  if (gprsFlag&16384) USB.println(" Error while setting SMTP parameters.");
}



I have found the Utils.setMuxGPS(); call does not effect GPRS behaviour, but interestingly When I comment out intFlag &= ~(ACC_INT); and intFlag &= ~(RTC_INT);, replacing them with ACC.unsetFF(); and RTC.clearAlarmFlag(); respectively - the flags remain set... i.e. "FLAG ACC active i" and / or FLAG RTC active i" is printed when these RTC and ACC methods are used.
Are these intended to unset the flags?


Top
 Profile  
 
 Post subject: Re: Interrupt triggered SMS, ACC and RTC
PostPosted: Wed May 30, 2012 3:04 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7830
Hi LiamatTitan,

LiamatTitan wrote:
I have found the Utils.setMuxGPS(); call does not effect GPRS behaviour, but interestingly When I comment out intFlag &= ~(ACC_INT); and intFlag &= ~(RTC_INT);, replacing them with ACC.unsetFF(); and RTC.clearAlarmFlag(); respectively - the flags remain set... i.e. "FLAG ACC active i" and / or FLAG RTC active i" is printed when these RTC and ACC methods are used.
Are these intended to unset the flags?
These functions are not supposed to disable the flag of both RTC and ACC modules. So please uncomment the commented instructions in order to treat the interrupts as they need.
On the other hand, try to switch the gprs of instead of putting it to hibernate when you finish using it. Does it help?

Best regards


Top
 OnlineProfile  
 
 Post subject: Re: Interrupt triggered SMS, ACC and RTC
PostPosted: Wed May 30, 2012 5:28 pm 

Joined: Fri Nov 25, 2011 2:28 pm
Posts: 62
libelium-dev wrote:
Hi LiamatTitan,

LiamatTitan wrote:
I have found the Utils.setMuxGPS(); call does not effect GPRS behaviour, but interestingly When I comment out intFlag &= ~(ACC_INT); and intFlag &= ~(RTC_INT);, replacing them with ACC.unsetFF(); and RTC.clearAlarmFlag(); respectively - the flags remain set... i.e. "FLAG ACC active i" and / or FLAG RTC active i" is printed when these RTC and ACC methods are used.
Are these intended to unset the flags?
These functions are not supposed to disable the flag of both RTC and ACC modules. So please uncomment the commented instructions in order to treat the interrupts as they need.
On the other hand, try to switch the gprs of instead of putting it to hibernate when you finish using it. Does it help?

Best regards


Thanks for the reply,

I uncommented the intFlag &= ~(ACC_INT) and intFlag &= ~(RTC_INT) statements. I tested the behaviour, with both the intFlag &= ~(ACC_INT) and intFlag &= ~(RTC_INT) as well as ACC.unsetFF(); and RTC.clearAlarmFlag(); used. The result is less than clear, I can best show it through some serial output:
Quote:
^^^^^^^^^^^^^^^^^^^START SETUP WINDOW^^^^^^^^^^^^^^^^^^^^^^^
ACC ON...
RTC ON...
^^^^^^^^^^^^^^^^^^^END SETUP WINDOW^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^START LOOP WINDOW^^^^^^^^^^^^^^^^^^^^^^^
ACC ints: 0
Alarm1: 20, 12:10:00 - 00:00:30

>>>>>> ACC INTERRUPT! >>>> Tuesday, 12/10/20 - 17:35.29
ACC ints: 1
GPRS module ready...
GPRS status after 'GPRS connecting...': 0.
timeout = 0
GPRS status after 'GPRS connecting...': 0.
timeout = 1
GPRS connect timed out
GPRS status after 'GPRS connect failure!': 0.
GPRS mode set to HIBERNATE
GPRS status after 'GPRS operation completed': 1.
Error powering up the GRPS module.
Multiplexer set to GPS!!!!
^^^^^^^^^^^^^^^^^^^END LOOP WINDOW^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^START LOOP WINDOW^^^^^^^^^^^^^^^^^^^^^^^
ACC ints: 1
Alarm1: 20, 12:10:00 - 00:00:30

>>>>>>>> RTC INTERRUPT! >>>> Tuesday, 12/10/20 - 17:37.30
GPRS module ready...
GPRS connected to the network
GPRS status after 'GPRS connected': 0.
Info Incoming Call OK
Info Incoming SMS OK
Text Mode SMS OK
SMS Sent OK
GPRS mode set to HIBERNATE
GPRS status after 'GPRS operation completed': 0.
Multiplexer set to GPS!!!!
^^^^^^^^^^^^^^^^^^^END LOOP WINDOW^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^START LOOP WINDOW^^^^^^^^^^^^^^^^^^^^^^^
ACC ints: 1
Alarm1: 20, 12:10:00 - 00:00:30

>>>>>> ACC INTERRUPT! >>>> Tuesday, 12/10/20 - 17:38.08
ACC ints: 2
GPRS module ready...
GPRS connected to the network
GPRS status after 'GPRS connected': 0.
Info Incoming Call OK
Info Incoming SMS OK
Text Mode SMS OK
Error sending Alarm sms
GPRS mode set to HIBERNATE
GPRS status after 'GPRS operation completed': 9.
Error powering up the GRPS module.
Error while working with SMS.
Multiplexer set to GPS!!!!
^^^^^^^^^^^^^^^^^^^END LOOP WINDOW^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^START LOOP WINDOW^^^^^^^^^^^^^^^^^^^^^^^
ACC ints: 2
Alarm1: 20, 12:10:00 - 00:00:30

>>>>>>>> RTC INTERRUPT! >>>> Tuesday, 12/10/20 - 17:39.30
GPRS module ready...
GPRS connected to the network
GPRS status after 'GPRS connected': 8.
Error while working with SMS.
Info Incoming Call OK
Info Incoming SMS OK
Text Mode SMS OK
SMS Sent OK
GPRS mode set to HIBERNATE
GPRS status after 'GPRS operation completed': 0.
Multiplexer set to GPS!!!!
^^^^^^^^^^^^^^^^^^^END LOOP WINDOW^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^START LOOP WINDOW^^^^^^^^^^^^^^^^^^^^^^^
ACC ints: 2
Alarm1: 20, 12:10:00 - 00:00:


I deduce (perhaps correctly) that the GSM flag value of 8 in the last loop is a result of the previous loops errors.

I have replaced the GPRS.setMode(GPRS_HIBERNATE); statement with GPRS.OFF(); and I've noticed a significant improvement in performance. I'll need to verify with further testing, but this issue looks (tentatively) resolved :D

I've noticed my API v24 contains a 'GPRS_OFF case' that isn't in the online API here: http://www.libelium.com/api/waspmote/cl ... 06a9aadf51
or in the changelog viewtopic.php?f=16&t=7795 which might explain some of my confusion in using GPRS power modes.
Thanks for the advice.


Top
 Profile  
 
 Post subject: Re: Interrupt triggered SMS, ACC and RTC
PostPosted: Wed Jun 06, 2012 4:20 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7830
LiamatTitan,

Sorry for the delay.

Please take into account that the API browser (Online verison of API made with Oxigen, available here) is not updated with last API version.

To be sure of what you are really doing, please always look at .cpp and .h files.

Hope your test are successful.

Any other questions please feel free to ask.

Best Regards.


Top
 OnlineProfile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 10 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use