Post a new topicPost a reply Page 1 of 3   [ 28 posts ]
Go to page 1, 2, 3  Next
Author Message
 Post subject: XBee ZigBee Send and Receive Example
PostPosted: Thu Dec 01, 2011 4:00 am 

Joined: Thu Dec 01, 2011 3:46 am
Posts: 16
Hi all, the problem I am having is with the "XBee Sending and Receive Example" Codes.
http://www.libelium.com/development/waspmote/example044

The XBee.println and XBee.print commands are not working as expected. What comes out from the Serial Monitor is not readable.

I have changed to various Baud Rates but to no avail.

The only thing that seems to appear is the Test Message. The other things like RSSI, Packet ID, Network Address Origin, etc etc


Top
 Profile  
 
 Post subject: Re: XBee ZigBee Send and Receive Example
PostPosted: Fri Dec 02, 2011 4:44 am 

Joined: Thu Dec 01, 2011 3:46 am
Posts: 16
Has anyone tried this example? Does it work for you?
I am using a Windows 7 machine....could that be the problem?


Top
 Profile  
 
 Post subject: Re: XBee ZigBee Send and Receive Example
PostPosted: Fri Dec 02, 2011 2:42 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7811
Dear Itienleo,

The non readable characters are data for the Xbee module. You have to take in mind that Xbee and USB port shares the UART by default.

You can see some screenshot on point 18 of Waspmote checklist this issue. viewtopic.php?f=14&t=7700

Take a look also to the Waspmote technical guide to see how things are internally connected.

Kind regards.


Top
 Profile  
 
 Post subject: Re: XBee ZigBee Send and Receive Example
PostPosted: Sat Dec 03, 2011 8:39 am 

Joined: Thu Dec 01, 2011 3:46 am
Posts: 16
Thanks for the reply.

I am a bit confused though. Shouldn't the command XBee.print("RSSI:") cause the words "RSSI:" to appear on the serial monitor?

Have a look at the code:

http://www.libelium.com/development/waspmote/example044

The effect of the Xbee.print and Xbee.println commands should cause recognisable text to appear. Why is it not doing this? Is it some configuration that I need to do on the Serial Monitor?


Top
 Profile  
 
 Post subject: Re: XBee ZigBee Send and Receive Example
PostPosted: Sat Dec 03, 2011 8:40 am 

Joined: Thu Dec 01, 2011 3:46 am
Posts: 16
I would like to submit an Image file to this forum so that people have a clear idea of what I see on the Serial Monitor. Is this possible?


Top
 Profile  
 
 Post subject: Re: XBee ZigBee Send and Receive Example
PostPosted: Sat Dec 03, 2011 12:52 pm 

Joined: Tue Sep 20, 2011 11:47 am
Posts: 8
Hi ltienleo,
how did you test the example?
I uploaded the example sending_receiving and sending_receivingB on two different motes.
Then I connected the USB cable to the one with sending_receiving.
In my case XBee.print() is working pretty fine.
This is what i get:

~RMY ~RMY ~R R#VxTest message!¥~RMY ok
Network Address Source: 00
MAC Address Source: 013A20406FDE72
Network Address Origin: 00
MAC Address Origin: 00000000
RSSI: 24
16B(0) or 64B(1): 0
Data: Test message!
PacketID: 52
Type Source ID: 2
Network Identifier Origin: ACK

I guess the first line is the info sent to the xbee module to send the packet, then from the second line you have the XBee.print() output.
I hope this can help you.
bye


Top
 Profile  
 
 Post subject: Re: XBee ZigBee Send and Receive Example
PostPosted: Mon Dec 05, 2011 3:53 am 

Joined: Thu Dec 01, 2011 3:46 am
Posts: 16
Hi Daniele,

Thanks for the reply. Yours seems to be working as it should.
I did the same thing you did. I uploaded sending_receiving and sending_receivingB on two different motes. And I also connect the USB cable to the sending_receiving.

I have a few questions for you.

- Is this the ZigBee example you are using?
http://www.libelium.com/development/waspmote/example044
Take note that there are a few sending and receiving examples...I am using Sending and
Receiving for XBee ZigBee....there is another one for XBee 802.15.

- I am using a Windows 7 Operating System? Are you using this as well?

Regards,
Andrew


Top
 Profile  
 
 Post subject: Re: XBee ZigBee Send and Receive Example
PostPosted: Mon Dec 05, 2011 11:56 am 

Joined: Tue Sep 20, 2011 11:47 am
Posts: 8
Hello!
I am using XBee 802.15 motes and the related code.
I have Windows XP, but actually I would think that the different operating system shouldn't effect the normal functioning of the motes.
Are you using the serial monitor? maybe you can try to use hyperterminal instead.

From what you wrote ('The only thing that seems to appear is the Test Message. The other things like RSSI, Packet ID, Network Address Origin, etc etc') I have the feeling that you are only reading the data sent on the UART to the xbee module, which is correct. The part you are missing is the outcome of the XBee.print().
Are you sure you are getting to that point of the code?

If you didn't do yet, maybe you can try to put a simple print instruction at the beginning of your code.
bye


Top
 Profile  
 
 Post subject: Re: XBee ZigBee Send and Receive Example
PostPosted: Mon Dec 05, 2011 2:24 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7811
First of all, many thanks to Daniele for the reply.

ltienleo,

Quote:
I am a bit confused though. Shouldn't the command XBee.print("RSSI:") cause the words "RSSI:" to appear on the serial monitor?


Yes, these instructions are used to print text through serial. If you use the netx instruction you should get 'Hello' in your serial monitor. be sure you open your serial monitor with correct properties like baudrate, etc.

Quote:
  XBee.println("hello");



Let us know your results.

Kid regards.


Top
 Profile  
 
 Post subject: Re: XBee ZigBee Send and Receive Example
PostPosted: Tue Dec 06, 2011 2:31 am 

Joined: Thu Dec 01, 2011 3:46 am
Posts: 16
Hi Daniele,

I do suspect that the Windows OS can pose problems. You are using Windows XP while I am using Windows 7. I was afraid of this issue....can I ask if you had set your Baud Rate to the default value of 38400?

Andrew


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