Post a new topicPost a reply Page 1 of 4   [ 31 posts ]
Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: SetChannel problem in 802.15.4
PostPosted: Mon Jun 07, 2010 4:48 pm 

Joined: Mon Jun 07, 2010 4:38 pm
Posts: 2
Hi,

I am a user of the WaspMote Development Kit. I have six XBee Pro Series 2 (Zigbee) modules and I am trying to start a simple communication amongst two modules using the 802.15.4 protocol.

First, I tried to establish the same network parameters in both modules by means of the "Xbee802_Creating Network" sample program. When I place the module on the mote, I always retrieve an error in the SetChannel function. I tried with and without the USB wire connection (debugging with the blinkLEDs function).

Do I need to use the X-CTU program to set a particular configuration?.

Thanks in advance.

Best regards.


Top
 Profile  
 
 Post subject: Re: SetChannel problem in 802.15.4
PostPosted: Mon Jun 07, 2010 4:56 pm 

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

You should use the ZigBee example, not the 802.15.4 example.

ZigBee selects automatically the channel, that is the reason why you can't set it using the API functions.

Regards


Top
 Profile  
 
 Post subject: Re: SetChannel problem in 802.15.4
PostPosted: Tue Jun 08, 2010 1:23 pm 

Joined: Mon Jun 07, 2010 4:38 pm
Posts: 2
Hi Libelium team,

Thanks for your fast response. I have one more question. Can I use the 802.15.4 protocol with my Zigbee modules?. Thanks in advance.

Regards.


Top
 Profile  
 
 Post subject: Re: SetChannel problem in 802.15.4
PostPosted: Tue Jun 08, 2010 4:17 pm 

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

IEEE 802.15.4 is the protocol over which ZigBee has been implemented.

So, they are two different protocols and they cannot be used together.

Regards


Top
 Profile  
 
 Post subject: Re: SetChannel problem in 802.15.4
PostPosted: Wed Jun 09, 2010 1:06 pm 

Joined: Tue May 25, 2010 12:17 pm
Posts: 73
Hello,

I think zigbee just adds a higher layer. Like it uses the 2 layers from ieee802.15.4 and a top layer. So with zigbee you are still using 802.15.4. What I am trying to say is that you should do fine with zigbee if your inicial idea was to use 802.15.4. I think the only problem with zigbee is the synch but it is possible to do using the RTC from waspmotes.

Hope I helped a bit.
Best regards,
João Ferreira


Top
 Profile  
 
 Post subject: Re: SetChannel problem in 802.15.4
PostPosted: Mon Jun 14, 2010 4:27 pm 

Joined: Tue May 25, 2010 12:17 pm
Posts: 73
Not really on topic but also about choosing a channel for the network.

I am trying to do the energyscan and I still havent figure out how does it work. I have 2 motes on the same networks working with the values saved and working. And now I code one mote to do a energychannelscan but I only get zeros.

//Channel scan
xbee802.setScanningChannels(0xFF, 0xFF);
xbee802.setDurationEnergyChannels(10);
xbee802.getScanningChannels();
for(i=0; i<=15; i++)
{
printInteger(xbee802.energyChannel[i],1);
}

This is the code I am using is it right? Also can you explain how does he do the energychannel scan.

On other note again with same motes I defined the network and I configure the 2 motes for working on it. When I do the brothers scan I sometimes have good results like the first or the second time the code runs and than it stops detecting the other mote. Can you give some ideas why is it working like that?

Thanks for the help.
Best regards,
João Ferreira


Top
 Profile  
 
 Post subject: Re: SetChannel problem in 802.15.4
PostPosted: Mon Jun 14, 2010 4:34 pm 

Joined: Tue May 25, 2010 12:17 pm
Posts: 73
So just you have an idea what is happening I will post the code and what I read on the serial monitor..

uint8_t i,j, RSSI_r;
uint8_t network_address[2];
char network_identifier[20];

void setup()
{
//Inits UART1
beginSerial(38400,1);

// Inits the XBee 802.15.4 library
xbee802.init(XBEE_802_15_4,FREQ2_4G,NORMAL);

// Powers XBee
xbee802.ON();
}

void loop()
{
//SCAN THE NETWORK
xbee802.scanNetwork();
if(xbee802.totalScannedBrothers>0)
{
printString("Brothers found: ",1);
printInteger(xbee802.totalScannedBrothers,1);
printNewline(1);
i=xbee802.totalScannedBrothers;

printString("Network address: ",1);
network_address[0]=xbee802.scannedBrothers[i-1].MY[0];
printInteger(network_address[0],1);
network_address[1]=xbee802.scannedBrothers[i-1].MY[1];
printInteger(network_address[1],1);
printNewline(1);

printString("Network identifier: ",1);
for(j=0; j<=20; j++)
{
network_identifier[j]=xbee802.scannedBrothers[i-1].NI[j];
printByte(network_identifier[j], 1);
}
printNewline(1);

printString("RSSI: ",1);
RSSI_r=xbee802.scannedBrothers[i-1].RSSI;
printInteger(RSSI_r,1);
printNewline(1);
i--;
}
else
{
printString("Brothers found: ",1);
printInteger(xbee802.totalScannedBrothers,1);
printNewline(1);
}

delay(1000);

}

Brothers found: 1
Network address: 02
Network identifier: sensornode-02#
RSSI: 41
Brothers found: 0
Brothers found: 0


Top
 Profile  
 
 Post subject: Re: SetChannel problem in 802.15.4
PostPosted: Mon Jun 14, 2010 4:59 pm 

Joined: Tue May 25, 2010 12:17 pm
Posts: 73
update: now I change the code on the other mote (the one that I want to find) and I upload the test code the one that says the MAC ADDRESS. Now the results are different:

Brothers found: 1
Network address: 255255
Network identifier: sensornode-02#
RSSI: 42
Brothers found: 2
Network address: 255255
Network identifier: sensornode-02#
RSSI: 41
Brothers found: 1
Network address: 255255
Network identifier: sensornode-02#
RSSI: 40

So sometimes it founds and additional node (this node doesnt exist) and it mistakes te network address. The RSSI looks fine I think.

Again thanks for the time.
Best regards,
João Ferreira


Top
 Profile  
 
 Post subject: Re: SetChannel problem in 802.15.4
PostPosted: Fri Jun 18, 2010 11:34 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
JFerreira wrote:
Not really on topic but also about choosing a channel for the network.

I am trying to do the energyscan and I still havent figure out how does it work. I have 2 motes on the same networks working with the values saved and working. And now I code one mote to do a energychannelscan but I only get zeros.

//Channel scan
xbee802.setScanningChannels(0xFF, 0xFF);
xbee802.setDurationEnergyChannels(10);
xbee802.getScanningChannels();
for(i=0; i<=15; i++)
{
printInteger(xbee802.energyChannel[i],1);
}

This is the code I am using is it right? Also can you explain how does he do the energychannel scan.

On other note again with same motes I defined the network and I configure the 2 motes for working on it. When I do the brothers scan I sometimes have good results like the first or the second time the code runs and than it stops detecting the other mote. Can you give some ideas why is it working like that?

Thanks for the help.
Best regards,
João Ferreira


Hi,

Please try to call the function 'setDurationEnergyChannels' with a lower input parameter because '10' is too high. I think a value around 1-3 should be enough.

Regards


Top
 Profile  
 
 Post subject: Re: SetChannel problem in 802.15.4
PostPosted: Fri Jun 18, 2010 11:41 am 

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

The 'scanNetwork' problem is very strange...could you explain more detailed your codes and the different adresses you have set in each XBee?

Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 4   [ 31 posts ]
Go to page 1, 2, 3, 4  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:


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