Post a new topicPost a reply Page 1 of 2   [ 13 posts ]
Go to page 1, 2  Next
Author Message
 Post subject: Wrong OTAP output for "scan_nodes" (Win / Linux)
PostPosted: Thu Sep 29, 2011 2:14 pm 

Joined: Mon Jul 18, 2011 1:43 pm
Posts: 13
Hello,

We have been doing some tests with OTAP over the following Zigbee (XBEE PRO S2) devices:
1 x Waspmote gw (Coordinator)
1 x Waspmote End device

This is the output obtained:

Code:
root@bt:~/otap# ./otap -scan_nodes --mode BROADCAST --time 10

----------------------------------------------------------------
Total Nodes: 1 - Time elapsed: 17s
0   - Node 007d33a200406972 - ?WASPMOTE0000000 - x?????? - READY


The mac displayed is not correct (only some bytes match the real value), either the Mote id and the program name.

The program on the waspmote is the following:

Code:
#define key_access "LIBELIUM"
#define id_mote "WASPMOTE00000001"
long previous = 0;

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(ZIGBEE,FREQ2_4G,NORMAL);
  xbeeZB.ON();
   
  // CheckNewProgram is mandatory in every OTA program
  xbeeZB.checkNewProgram(); 

  // Blink LED1 while messages are not received
  Utils.setLED(LED1,LED_ON);
  delay(100);
  Utils.setLED(LED1,LED_OFF);
  delay(100);
}

void loop()
{
  previous=millis();
  while((millis()-previous) < 6000)
  {
    while( XBee.available() )
    {
      xbeeZB.treatData();   
    }
  }   
}


The xbee.conf is as follows:

Code:
# port where the xbee moduel is connected
port = /dev/ttyUSB0
# auth key of network
auth_key = LIBELIUM
# pan ID of network
panID = 0x1020
#xbeeModel = 802.15.4, ZB, DM, 868, 900
xbeeModel = ZB
# channel number
#channel = between 0xB and 0x1A
channel = 0x12
# encryption of network
encryption = off
# encryption key of network
encryptionKey = 1234567890123456
# name of the file where discarded data goes
#discardedDataFile = data.txt


Does anybody know how to fix it?

Thanks in advance


Top
 Profile  
 
 Post subject: Re: Wrong OTAP output for "scan_nodes" (Win / Linux)
PostPosted: Wed Oct 05, 2011 1:47 am 

Joined: Wed Nov 10, 2010 9:45 am
Posts: 271
Location: Australia
It used to happen to me but I don't think it's a major issue. Re-scan several times and see if it displays the right information again. I have a video on youtube where I used OTAP it would be good to check it out if you are just starting with it.

http://www.youtube.com/AmroQuandour


Top
 Profile  
 
 Post subject: Re: Wrong OTAP output for "scan_nodes" (Win / Linux)
PostPosted: Wed Oct 05, 2011 10:16 am 

Joined: Mon Jul 18, 2011 1:43 pm
Posts: 13
Hi AmroQuandor,

As you said, we've been re-scaning several times (5-6) and always get the same result (bad MAC address, Waspmote_id and program_name).

Thanks for your help ;).


Top
 Profile  
 
 Post subject: Re: Wrong OTAP output for "scan_nodes" (Win / Linux)
PostPosted: Thu Oct 06, 2011 5:38 am 

Joined: Wed Nov 10, 2010 9:45 am
Posts: 271
Location: Australia
Can you try to make a unicast scan for a specific node using this command and see whether or not the RSSI lights flash on the Waspmote: -

Code:
./otap -scan_nodes --mode UNICAST --mac <PUT MAC ADDRESS> --time 3


if it you see RSSI are flashing. then try to send a program to the same waspmote and open serial monitor to see if the program is received successfully.


Top
 Profile  
 
 Post subject: Re: Wrong OTAP output for "scan_nodes" (Win / Linux)
PostPosted: Fri Oct 07, 2011 1:29 pm 

Joined: Mon Jul 18, 2011 1:43 pm
Posts: 13
I have tried the unicast scan and the RSSI leds flash, but the output of the scan is still wrong.

I have also tried to send a program (a very light one):

Code:
./otap -send --file test.cpp.hex --mode UNICAST --mac 013a2004069729c --deliveries 1 --pid prog001


The RSSI leds flash duirng some time but some time they switch off, before the sending has finished:

Code:
Device doesn´t reponds
Delivery error: 24 seconds
[Sending] - 100% 68 seconds elapsed
Finished. Number of packets sent: 33
Node response: xPROGRAM RECEIVED ERROR


Apparently the sending process finishes but not successfully.


Top
 Profile  
 
 Post subject: Re: Wrong OTAP output for "scan_nodes" (Win / Linux)
PostPosted: Fri Oct 07, 2011 5:00 pm 

Joined: Tue Oct 04, 2011 10:13 pm
Posts: 13
007d33a200406972 looks like a wrong MAC address, it normally starts from 0013************* or something similar. I do not think you can upload file into end device in this case. Try to reconfigure your XBEE PRO S2 device.


Top
 Profile  
 
 Post subject: Re: Wrong OTAP output for "scan_nodes" (Win / Linux)
PostPosted: Tue Oct 11, 2011 11:16 am 

Joined: Mon Jul 18, 2011 1:43 pm
Posts: 13
Problem Solved.

The problem was in the API mode.

First I tried with both the Mote GW and the Mote End Device in API mode 1, and the Scan Nodes didn't work.

Then I tried with both in API mode 2, and the output was wrong.

The last and successfull test has been with Mote GW in API mode 1 and End Devices in API mode 2.

Code:
0   - Node 0013a2004069729c - WASPMOTE00000001 - ??????? - READY


Thanks to everybody for their help.

Cheers


Top
 Profile  
 
 Post subject: Re: Wrong OTAP output for "scan_nodes" (Win / Linux)
PostPosted: Mon Oct 17, 2011 2:53 pm 

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

Good to hear you solved the problem.

Best regards


Top
 Profile  
 
 Post subject: Re: Wrong OTAP output for "scan_nodes" (Win / Linux)
PostPosted: Mon Apr 30, 2012 7:55 am 

Joined: Mon Apr 02, 2012 6:57 am
Posts: 61
idi wrote:
Problem Solved.

The problem was in the API mode.

First I tried with both the Mote GW and the Mote End Device in API mode 1, and the Scan Nodes didn't work.

Then I tried with both in API mode 2, and the output was wrong.

The last and successfull test has been with Mote GW in API mode 1 and End Devices in API mode 2.

Code:
0   - Node 0013a2004069729c - WASPMOTE00000001 - ??????? - READY


Thanks to everybody for their help.

Cheers

code pls , i have this same problem , need help!!!


Top
 Profile  
 
 Post subject: Re: Wrong OTAP output for "scan_nodes" (Win / Linux)
PostPosted: Thu May 03, 2012 5:17 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7440
Dear idi,

Could you please share the final code you built with the rest of the users? It will be instructive.

@justforfun, idi is saying that (among other things), he changed the API mode in his XBees. Have you tried that?

Best!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 2   [ 13 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:
cron


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