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.
12 years, 8 months ago.
Examples and Errors
Hi,
I am just starting programming xbee connections with mbed controllers. When I include the XBee header of the XBee 1.0 package there is the error identifier "_uidx" is undefined. How can I solve this problem?
Are there some basic examples how to use this classes for receiving and sending data?
Question relating to:
2 Answers
12 years, 8 months ago.
Just quickly checked, the same author has a newer version that probably will compile: http://mbed.org/users/yamaguch/code/XBee/
I couldnt find an example program to go with it, but if you just want to try some basic stuff with xbee you can just use a serial object, the default behavior of an xbee module is afaik a serial bridge, so just connecting serial port should already work. Then you can try other commands.
Thats right, but I have some trouble with the new version too. As soon as I create a XBee object my program is not executed anymore by the mbed.
I just tried using just the serial port to send data by my xbee to an API coordinator. But nearly every second message is received incorrect so I wanted to try to use the end device also in API mode. But thus I need to use one of the xbee libraries. Do you have some suggestions how to proceed?
posted by 31 Jan 201312 years, 8 months ago.
hi, u can check:
http://mbed.org/users/vcazan/notebook/mbed--xbee/
for an example
Greetings
Hi, checking the xbee code revisions from the user hiroshi yamaguchi, you can see that in the previous code of the Receive.cpp (the file that presents the error) in the Xbee library, there is a change in the first lines:
Before:
#define disableIRQ() NVIC_DisableIRQ(UARTx_IRQn[_serial.index]) #define enableIRQ() NVIC_EnableIRQ(UARTx_IRQn[_serial.index])
Now:
#define disableIRQ() NVIC_DisableIRQ(UARTx_IRQn[_uidx]) #define enableIRQ() NVIC_EnableIRQ(UARTx_IRQn[_uidx])
I change the _uidx with _serial.index and the program compiles without errors. I dont have a XBee right now to test if its funcionality is right with this change.
Greetings
posted by 31 Jan 2013