Post a new topicPost a reply Page 1 of 1   [ 5 posts ]
Author Message
 Post subject: Problem receiving 802.15.4 data frames in meshlium
PostPosted: Wed Feb 23, 2011 1:59 pm 

Joined: Wed Feb 16, 2011 12:11 pm
Posts: 4
Hi!

I'm working with meslium, following your "Storing 802.15.4/ZigBee Sensor Data on a Database" example (http://www.libelium.com/development/mes ... torialmw03).

I have all the codes in his places, I have create de database... I think all is correct, but the only thing that I see in meshlium is:

meshlium:/mnt/user# ./sniffer_ddbb S0 localhost
Connected to database: return:

=====================================================

This is the configuration of my meshlium:

Presets: Meshlium Zigbee AP
Network ID: 1234
Channel: 0x0D
Network address: 1122
Node ID: meshlium
Power Level: 4
Encrypted mode: off
MAC HIG: 13A200
MAC LOW: 406C1BB3

======================================================

And this is de code on my waspmote, is the same that you give us in the example, but it has the configuration parameters of the 802 net in his setup function:
Code:
 
 packetXBee* paq_sent;
 int8_t state=0;
 long previous=0;
 int g=0;
 int i=0;
 char X[10];
 float value=0;
 char data[100];
 
#define  SENS_PIR       SENS_SOCKET7

uint8_t  PANID[2]={0x12,0x34};
int dirAlta = 0x22;
int dirBaja = 0x22;
char identificador[20] = "nodo1";
 
void setup()
{
  // Inits the XBee 802.15.4 library
  xbee802.init(XBEE_802_15_4,FREQ2_4G,NORMAL);
 
  // Powers XBee
  xbee802.ON();
 
  ACC.begin();    // opens I2C bus
  ACC.setMode(ACC_ON); // starts accelerometer
 
  // Chosing Channel: 0x0D
  xbee802.setChannel(0x0D);
  if( !xbee802.error_AT ) XBee.println("Channel set OK");
  else XBee.println("Error while changing channel");
 
  // Chosing a PANID : PANID=0x1234
  xbee802.setPAN(PANID);
  if( !xbee802.error_AT ) XBee.println("PANID set OK");
  else XBee.println("Error while changing PANID");
 
  // Set 0x2222 as Network Addres
  xbee802.setOwnNetAddress(dirAlta,dirBaja);
  if(xbee802.getOwnNetAddress() == 0){
    USB.print("NetAddress: ");
    for(i=0; i<2; i++) 
    {
      XBee.print(xbee802.sourceNA[i], HEX);
    }
    XBee.println("");
  }
  else{
    XBee.println("Error en getOwnAddress");
  }
 
  // Le damos al nodo un identificador
  xbee802.setNodeIdentifier(identificador);
 
  xbee802.writeValues();
  if( !xbee802.error_AT ) XBee.println("Changes stored OK");
  else XBee.println("Error while storing values");
}
 
void loop()
{
  sendData();
  delay(1000);
  Utils.blinkLEDs(100);
}
 
// sends a message changing it depending on the input option
void sendData()
{
   paq_sent=(packetXBee*) calloc(1,sizeof(packetXBee));
   paq_sent->mode=UNICAST;
   paq_sent->MY_known=0;
   paq_sent->packetID=0x52;
   paq_sent->opt=0;
   xbee802.hops=0;
   xbee802.setOriginParams(paq_sent, "SENDER", NI_TYPE);
 
   sprintf(data,"W01#ACCX#%d#ACCY#%d#ACCZ#%d%c%c",ACC.getX(), ACC.getY(), ACC.getZ(), '\r', '\n');
 
   xbee802.setDestinationParams(paq_sent, "0013A200406C1BB3", data, MAC_TYPE, DATA_ABSOLUTE);
                                         
   state=xbee802.sendXBee(paq_sent);
   if(!state)
   {
     XBee.println("OK");
   }
   free(paq_sent);
   paq_sent=NULL;
}


====================================================

The code on meshlium is the same you give us, but I have erased the reference in line 145 to the parameters "s4_id" and "s4_val". They don't appear in the rest of the code.


I can't find the problem, could you help me please?


Top
 Profile  
 
 Post subject: Re: Problem receiving 802.15.4 data frames in meshlium
PostPosted: Fri Feb 25, 2011 3:48 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 11233
There is an errata in our example code. We're going to fix it and we'll notify you when updated.


Top
 Profile  
 
 Post subject: Re: Problem receiving 802.15.4 data frames in meshlium
PostPosted: Mon Feb 28, 2011 12:00 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 11233
We've fixed the example and also checked you're code, and it works well.


Top
 Profile  
 
 Post subject: Re: Problem receiving 802.15.4 data frames in meshlium
PostPosted: Mon Feb 28, 2011 1:30 pm 

Joined: Wed Feb 16, 2011 12:11 pm
Posts: 4
Hi again!

I'm sorry but are you sure to have uploaded the fixed code to the web?

I've download it and compare it with the older version and I thing it's exactly the same.

Could you check it please?

Thank you!


Top
 Profile  
 
 Post subject: Re: Problem receiving 802.15.4 data frames in meshlium
PostPosted: Mon Feb 28, 2011 5:54 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 11233
I've re-checked it and it works. Be sure to put the MAC address of your meshlium's xbee in the waspmote code. Have you tried to put in a usb gateway to check if the problem is in the waspmote?


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