Post a new topicPost a reply Page 1 of 2   [ 16 posts ]
Go to page 1, 2  Next
Author Message
 Post subject: OTA various problems
PostPosted: Fri Oct 28, 2011 11:21 pm 

Joined: Sun Oct 09, 2011 1:02 am
Posts: 18
Hi I am using the mote with ZigBee PRO. Currently I am experimenting with the OTA function without any success. I have read most of the topics related but none could solve my problem. Thought I can start a download on the motes when reaching the end I rarely get PROGRAM RECEIVED OK . When I manage to reach this point it is sometimes impossible to execute the downloaded program getting usually the “Previous Program Restored ”. The program on the Motes is the original OTA example to start the procedure.

Things that might affect are:
• I am using windows 7.
• The memory cards are 2G but NOT Transcend brand.


Top
 Profile  
 
 Post subject: Re: OTA various problems
PostPosted: Sat Oct 29, 2011 1:58 am 

Joined: Sun Oct 09, 2011 1:02 am
Posts: 18
forgot to post the code i am using
Quote:


#define key_access "LIBELIUM"
#define id_mote "WASPMOTE12345670"

void setup()
{
  SD.ON();
  USB.begin();
  USB.println("Waspmote OTA Setup\n");
  
// Write Authentication Key in EEPROM memory
  for(int i=0;i<8;i++)
  {
    Utils.writeEEPROM(107+i,key_access[i]);
  }
  
// Write Mote ID in EEPROM memory
  for(int i=0;i<16;i++)
  {
    Utils.writeEEPROM(147+i,id_mote[i]);
  }

  // Initialize Xbee module
  xbeeZB.init(ZIGBEE,FREQ2_4G,PRO);
  xbeeZB.ON();
   
  // CheckNewProgram is mandatory in every OTA program
  xbeeZB.checkNewProgram();  
}

void loop()
{
  // Check if new data is available
  if( XBee.available() )
  {
    xbeeZB.treatData();
    // Keep inside this loop while a new program is being received
    while( xbee802.programming_ON && !xbee802.checkOtapTimeout() )
    {
      if( XBee.available() )
      {
        xbeeZB.treatData();
      }
    }
  }
  // Blink LED1 while messages are not received
  Utils.setLED(LED1,LED_ON);
  delay(100);
  Utils.setLED(LED1,LED_OFF);
  delay(100);
    
}




Top
 Profile  
 
 Post subject: Re: OTA various problems
PostPosted: Tue Nov 01, 2011 12:18 pm 

Joined: Sun Oct 09, 2011 1:02 am
Posts: 18
Anyone???


Top
 Profile  
 
 Post subject: Re: OTA various problems
PostPosted: Tue Nov 01, 2011 10:59 pm 

Joined: Mon Oct 17, 2011 2:57 am
Posts: 58
I just have the similar problme, the data sent 100% to the waspmote but cannot found any file save to the sd card.

code using:
Code:
 #define key_access "LIBELIUM"
#define id_mote "WASPMOTE00000001"


 
void setup()
{
  // Write Authentication Key in EEPROM memory
  for(int i=0;i<8;i++)
  {
    Utils.writeEEPROM(107+i,key_access[i]);
  }
 
  // Write Mote ID in EEPROM memory
  for(int i=0;i<16;i++)
  {
    Utils.writeEEPROM(147+i,id_mote[i]);
  }

 
  // Inits the XBee ZigBee library
  xbeeZB.init(ZIGBEE,FREQ2_4G,NORMAL);
 
  // Powers XBee
  xbeeZB.ON();
  SD.ON();
  //xbeeZB.setAPSencryption(XBEE_ON);
  xbeeZB.checkNewProgram(); 
  delay(2000);
}

void loop()
{
 
 
  // Waiting the answer
  if( XBee.available() )
  {
    xbeeZB.treatData();
    // Keep inside this loop while a new program is being received
    while( xbeeZB.programming_ON  && !xbeeZB.checkOtapTimeout() )
    {
      if( XBee.available() )
      {
        xbeeZB.treatData();
      }
    }
  }
 
  // Blink LED1 while messages are not received
  Utils.setLED(LED1,LED_ON);
  delay(100);
  Utils.setLED(LED1,LED_OFF);
  delay(100);
  delay(5000);
 
}



can any one help?


Top
 Profile  
 
 Post subject: Re: OTA various problems
PostPosted: Wed Nov 02, 2011 11:53 am 

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

ee9vk wrote:
The memory cards are 2G but NOT Transcend brand.
I'm afraid we can't assure it works for other SD cards we don't sell.

wxwxwhy wrote:
I just have the similar problme, the data sent 100% to the waspmote but cannot found any file save to the sd card.
Does it happen all everytime?

Regards


Top
 Profile  
 
 Post subject: Re: OTA various problems
PostPosted: Wed Nov 02, 2011 12:02 pm 

Joined: Mon Oct 17, 2011 2:57 am
Posts: 58
I have use example code from waspmote ide, and the files and Folders create without problem.


Top
 Profile  
 
 Post subject: Re: OTA various problems
PostPosted: Thu Nov 03, 2011 10:26 am 

Joined: Sun Oct 09, 2011 1:02 am
Posts: 18
I managed to purchase Transcend brand 2G cards.
Still I was facing the same problem.
Tried several times until I got it working. I still don’t know how.

Now I am facing another issue.
I cannot download simultaneously in 2 or more mote with the broadcast command.
I am getting tons of errors and device not responding.


Top
 Profile  
 
 Post subject: Re: OTA various problems
PostPosted: Thu Nov 03, 2011 10:43 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7821
Dear wxwxwhy and ee9vk,

As we said, we cannot assure the SD cards you may have purchase by your own work in Waspmote correctly. These cards will probably work with our standard SD operations, but they could not work with OTA operations.

Yes, OTA also uses the SD card storage, but it uses a different library than the normal SD operations. The OTA's library for the SD card is written at low level and is more sensitive to the defective blocks that most of the normal SD cards have. So when the OTA's library for the SD card founds a defective block, it crashes, while when the "normal" SD card library would just ignore that block.

This is why we recommend to purchase our SD cards, which are provided to work without problems with the OTA operations.

Best regards


Top
 Profile  
 
 Post subject: Re: OTA various problems
PostPosted: Fri Nov 04, 2011 11:22 am 

Joined: Sun Oct 09, 2011 1:02 am
Posts: 18
Dear libelium-dev,

I think I mentioned in my previous post that I have purchased the cards you mentioned. For this reason the brand should NOT be an issue anymore. Why I cannot broadcast download on my ZigBee PRO modules?

Please advice.


Top
 Profile  
 
 Post subject: Re: OTA various problems
PostPosted: Fri Nov 04, 2011 3:37 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7821
You purchased the cards, but are you sure that the cards are suitable to work with OTA?

The point is that any SD card has defective blocks, but only in Libelium we check and preapre each SD card for OTA. We bought the same SD cards than you, but we process them inside before selling.

BR


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 2   [ 16 posts ]
Go to page 1, 2  Next


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