Shop OBEX P1 Docs P2 Docs Learn Events
Xbee 900HP Digital Input/Output Line Passing - digi answer ! — Parallax Forums

Xbee 900HP Digital Input/Output Line Passing - digi answer !

Rick EisRick Eis Posts: 15
edited 2013-12-27 12:02 in Accessories
Wondering if anyone has been succesful in getting an XBee 900HP working with Digital Input/Output Line Passing something like this link below ? Ha...maybe it is not even possible with these modules?

http://www.digi.com/support/kbase/kbaseresultdetl?id=2188

T
hanks in advance for your help,

Rick

Comments

  • Rick EisRick Eis Posts: 15
    edited 2013-06-05 09:37
    Rick Eis wrote: »
    Wondering if anyone has been succesful in getting an XBee 900HP working with Digital Input/Output Line Passing something like this link below ? Ha...maybe it is not even possible with these modules?

    http://www.digi.com/support/kbase/kbaseresultdetl?id=2188

    T
    hanks in advance for your help,

    Rick

    Here is an answer from the digi folks on the topic:

    [FONT=Calibri, sans-serif]"Thank you for contacting Digi. No, the XBee 900 HP does not support the direct DIO line passing functions of the XBee 802.15.4 modules as described in that article. It requires the use of over the air commands sent using our API interface in order to adjust its IO lines"[/FONT]

    [FONT=Calibri, sans-serif]I was disappointed the 900 HP does not support direct DIO line passing, simply because there a few examples out there I might be able to glean from. However, I was happy to learn that it appears with the API interface I might be able to do my immediate goal.[/FONT]

    I'm reading about the API interface in the manual [FONT=Calibri, sans-serif]90002173_E dated [/FONT]April 30, 2013 on page 57[FONT=Calibri, sans-serif]. API Operation[/FONT].
    [FONT=Calibri, sans-serif]Unfortunately, I only understand a portion of what I am reading.[/FONT]

    [FONT=Calibri, sans-serif]I keep thinking my goal to turn on and off a remote led at the range of these modules should be simple?

    Can anyone point a newbie like me to some helpful info or help me directly with the few (I'm sure it is only a few?) basic configurations to make something like this happen?

    Thank you in advance,

    Rick
    [/FONT]
  • Rick EisRick Eis Posts: 15
    edited 2013-06-06 17:36
    So my goal for now has been to get apair 900HP modules to turn a remote led on and off.


    I'm am very new to Xbee's so realize I have a big learning curve :)


    In communication with the digi folks itappears they are saying, “It requires the use of over the air commands sent using our API interface in order to adjust its IO lines”


    I dont really understand all that. So I read about the API interface in the manual 90002173_E dated April 30,2013 on page 57. API Operation. Unfortunately, I still only understand a portion of what I am reading.


    I asked for some samples to learn a bit more about the API interface and received the following;


    “I am sorry but I don’t have any sample applications I can provide you for that. But I would recommend just connecting an LED to DIO 0. Then use the Digi API frame maker located at http://www.digi.com/support/kbase/kbaseresultdetl?id=3215 to help you generate the proper frames needed to set the DIO 0 line to a DIO Output high and DIO output low. By doing this, you will turn on and off the LED connected to DIO 0.”


    So now on top of the API learning curve I add the API framemaker....can't seem to find much on that either. So I ask digi for more specific help on my little led project and receive the following:


    “In the Digi API Frame maker select the Device Type as 900, in Frame Type you will get the list of API's which the 900 module supports.
    Select the frame which you need for your application and fill the details and select "Build Packet, you will get the full frame. “



    Ha....not even sure what to do with the packet even if I knew what parameters to use ? :)


    However,I must be getting closer to the simple goal of using a 900HP to turn on and off a remote led, but I am not sure :(


    Any help with this would be appreciated? Until then I will keep reading and learning ?


    Is anyone else working with the 900HP's ?

    Does anyone have any projects they are working on and willing to share their success ?



    Thanks


    Rick
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-06-07 10:00
    Rick Eis wrote: »
    Is anyone else working with the 900HP's ?

    Rick

    Rick, I have a set of the 900HP Modules here and will be working with them more this weekend. I will try to post back after I've had a chance to work with them.
  • Rick EisRick Eis Posts: 15
    edited 2013-06-07 10:36
    Hey thanks Chris,

    Yes, I probably should have started with one of the other modules that has been around for a while with many proven examples posted and written about all over.

    I like the distance capability of these little guys. And my imediate goal of turning on and off a remote led seems simple and specific enough. It's just one big learning curve all at once for me.

    The digi guys I'm sure are pulling their hair out with my "simple" questions.

    So here is their latest help (see below) for my specific goal - I am hoping to get some time this weekend to digest and apply what Jeremy from digi shares....

    Thanks again Chris,

    Rick

    ++++++++



    The idea of API mode is that instead of just a serial stream that automatically gets sent to the remote radio you send packets of hexadecimal data that can do many different things depending on what you send. If you go to X-CTU and set the radio which is plugged into your computer to API mode you can then send commands from you local radio to any radio on the network (no matter what mode the remote radios are in.) You can set the API mode with the ATAP 1 setting.
    To send the actual commands one easy way is to use the X-CTU terminal. In the terminal tab click the assemble packet button and then select the HEX option on the lower right. You will type or copy the entire packet into this window and then click the send data button to send it to the radio.
    And the final tool is the frame maker or user manual. To assemble the packet the easy way is to use the frame maker. ftp://ftp1.digi.com/support/utilities/digi_apiframes2.htm It will automatically compute the frame length and checksum for you as well as list all the options available for your packet. Select the 900 option in the upper right. Look at the list in the upper left drop down. You will only send the first five options (those less than 0x80) the other options are packets you will get back from the radio. We want to turn on a DIO pin an operation we could normally do with an AT command so we will select the remote AT command option (0x17.)
    The 0x17 Remote AT Command option allows you to execute any AT command on any node of your network. The Bytes in this command are as follows. 7E is the start packet delimeter and will be in all packets. The length is how long the packet is and will be computed by your aplication or the frame maker. the API field, in this case 17, tells the radio what command you want to run. frame id is a value for your convenience, any response from the remote radio will contain this same frame id, you can thus use this value to know which packets were succesful by matching frame ids between the sends and responses. the address field is where you want to execute the command; on the 900HP set the 64 bit address to the serial number of the radio where you want the command to execute and the 16 bit address to FFFE. CmdOptions tells the radio if it should wait on this change or apply it immediately we want to make the change right away so we set these bytes to 02. The AT command parameter is the two letter AT code of the option we wish to change; to turn on an led on pin 18 the command would be D2. The AT CmdData is what we send to the command; to turn on the pin we would send 5, which is digital output high. and last we have the checksum which the frame builder will compute for us.
    Having enetered all the data we click build packet and we have the hex values in the bottom box to send to the radio. select everything in the box and copy it into X-CTUs assemble packet window (you will need to paste by right clicking as X-CTU doesn't support the ctrl+V keyboard shortcut.
    If all went well your led should be on. Turning it off again I will leave to you.
    let me know if you have any questions.
    -Jeremy
    Digi Technical Support



  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-06-07 11:49
    Thanks, I will try to provide a blinking LED example for you. Just to clarify, you're trying to do this directly from the XBee, not a microcontroller connected to the remote XBee, correct?
  • Rick EisRick Eis Posts: 15
    edited 2013-06-07 14:12
    Chris,

    That is correct, no microcontrollers. This project consists of one switch connected to one 900HP that will be able to turn on and then off, the LED connected to the other 900HP. (Not simply a blinking LED).

    As close to these examples as we can get only with the 900HP

    http://examples.digi.com/sensors/802-15-4-digital-input-with-a-button/

    http://examples.digi.com/lights-motors-more/802-15-4-digital-output-with-an-led/

    Thanks again,

    Rick
  • CreeCree Posts: 132
    edited 2013-07-16 11:06
    I am trying to do the same thing at the moment also. If I figure anything out I'll post it here.
  • CreeCree Posts: 132
    edited 2013-07-17 06:22
    Here is a link to the manual, on page 78 there is something about an LED.

    http://ftp1.digi.com/support/documentation/90002173_B.pdf

    B
    ut I think it has more to do with monitoring sleep mode than just sending signals to turn on/off an LED.
  • DanielsonDanielson Posts: 1
    edited 2013-12-20 22:46
    Hi,

    Did you guys succeeed on getting this work? I recently got a pair of Xbee 900HP S3B modules, and would like to setup an experiment like this. I'm having trouble getting it work.
  • bsnutbsnut Posts: 521
    edited 2013-12-21 00:19
    Thanks, I will try to provide a blinking LED example for you. Just to clarify, you're trying to do this directly from the XBee, not a microcontroller connected to the remote XBee, correct?
    I will love to see this done, because I was wanting see if was able to be done.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-12-23 04:43
    I think I didn't get back to it because I misunderstood the original intention of the OP. I will see if I can try something later today on this.
  • electromanjelectromanj Posts: 270
    edited 2013-12-27 08:58
    I keep thinking my goal to turn on and off a remote led at the range of these modules should be simple?

    Maybe this will help.

    Turn on LED at DIO12.

    I tested this on the XBIB-U-DEV development board http://ftp1.digi.com/support/documentation/xbibudev_referenceguide.pdf, which has an led attached to DIO 12. DIO needs to be low to light led.

    7E 00 10 17 01 00 13 A2 00 40 93 7A 26 FF FE 02 50 32 04 3A

    7E: start delimiter
    00 10: Frame Length. number of bytes between Frame Length and checksum. (Hex)
    17: Remote At command
    01: Frame Id for response. Set to 00 for no response
    00 13 A2 00 40 93 7A 26: 64 bit address of destination radio. This is the serial number on the back side of the xbee.
    FF FE: 16 bit address of the destination radio. Default setting, haven't had any problems leaving as is.
    02: Apply Changes.
    50 32: Hex equivalent of ASCII P2. P2 is the AT Command for DIO 12.
    04: Digital Output Low.
    3A: Checksum: Add all bytes between Frame Length and Checksum. Keep only the last 8 bits and subtract the remainder from FF.
    Ex: Message bytes = 4C5. Drop the 4. FF - C5 = 3A.
    To verify the checksum add the remainder and the checksum and you should get FF. C5+3A = FF.

    To turn off the LED change the 04 to 05 and recalculate the Checksum.
    I tested this with 3 xbees networked together in API mode. Only the xbee that has the correct serial number is affected.

    To make it even easier, download the latest version of X-ctu. It is AWESOME!!!!! http://www.digi.com/support/productdetail?pid=3352&osvid=57&type=utilities
    The frame generator is really easy to work with. All you really need to do is put in the dest. address, and the AT command. You can choose what type of Frame you want to create from the drop down menu at the top of the generator.

    Hope this helps.
    traVis.
    1024 x 744 - 102K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-12-27 12:02
    That is very interesting information, indeed! I wasn't aware of the new version of X-CTU with the newer features. Thanks traVis!
Sign In or Register to comment.