I have two Cerbuino Bee with Xbee Pro 802.15.4, says node1 and node2.
My spider has two buttons and a Xbee Pro.
What I want to do is, when I push button1 the spider will send message to node1, otherwise, if I push button2, the message will send to node2.
I don’t know how to do that if I do not use API mode?
I don’t believe there’s any way to do this with the GHI driver. It assumes you’re doing a serial connection between two fixed devices that have been configured in advance with XCTU. I assume you’re using Series 1 modules. You can check out GBee on CodePlex. It has more functionality but as I recall it was only test with Series 2.
It probably wouldn’t be too hard, though, to customize the GHI driver and add a function to allow custom AT commands to be sent. “ATDH” & “ATDL” are the commands you seek.
Looks like that’s not going to work. I was hoping they were sending AT commands in the driver already but it simply sits on top of the SerialPort object. In case you don’t know, all the GHI driver source is located at:
The GHI driver is indeed just a wrapper around the serial port object, so if used you would have to construct the AT command strings yourself. This scenario would be for the “transparent” mode of the XBees. The GBee driver has all the commands built in, but only supports API mode. Series 1 XBees come set in transparent mode by default. You can set your XBees to API mode using the X-CTU tool the Digi provides. Not all supported commands are exposed using the AT commands in transparent mode. API mode gives you more functionality, and is quickly where most users end up once they’ve made it past simply sending data between two XBees. The documentation Digi provides for all of this is (IMHO) very good. For the 802.15.4 modules, it can be found here, 802.15.4 RF Modules | Multipoint Wireless Networking | Digi International
If you have any questions regarding xbee.codeplex.com driver feel free to send am email. I hasn’t been updated in a while but i think i still remember what that project was all about Also i remember the disappointment that it wasn’t picked up by anyone, especially GHI that requested it At least we had a good run with @ ransomhall
If you just want 2 xbees to talk to eachother its easiest to just send the AT commands by hand ( or use xctu and an Xbib or other adapter ) and set the destination addresses manually.
If you are wanting this to work with multiple systems, like an actual product, it’s best to have the application send the at commands on startup.
Usually you check to see if the destination address is set, if it is, you continue, if not, then you set all the parameters you need.
And Yes API mode is best if youre using it for more than a serial port