No Nodes Discovered When Scanning - XBee 900MHz

Using OTA functions with Waspmote
Post Reply
rec1994
Posts: 19
Joined: Tue Aug 02, 2016 8:01 pm

No Nodes Discovered When Scanning - XBee 900MHz

Post by rec1994 » Tue Aug 02, 2016 8:14 pm

Hello,

I have some Waspmotes with XBee 900 MHz modules attached to them. I am trying to get OTA working with these. However, whenever I try to scan no nodes are found.

I got the OTA shell set up on the Meshlium gateway and this is what I am entering:
meshlium_3564:~# sensorParserD.sh stop
sensorParser.sh: no process killed
meshlium_3564:~# cd ../
meshlium_3564:/# cd mnt
meshlium_3564:/mnt# cd user
meshlium_3564:/mnt/user# cd otap
meshlium_3564:/mnt/user/otap# ./otap -scan_nodes --mode BROADCAST --time 30
RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0

----------------------------------------------------------------
Total Nodes: 0 - Time elapsed: 2s
----------------------------------------------------------------
No matter how many times I do that there are no nodes discovered. These are the parameters in the XBee config file on the Meshlium:
# port where the xbee moduel is connected
port = /dev/ttyS0
# auth key of network
auth_key = LIBELIUM
# pan ID of network
panID = 0x7FFF
# xbee model
xbeeModel = 900
# channel number
channel = 0x0F
# encryption of network
encryption = on
# encryption key of network
encryptionKey = WaspmoteLinkKey!
# name of the file where discarded data goes
#discardedDataFile = data.txt
# Waspmote version
WaspmoteVersion = 12
These are the parameters on the Meshlium Manager System:
Network ID: 7FFF
Node ID: meshlium
Encrypted mode: On
Encrypt key: WaspmoteLinkKey!
For now to test I just have the example code uploaded on the Waspmote which is:

Code: Select all

/*  
 *  ------ [OTA_04] - OTA basic program with XBee 900 Mhz -------- 
 *  
 *  Explanation: This program shows how build an program which supports
 *  Over The Air Programming (OTA) using XBee modules
 *  
 *  Copyright (C) 2012 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 3 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:    Yuri Carmona
 */
 


#include <WaspXBee900.h>

#define key_access "LIBELIUM"
#define id_mote "WASPMOTE00000001"

void setup()
{
  USB.ON();
  USB.println("OTA_04_900 example");

  // Write Authentication Key to EEPROM memory
  Utils.setAuthKey(key_access);
  
  // Write Mote ID to EEPROM memory
  Utils.setID(id_mote);

  // Initialize XBee module
  xbee900.ON();
   
  // CheckNewProgram is mandatory in every OTA program
  xbee900.checkNewProgram();  
}

void loop()
{
  // Check if new data is available
  if( xbee900.available() )
  {
    xbee900.treatData();
    // Keep inside this loop while a new program is being received
    while( xbee900.programming_ON  && !xbee900.checkOtapTimeout() )
    {
      if( xbee900.available() )
      {
        xbee900.treatData();
      }
    }
  }
  
  // Blink LED1 while messages are not received
  Utils.setLED(LED1,LED_ON);
  delay(100);
  Utils.setLED(LED1,LED_OFF);
  delay(100);
    
}
I should also add that I can send frames from the Waspmote to the Meshlium gateway with no problems.

Any ideas?

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: No Nodes Discovered When Scanning - XBee 900MHz

Post by libelium-dev » Wed Aug 03, 2016 3:57 pm

Hi,

Could you please check the xbees of the waspmotes are configured as AP=2?

Regards

rec1994
Posts: 19
Joined: Tue Aug 02, 2016 8:01 pm

Re: No Nodes Discovered When Scanning - XBee 900MHz

Post by rec1994 » Wed Aug 03, 2016 4:08 pm

Hi dev,

I just checked and the XBee modules are configured with AP=2.

Regards,
Robert

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: No Nodes Discovered When Scanning - XBee 900MHz

Post by libelium-dev » Thu Aug 04, 2016 12:56 pm

Hi,

You should change the AP mode of the xbee in the meshlium to AP1

Try with these code lines after killing the sensor parser,

Code: Select all

capturer s0 38400
+++ (wait to OK answer)
ATAP1
ATWR
ATWR
After doing OTA you should change again to AP0.

Hope it works now.

Regards

rec1994
Posts: 19
Joined: Tue Aug 02, 2016 8:01 pm

Re: No Nodes Discovered When Scanning - XBee 900MHz

Post by rec1994 » Thu Aug 04, 2016 4:24 pm

Hi,

I am able to discover the nodes now when scanning. Thank you very much for your help.

Regards,
Robert

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: No Nodes Discovered When Scanning - XBee 900MHz

Post by libelium-dev » Fri Aug 05, 2016 8:15 am

Glad to heard that! You're welcome!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest