Dear Libelium-dev
Here is my xbee.conf
Code:
# port where the xbee moduel is connected
port = COM7
# auth key of network
auth_key = LIBELIUM
# pan ID of network
panID = 0x1234
# xbee model
xbeeModel = 802.15.4
# channel number
channel = 0x13
# encryption of network
encryption = off
# encryption key of network
encryptionKey = 1234567890123456
# name of the file where discarded data goes
#discardedDataFile = data.txt
I don't use any encryption.
For the OTA guide, I have read it a lot of times, trying to find out any solution.
The communication between the mote and the gateway works perfectly, I can receive sensor data from the Events Board.
The -scan_nodes works, as I explained in my previous post, but still, I can't upload a new program on the mote.
I saw somewhere in the forum, that AmroQuandour has posted this:
Quote:
assume you have a 2GB SD card for the waspmote right?
Anyway, sometimes after initializing the SD card OTAP worked. so try the code which I used in the video but add the following in void setup():
Code:
SD.ON();
but it didn't help at all.
I have tried the send command with your code:
Quote:
/*
* ------Waspmote OTA set up Example------
*
* Explanation: This example shows how to set up Waspmote for operating
* with OTA (Over The Air Programming). This code is valid for XBee 802.15.4
*
* This code writes OTA's Authentication Key and Mote ID in EEPROM memory
* This code can be used as a template to develop any other code that
* provides OTA functionality.
*
*
* Copyright (C) 2011 Libelium Comunicaciones Distribuidas S.L.
* http://www.libelium.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Version: 0.1
* Design: David Gascón
* Implementation: Alberto Bielsa, Yuri Carmona
*/
#define key_access "LIBELIUM"
#define id_mote "WASPMOTE00000001"
void setup()
{
USB.begin();
USB.println("Waspmote OTA 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]);
}
// Initialize Xbee module
xbee802.init(XBEE_802_15_4,FREQ2_4G,NORMAL);
xbee802.ON();
// CheckNewProgram is mandatory in every OTA program
xbee802.checkNewProgram();
}
void loop()
{
// Check if new data is available
if( XBee.available() )
{
xbee802.treatData();
// Keep inside this loop while a new program is being received
while( xbee802.programming_ON && !xbee802.checkOtapTimeout() )
{
if( XBee.available() )
{
xbee802.treatData();
}
}
}
// Blink LED1 while messages are not received
Utils.setLED(LED1,LED_ON);
delay(100);
Utils.setLED(LED1,LED_OFF);
delay(100);
}
and other code as well, but I get the same result.
I will try to reformat the sd card and see what happens, this is the only thing I can think of right now.
As soon as I try this, I will let you know.
Best regerds.
P.S the microSD card is from libelium.