Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 5 months ago.
Sample broadcast example
Hi, i am trying to use this sample. But i am having a hard time using it, to start the sample program you provided to test broadcast does not work on my mbed. When i look at the TX data sent to the xbee, i see does not have the address and frame ID in the data.
Did you encounter such problem?
I have tested my xbees with the X-CTU software and they are properly set to communicate.
Thanks
Question relating to:
1 Answer
10 years, 5 months ago.
Hi Christian,
The example works OK for me on the particular board that I'm using. I've got a more fully features version of the example which includes more diagnostics - I wanted to keep the example you've been looking at simple and to the point but I'll upload the other one later.
When you say that the TX to the XBee doesn't include the address and frame ID, can I ask how you're monitoring the transfer? The library uses the XBee's API mode, so the address and frame ID aren't transferred as strings - if you're using a terminal emulator or somesuch which only displays ASCII that may be why you don't see them.
Thanks,
John
Hi, i am monitoring the TX pin of the mbed. I am seeing the start byte, size, frameid ans message... I dont see the address and option bytes.
posted by 27 Jun 2014That makes me remember, i forgot to mention that i get a compiler warning about the virtual fonction call for this line: /* Get the next chunk of data from the frame object */ p_cmd->getDataPtr( written, &cmdData, &buffer_len ); in XbeeDevice.cpp
I don't know if this helps you or not. Also i am using the mbed.
posted by 27 Jun 2014Hi Christian,
That's a good spot - I've been using GCC for development recently and it doesn't get unhappy about that glitch - Keil compiler spots it for the problem it is.
I've updated the library and tested the broadcast example using the on-line compiler rather than GCC - seems to be working again (XBee interfacing to XCTU on the other end sees the message).
Thanks for letting me know about the issue and sorry if you've wasted time on it - do let me know if you run in to anything else.
John
posted by 27 Jun 2014I've also posted the other example code that I mentioned - see https://mbed.org/users/johnb/code/XBeeApiBroadcastExample/
posted by 27 Jun 2014