Post a new topicPost a reply Page 1 of 1   [ 10 posts ]
Author Message
 Post subject: Scan_nodes problem
PostPosted: Wed Jul 04, 2012 9:44 pm 

Joined: Tue Jun 19, 2012 4:10 pm
Posts: 6
Hi Libelium,

I want to do the programming of waspmotes wirelessly, I downloaded the OTA-Shell v0.1-b70, I managed to see the screen that gives me options (delete program, get boot list, info program, new config, reset, etc.) when I want identify existing nodes, it tells me there is not. I have read the documentation and have followed the steps described there. I am working with ZigBee XBP24-ZB configured as router API and Gateway set as coordinator API.

Kind Regards


Top
 Profile  
 
 Post subject: Re: Scan_nodes problem
PostPosted: Thu Jul 05, 2012 8:38 am 

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

Lets try this tips before going further.

Did you test communication between Waspmote and gateway with Zigbee code examples?
If communication was successful, did you change Waspmote code?
On the other hand, could you post your XBee.conf file? Try with no encryption first.

Let us know.

Regards


Top
 Profile  
 
 Post subject: Re: Scan_nodes problem
PostPosted: Thu Jul 05, 2012 3:50 pm 

Joined: Tue Jun 19, 2012 4:10 pm
Posts: 6
Hi,

The communication between Waspmote and gateway is succesfull. Yes, the code has been changed and still works. The xbee.conf below:

# port where the xbee moduel is connected
port = COM4
# auth key of network
auth_key = L[/code]IBELIUM
# pan ID of network
panID = 0x0102
# xbee model
xbeeModel = ZB
# 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

The gateway is connected in port COM4.

Regards


Top
 Profile  
 
 Post subject: Re: Scan_nodes problem
PostPosted: Fri Jul 06, 2012 8:20 am 

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

Your configuration seems OK.

What OTAP command are you using? Maybe you are missing some parameter.

Try in broadcast mode with this command: ./otap -scan_nodes --mode BROADCAST

Let us know.

Regards.


Top
 Profile  
 
 Post subject: Re: Scan_nodes problem
PostPosted: Mon Jul 09, 2012 3:23 pm 

Joined: Tue Jun 19, 2012 4:10 pm
Posts: 6
Hi,

The command I used is as follows ./otap -scan_nodes --mode BROADCAST. But out on the screen that there are no nodes, I have the Waspmote on.

Regards


Top
 Profile  
 
 Post subject: Re: Scan_nodes problem
PostPosted: Tue Jul 10, 2012 4:37 pm 

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

You can use also UNICAST mode to test if your node is present.

Could you post the code you are running on Waspmote?

Regards


Top
 Profile  
 
 Post subject: Re: Scan_nodes problem
PostPosted: Tue Jul 10, 2012 5:30 pm 

Joined: Tue Jun 19, 2012 4:10 pm
Posts: 6
Hi,

The code running in Waspmote is below:

Code:
packetXBee* paq_sent;
int8_t state=0;
long previous=0;
char aux[100];
float humEnv;
float temp;
float hum_1;
float hum_2;
float hum_3;

char _humEnv[6]="";
  char _temp[7]= "";
  char _hum_1[10]="";
  char _hum_2[10]="";
  char _hum_3[10]="";
  char _bat;
 
#define key_access "LIBELIUM"

uint8_t direccion[8]={0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF};

void setup(){
 
  PWR.ifHibernate();

  // Store key access in EEPROM
  for(int i=0;i<8;i++){
    Utils.writeEEPROM(i+107,key_access[i]);
  }

  USB.begin();
  SensorAgr.setBoardMode(SENS_ON);
  delay(1000);

  SensorAgr.setSensorMode(SENS_ON, SENS_AGR_TEMPERATURE);
  SensorAgr.setSensorMode(SENS_ON, SENS_AGR_HUMIDITY);
  SensorAgr.setSensorMode(SENS_ON, SENS_AGR_WATERMARK_1);
  SensorAgr.setSensorMode(SENS_ON, SENS_AGR_WATERMARK_2);
  SensorAgr.setSensorMode(SENS_ON, SENS_AGR_WATERMARK_3);
  delay(2000);
 
  RTC.ON();
 
  ACC.ON();
 
  XBee.setMode(XBEE_ON);
  XBee.begin(9600);
  delay(1000);
  XBee.print("+++");
  delay(2000);
  XBee.println("ATBD5,AP2,WR,CN");
  delay(150);
 
  XBee.setMode(XBEE_OFF);
  XBee.close();
   
  delay(5000);

  xbeeZB.init(ZIGBEE,FREQ2_4G,NORMAL);
 
  xbeeZB.ON();
 
  delay(1000);
   }

void loop(){

  temp=0;
  humEnv=0;
  hum_1=0;
  hum_2=0;
  hum_3=0;
 
  temp=SensorAgr.readValue(SENS_AGR_TEMPERATURE);
  USB.print("Temperatura: ");
  USB.println(temp);
  humEnv=SensorAgr.readValue(SENS_AGR_HUMIDITY);
  USB.print("Humedad: ");
  USB.println(humEnv);
  hum_1=(SensorAgr.readValue(SENS_AGR_WATERMARK_1));
  USB.print("Humedad de Suelo: ");
  USB.println(hum_1);
  delay(1000);
  hum_2=(SensorAgr.readValue(SENS_AGR_WATERMARK_2));
  USB.print("Humedad de Suelo: ");
  USB.println(hum_2);
  delay(1000);
  hum_3=(SensorAgr.readValue(SENS_AGR_WATERMARK_3));
  USB.print("Humedad de Suelo: ");
  USB.println(hum_3);
  delay(1000);
 
  Utils.float2String(temp,_temp,2);
  Utils.float2String(humEnv,_humEnv,2);
  Utils.float2String(hum_1,_hum_1,2);
  Utils.float2String(hum_2,_hum_2,2);
  Utils.float2String(hum_3,_hum_3,2);
 
 sprintf(aux,"$5$%s$%s$%s$%s$%s",_humEnv,_temp,_hum_1,_hum_2,_hum_3);
  USB.print("Mitad de la trama: ");
  USB.println(aux);
  auxFunction();
  USB.print("Trama enviada: ");
  USB.println(aux);
  paq_sent=(packetXBee*) calloc(1,sizeof(packetXBee));
  paq_sent->mode=BROADCAST;
  paq_sent->MY_known=0;
  paq_sent->packetID=0x52;
  paq_sent->opt=0;
  xbeeZB.hops=0;
  xbeeZB.setOriginParams(paq_sent,MAC_TYPE);
  xbeeZB.setDestinationParams(paq_sent, direccion, aux, MAC_TYPE, DATA_ABSOLUTE);
  xbeeZB.sendXBee(paq_sent);
 
  free(paq_sent);
  paq_sent = NULL;
 
  if( intFlag & HIB_INT )
  {
    hibInterrupt();
  }
 
  PWR.hibernate("00:00:30:00",RTC_OFFSET,RTC_ALM1_MODE2);
}

void auxFunction(){
sprintf(aux,"%s$%s$%s$%s$%s$%s$%d\r\n",aux,"","","","","",PWR.getBatteryLevel());
}

void hibInterrupt()
{
  //Utils.blinkLEDs(1000);
  //Utils.blinkLEDs(1000);
  intFlag &= ~(HIB_INT); 
}


Regards


Top
 Profile  
 
 Post subject: Re: Scan_nodes problem
PostPosted: Tue Jul 10, 2012 5:43 pm 

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

I did not looked deeply into your code, but try without hibernating.

Ensure Waspmote is ON (and also XBee module) when you look for the node.

Regards.


Top
 Profile  
 
 Post subject: Re: Scan_nodes problem
PostPosted: Thu Jul 19, 2012 5:57 pm 

Joined: Tue Jun 19, 2012 4:10 pm
Posts: 6
Hi,

After some testing I managed to identify the nodes but now the problem is that doesn't tell me the mac address of the xbee, tells me a different. The Mac is 0013a200407acb56 and tells me the mac 007d33a200407acb. Besides this I tried to load a program, then I have identified the location of the file. Hex and when I try to load it tells me the file doesn't exist.

the code used is:

./otap -send --file sd.hex --mode BROADCAST --mac 000000000000FFFF --pid prog001

and the result is

File doesn't exist
The file doesn't exist
The file doesn't exist

Kind Regards


Top
 Profile  
 
 Post subject: Re: Scan_nodes problem
PostPosted: Mon Jul 23, 2012 10:27 am 

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

All XBee macs should begin 0013a20040 XXXXXX. Is it possible that maybe other Zigbee devices are present in your place? Try using X-CTU tool to read XBee MAC address. Also there are some specific AT commands (see SH and SL on Digi's documentation).

Regarding your file problem, be sure you are using right file (must be file.cpp.hex). This is a generic command:

./otap -send --mode UNICAST --file fileOTA.cpp.hex --mac 0013a20040524123 --channel 0x0--pid prog001

Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 10 posts ]


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