Shop OBEX P1 Docs P2 Docs Learn Events
AppBee and XBee issues — Parallax Forums

AppBee and XBee issues

RiftRift Posts: 13
edited 2009-02-22 01:03 in Robotics
I'm having a pretty straight forward issues and kind of puzzled as to how to get around it.

I purchased an AppBee and an Xbee module because I wanted to setup wireless communication my BOE-BOT
and the computer. I have setup everything per the instructions in the PDF file provided on the AppBee website
but I still can't get any communication between them.

Both Xbee Modules are the same these are the following modules that I'm using

http://www.sparkfun.com/commerce/product_info.php?products_id=8742

This is the USB to Xbee board that I'm using

http://www.sparkfun.com/commerce/product_info.php?products_id=8687

Lastly is the AppBee board for the BOE.


I have these two modules setup to communicate through an SSC-32 board so I'm pretty sure there setup properly.
Not sure where to go from here any help would be greatly appreciated. If theirs any other info needed I will gladly
provide it.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-02-20 04:27
    First off, did you upgrade the firmware on the modules? Second, could you show us the code that does not work for you? You should be able to loop the tx and rx on the remote module and get echo at the computer if they are communicating. If they aren't you need to address that first. If you have the newer 2.5 modules you need to set one up as a coordinator.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen

    Post Edited (Franklin) : 2/20/2009 4:32:46 AM GMT
  • RiftRift Posts: 13
    edited 2009-02-20 04:40
    Yep I have upgraded all 3 of my modules to the 10CD firmware. All of them are configured the same as well.

    As far as the code I haven't used anything other then some of the simple programs that have been introduced in the BOE-Bot manual.
    I'm still very new to the BS2 so if there was a specific program to run I didn't know.


    Other then trying to run a program I was using the Basic Stamp Editors Identify feature to try and see if there was a connection and
    no go on that.
  • Tom CTom C Posts: 461
    edited 2009-02-20 12:25
    Rift,

    You stated that "All of them are configured the same as well."

    As Franklin said, at least one Xbee has to be configured as a coordinator and the others as router/endusers.

    The coordinator is usually attached to the PC.

    You might also want to review the instructions that I have attached below.

    Just a thought.

    Regards,

    TCIII


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!

    Post Edited (Tom C) : 2/20/2009 12:38:48 PM GMT
  • sylvie369sylvie369 Posts: 1,622
    edited 2009-02-20 14:59
    Tom C said...

    Rift,

    You stated that "All of them are configured the same as well."

    As Franklin said, at least one Xbee has to be configured as a coordinator and the others as router/endusers.

    The coordinator is usually attached to the PC.

    I believe that he's using a Series 1 XBee, based on the link he provided. With Series 1, you do not need to set up a coordinator/enduser system, but can just use them point-to-point as is.

    I wonder if the "SSC32 board" is the problem. What is that? You should be able to just connect to one XBee through the USB/XBee board, and communicate through a terminal program (either a standalone or the XCTU software, which includes a terminal program). If you can use either of those pieces of software to get the XBee to respond to "+++" and commands like "ATMY", then you're fine on that end. Make sure you're using the right Baud rate and so on. Then connecting the other XBee to a Stamp as per the Selmaware instructions .pdf and running the programs there should get you the appropriate characters on your terminal window.

    When you run a program on the Stamp that's supposed to transmit, does the red TX led on the AppBee light up? If there's an led on the receiver XBee's board, does that light up in response?
  • RiftRift Posts: 13
    edited 2009-02-20 19:57
    That's right Sylvie I am not using the series 2.5 Xbees.

    The SSC-32 board is a servo control board that also uses a serial connection, which I replaced by using two Xbees.
    http://www.lynxmotion.com/Product.aspx?productID=395&CategoryID=52

    I'm not currently using that in this loop I was just mentioned it so that everyone would know that I have gotten two Xbees to
    communicate together.

    When I plug the AppBee into the BOE board and turn it on the RX red light does turn on. But when I try to transmit something from the
    computer nothing happens.

    Iv gone in and checked that the Baudrate is set the same on both ends which is 115200 per the Xbee Spec.

    When I try to run a program from the Basic Stamp Editor nothing happens all I get is No Basic Stamp found.
  • sylvie369sylvie369 Posts: 1,622
    edited 2009-02-20 20:15
    Rift said...
    That's right Sylvie I am not using the series 2.5 Xbees.

    The SSC-32 board is a servo control board that also uses a serial connection, which I replaced by using two Xbees.
    http://www.lynxmotion.com/Product.aspx?productID=395&CategoryID=52

    I'm not currently using that in this loop I was just mentioned it so that everyone would know that I have gotten two Xbees to
    communicate together.

    When I plug the AppBee into the BOE board and turn it on the RX red light does turn on. But when I try to transmit something from the
    computer nothing happens.

    Iv gone in and checked that the Baudrate is set the same on both ends which is 115200 per the Xbee Spec.

    When I try to run a program from the Basic Stamp Editor nothing happens all I get is No Basic Stamp found.

    Are you trying to download (or is it upload? whatever...) a program to the Stamp on the BOE? I don't think that's going to work, for reasons that I'm sure someone else will explain (someone who understands them*). If you're simply trying to send data, I'd suggest a much slower Baudrate. If you're using a BS2, for example, the Stamp manual says something about even 9600 being kinda 'iffy' due to the lack of a buffer. If you're just controlling a robot, a slow speed should be fine.


    * See Mike Green's message below. That's what I would have said, if I'd known what I was talking about.

    Post Edited (sylvie369) : 2/20/2009 10:22:06 PM GMT
  • RiftRift Posts: 13
    edited 2009-02-20 20:23
    Yeah I was just trying to Download one of the programs that was taught in the BOE-BOT book to the board.


    I have even tried setting the baud rate to 9600 and nothing. Still getting no Basic stamp found.


    I basically got this setup in hopes of removing the USB tether at least that's what I thought this would do.
  • J. A. StreichJ. A. Streich Posts: 158
    edited 2009-02-20 20:49
    You can't program over XBee, the packetization gets in the way of the timing, and the thing your communicating with is an XBee which nay reoirt itself as an XBee to the BasicStamp tool. You can use it for serial debug and sending commands/info to the bot as it goes.

    You MAY be able to program the BOE from the XBee if you find another way to transmit (ignore the fact the thing attached isn't reporting to be a BS2 chip), and use a low enough Baud rate. That would likely mean writing something custom or modifying something open source. It could be a much larger task than you were expecting.

    A solution that might work for your purposes would be write/use something like FEMTO-Basic (which is for the Propeller, but something like it could be created in PBasic).
  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-20 20:53
    Ah!

    You can't use a wireless link to download to a Stamp. The timing is too tight for it to work. The xBee (and Bluetooth) packetize their data. Then assemble bits and pieces of messages into a buffer. When the buffer is full or a specified timeout occurs, the buffer gets transmitted. The receiver parcels the data out as needed. This works pretty well and mostly appears as if you have a wired serial connection between the two ends, but the timing is off a little, enough to cause errors if you try to do a download. The only fix for it is to have a smart receiver that receives the whole program to be downloaded, then pretends to be a PC to your Stamp. This was done once for a Bluetooth interface that Parallax sold for a while, but is no longer available.
  • RiftRift Posts: 13
    edited 2009-02-20 21:25
    Well that's a bummer so basically there is no simple way to remove the USB tether to the board.
    So what exactly can I still get out of this AppBee Board? Not sure what to do with it now as it
    doesn't do what I originally thought it would do.
  • J. A. StreichJ. A. Streich Posts: 158
    edited 2009-02-20 22:17
    Well the timeout can be decreased to "0" so it sends after each char, but it still wraps the char in a packet, which still has some overhead... A hardware buffer on the Bot isn't a bad idea.

    The tether is only needed while programming. Once it's out and about, the XBee can be used to send "turn left" "turn right" etc. given you write your program to read in the instructions and execute them. Moreover, XBee is two way communication, so you can get feedback from the bot.

    What was your original idea? There may still be a way of doing it.
  • RiftRift Posts: 13
    edited 2009-02-21 06:41
    Well I first thought of using the Xbee modules when I got to the Testing Speed Control With the Debug Terminal exercise in the BOE-BOT book
    and thought it would be nifty to visually see the difference in distance as you change the pulse width as opposed to making markings on the wheels
    like indicated in the book. Uploading programs to the BS2 wirelessly would have been nice.


    Ultimately what I would like to do at some point is use the BOE-BOT as a basic platform which I can build on top of and eventually control remotely.
    The AppBee seemed like a perfect solution to this. But it looks like I didn't do quiet enough research into it. I'm still very new at this especially the
    BS2.
  • sylvie369sylvie369 Posts: 1,622
    edited 2009-02-21 12:06
    I think that you're going to find that those XBees do all sorts of really cool things fairly easily - just about everything EXCEPT upload programs. If all that you want to do is remotely change the pulsewidth, just make it a variable that's read through the SERIN from the XBEE, and transmit the pulsewidths on the fly from the PC. That's no different from sending "turn left" and "turn right" commands that J.A. mentioned.

    You can do exactly what you wanted to do with the hardware you already have, and more elegantly than your original plan. I assume that the program you have that changes pulsewidth through the Debug window doesn't reload a new program each time you want to change it, right? You do the same thing, but using a terminal window and XBees.
  • J. A. StreichJ. A. Streich Posts: 158
    edited 2009-02-21 20:51
    You still can! Just because you can't program the Bot over, does't mean that you can't write program that commands and executes them.

    Store the pulse widths in variable, then run a loop like the following psuedo code:

    stamp directive for your stamp
    set pin directions and other stuff 
    define a char to read into C
    define a an int A
    
    loop:
      serin from XBee Rx pin 
      if char is linefeed or carrage return
      {
        if A in servo range
        {
          serout to servos A
          A = 0
        {
        else
        {
          error
        }
      }
      else
      {
        if char is digit (read between ASCII values of '0' and '9'
        {
          A = A*10 + (C - '0')
        {
        else
        {
          error or do something different
        }
      }
      goto loop
    
    



    Then open hyperterm (insalled as part of Windows) and start typeing in servo values.

    Actually, you can even reuse the code you already have with minor ajustments. Just be sure to use hyperterm or other serial terminal program to talk to BOE instead of trying to upload using the Basic Stamp tool.
  • RiftRift Posts: 13
    edited 2009-02-21 21:11
    Interesting I understand about half of your code haha but I will see about sorting that out.

    I don't seem to have hyperterm installed on my machine (Vista 64). Does the debug terminal
    work for this at all or is that no go as well?


    Thanks a ton for all the help from everyone!
  • J. A. StreichJ. A. Streich Posts: 158
    edited 2009-02-22 01:03
    It should work with BOE's debug window... but you'll have to make sure the code uses the right pins the AppBee's Tx and Rx or that the AppBee is plugged into the same Pins the Board of Education uses for serial.communication.
Sign In or Register to comment.