0

I have a system with a server (a personal computer with an XBee Dongle plugged in, running a Java program) and some Boe-Bots with XBees attached and Arduino programs. I know how to get the Boe-Bots to send a message to the server. I want the server to obtain the Boe-Bot's XBee's physical address so that it can send a message to that particular Boe-Bot with the Java method
com.digi.xbee.api.XBeeDevice.sendData(RemoteXBeeDevice remoteXBeeDevice, byte[] data) knowing what argument to put for remoteXBeeDevice.

I can think of two ways this might be possible.

1) There might be a method in the Arduino XBee library to obtain an XBee's physical address. Then the Boe-Bot can get its own address and send it in a message to the server. I have not found such a method.

2) On the server side, there might be a method in the Java XBee library that allows it to automatically determine the physical address of a client that is communicating with the server. I thought that XBeeMessage.getDevice() was such a method, but it returned a RemoteXBeeDevice with an XBee64BitAddress of FFFFFF... which is not the proper address of the Boe-Bot's XBees.

Does anyone know the correct Arduino method for option 1 or the correct Java method for option 2?

Edit: XBee S1

  • What XBees are you using? – Majenko Aug 9 '17 at 15:49
  • XBee S1 for both the server and robots. – Taha Ghassemi Aug 12 '17 at 18:10
0

First you can check the signal received from the xbee connected with the server by using coolterm or arduino serial monitor. This is to ensure there are connections between the two xbees.

Then, you will receive some funny characters which is normal, you need to change these characters into hexadecimal form which is more preferable to use coolterm as it has the ability to do so.

Laslty, the characters received will be about 21 characters long. It starts with 7E as a starting character. That is what I received when using XBee S2. These characters then can be translated into other form.

I would suggest a book entitled Wireless Sensor Network by Robert Faludi to understand more.

|improve this answer|||||
  • I am looking for a method where I could just load the Arduino code onto the robots and start the server and it would work. I don't want to find the address of each robot manually. Is such a thing possible? – Taha Ghassemi Aug 28 '17 at 8:33
  • It would be possible if there is the exact code that apply the same thing. However, there is high chances that there is not. You need to configure every pins that changes when a signal is sent. You need to understand the configuration and then apply it in your code. – Muhammad Aug 29 '17 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.