hi Libelium:
I followed your suggestions to upload program in waspmote IDE example as shown below to waspmote router, in which I replace all
"xbee802" with
"xbeeZB".
I'm using windows7 64bit desktop PC.
Step 1: I use X-CTU to check the profile of my waspmote gateway as shown below. Note that its PAN ID is 0, operating 16-bit PAN ID is 7CFD and CH is 15. Accordingly I configured xbee.conf. Then I switched on waspmote router and run otap64.bat, it discovers nothing.

Step 2: I use X-CTU to re-read the profile of my waspmote gateway as shown below. To my surprise, now I find its PAN ID = 7CFD but not 0, its 64-bit PAN ID = 7CFD, its 16-bit PAN ID = B259 but not 7CFD. I only replace CH 15 with C in xbee.conf. Then I switch on waspmote router and run otap64.bat, it still discovers nothing.

Step 3: I'm thinking because my current 16-bit PAN ID = B259 in profile, so I set panID as B259 in xbee.conf. Then I switch on waspmote router and run otap64.bat, it still discovers nothing. I use X-CTU to re-read the profile of my waspmote gateway, PAN ID and Operating PAN ID of the profile of my waspmote gateway are both B259, then I make an important discovery:
After I run otap64.bat, panID in xbee.conf will become the value of PAN ID and Operating PAN ID of the profile of my waspmote gateway! otap64.bat will affect the profile of my waspmote gateway! Step 4: everything is a mess, so I reset the profile of my waspmote gateway as the original one(PAN ID=0, Operating PAN ID=E10A492ADBE26D71, Operating 16-bit PAN ID=7CFD). I configure xbee.conf (panID=0x0000, channel=0x0F). Then I switched on waspmote router and run otap64.bat, it still discovers nothing.
Step 5: I use X-CTU to set API as 1 in the profile of my waspmote gateway and repeat all the steps above, still otap64.bat discover nothing.
How can I use otap to discover waspmote node?Code:
#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
xbeeZB.init(XBEE_802_15_4,FREQ2_4G,NORMAL);
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( 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);
}