Shop OBEX P1 Docs P2 Docs Learn Events
XBee as Serial Cable Replacement — Parallax Forums

XBee as Serial Cable Replacement

Bill ChennaultBill Chennault Posts: 1,198
edited 2011-11-15 18:36 in Accessories
All--

Does code--Spin, assembler, PBasic--exist that implements a serial cable using appropriate XBees?

--Bill

Comments

  • Ken GraceyKen Gracey Posts: 7,387
    edited 2011-11-13 20:58
    Hey Bill,

    I'd like to answer a question you didn't ask, but a related one. It's about what we're doing in regards to your long-standing WiFi needs and the XBee WiFi module. I have three pairs of these modules and I've put them in the following hands:
    • Phil Pilgrim, for purposes of evaluating their ability to do wireless programming in the same way the XBees 802.15.4 modules are used.
    • Chris Savage, for purposes of evaluating compatibility with our XBee adapter boards.
    • Andy Lindsay, evaluation on the Propeller Boe-Bot and Propeller BOE products.
    Last week we met with the Digi representatives to talk about how the WiFi module works, and it should be able to function just like a serial cable. The latest X-CTU has been revised so that it can also discover WiFi modules on the network, providing a simple solution for evaluating that it has a heartbeat before you get into real design.

    I'll leave your question for somebody who really understands XBees, but I think you can count on it being a serial link especially at lower baud rates with a delay between data packets.

    Ken Gracey
  • Mike GreenMike Green Posts: 23,101
    edited 2011-11-13 21:52
    Bill,
    You can configure the xBees, including the WiFi ones, on your PC using the X-CTU configuration program. You can configure them so that they start up as a wireless serial port, ready to go as a serial port replacement. On the Stamp or Propeller side of things, all you need is some serial I/O. For the Stamps, it's just SERIN and SEROUT. For the Propeller, you can use any of the serial port drivers. FullDuplexSerial and Simple_Serial work fine. All of the configuration stuff is done with standard serial I/O, so you could do it on a Stamp or Propeller as well. There's one Propeller object for the xBees. It doesn't handle the WiFi ones. Also, download and read the "Getting Started with xBee RF Modules" text
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2011-11-14 04:55
    Ken and Mike--

    Thank you both for answering my question, including the (more important) one I didn't ask!

    Ken, I remember you mentioning the possibility of Parallax support of the XBee WiFi module some time ago. I am glad to hear of further work in that area.

    --Bill
  • $WMc%$WMc% Posts: 1,884
    edited 2011-11-14 16:20
    I have the XBee WiFi Dev.Kit. part# XK2-WFT-0. Its works very well for a serial cable replacement. Easy to set-up with X-CTU.
    '
    I was looking for a WiFi device that I could access directly from my PC via WiFi.You can't do this with the XBee WiFi modules.
    '
    The RovingNetworks RN-174 and the RN-XV will do this. The RN-XV is a pin for pin drop-in for the XBee.
    '
    I'll post some more on this later.
  • Ken GraceyKen Gracey Posts: 7,387
    edited 2011-11-14 16:39
    $WMc% wrote: »
    I have the XBee WiFi Dev.Kit. part# XK2-WFT-0. Its works very well for a serial cable replacement. Easy to set-up with X-CTU.
    '
    I was looking for a WiFi device that I could access directly from my PC via WiFi.You can't do this with the XBee WiFi modules.
    '
    The RovingNetworks RN-174 and the RN-XV will do this. The RN-XV is a pin for pin drop-in for the XBee.
    '
    I'll post some more on this later.

    Hey Walt, I'd appreciate more explanation. If the XBee WiFi can be a serial cable replacement and it works with X-CTU, why can't it also talk directly to a PC ad-hoc or via a wireless access point? I think the missing piece is something we may not know much about: PC software? We're looking at these right now and I'm learning from a distance myself since I haven't actually plugged any hardware together yet.

    Thanks,

    Ken Gracey
  • Mike GreenMike Green Posts: 23,101
    edited 2011-11-14 17:37
    Ken,
    As far as I can tell from reading the documentation, the xBee WiFi modules use a proprietary protocol, not something like Telnet. As a result, you have to have an xBee WiFi module on the PC side and you can't use other manufacturer's modules with it. Also, the xBee WiFi module has no other capabilities (other than a wireless serial replacement). They're clearly easy to setup and use and (I assume) have Digi's usual quality and reliability, but they are limited in their usefulness.

    Keep in mind that, with Bluetooth, there's a well defined protocol (RFCOMM) for wireless serial I/O as well as other protocols, like those for audio or file transfers. Ethernet (and therefore WiFi) has Telnet, FTP and SFTP, and other older protocols.
  • bomberbomber Posts: 297
    edited 2011-11-14 17:41
    When the PropBOE Code becomes released to the grneral public, there is a lesson on Wireless Xbee Programming of the Propeller. This only works on the Propeller, though.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-11-14 20:09
    Bill,

    I didn't see a link to Phil's XBee program (I think Ken referred to it).

    He wrote a program that allows one to program a Propeller with a XBee.

    I haven't tried it myself yet.
  • bomberbomber Posts: 297
    edited 2011-11-14 20:28
    The program works great! This is what the PropBOE's code is based off of.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2011-11-15 06:06
    Duane--

    Thanks for the link . . . I had missed it.

    My goal is a wireless, async, full duplex link between a PC and a Prop, or between a PC and Stamp. If the latter, then the Stamp can do wireless I/O with the PC and talk to the Prop via hardwire.

    --Bill
  • $WMc%$WMc% Posts: 1,884
    edited 2011-11-15 18:36
    @ Ken
    '
    The XBee will run in ad-hoc mode but if you read the docs the XBee does not support WPA2-PSK WiFi encryption. This becomes a real pain trying to make all of your other WiFi stuff happy.
    '
    If you have a dedicated PC that does nothing else but talk to your XBee's your fine.
    '
    If you want your Prop or Stamp inside your wireless LAN.(so you can control from a desk-top,lap-top,phone,etc) The XBee WiFi is the hard way to do it.
    '
    http://ftp1.digi.com/support/documentation/doc_xbee_wifi_adhoc.pdf
    '
    I'll start a new thread on the Roving networks stuff so as not to take over Bill's thread.
    '
    Heres a screen shot of the X-CTU terminal
    1024 x 754 - 50K
Sign In or Register to comment.