Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Tool to Propeller via XBee — Parallax Forums

Propeller Tool to Propeller via XBee

EricREricR Posts: 35
edited 2010-07-15 10:38 in Propeller 1
I would like to eliminate the cord for Propeller Programming. I wanted to use two XBee transceivers for this. Does this sound technically feasible? Collecting data via the link while program is running would also be nice.

On the PC end, I think the Propeller Tool requires a real or virtual com port. I'm hoping a USB or Serial Development Board could work here.

On the Propeller end, the XBee® 802.15.4 (Series 1) has a 3.3V serial UART. I hope that could interface where the Prop Plug connects. Perhaps it could plug right onto the Education Kit board (see "2 ch PWM.JPG").

Has anybody done this? Any suggestions?

These are the development kits available from Digi. I'm not sure if they have all necessary software for setting up the XBee transceivers.

$129 XBee 802.15.4 (Formerly Series 1) Starter Development Kit
has 2 low power transceivers, 2 dev boards, one Serial, one USB

$179 XBee-PRO 802.15.4 (Formerly Series 1) Starter Development Kit
has 2 high power transceivers, 2 dev boards

$399 Drop-in Networking Professional Development Kit http://www.digi.com/products/wirelessdropinnetworking/dinprodevkit.jsp
has 5 transceivers

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric
754 x 538 - 107K

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-24 14:19
    There's no RF link that would work for programming the Propeller using the Propeller Tool and the built-in bootloader. The timing required just doesn't work with a packetized link like the xBee and a direct link is not reliable enough.

    If you're willing to provide your own downloader, there have been implementations of XMODEM and, I think, YMODEM protocols in Spin. It wouldn't be hard to do KERMIT and any of these would work well for wireless downloading.

    An xBee link for data works fine. BoeBotBasic (from the Object Exchange) has an option to use xBee for its "console" and that works fine.
  • EricREricR Posts: 35
    edited 2008-05-24 14:32
    Mike,

    Thank you. I hadn't thought about the packet timing issue. That makes total sense.

    I'm not sure what a downloader is. For the downloader, would I need to make binaries from the Propeller Tool, then send those over the XBee? Then at the Propeller chip end, the XBee is programmed as a downloader?

    Eric

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Eric
  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-24 14:55
    Eric,
    You need a program to run on the Propeller that's always there that takes care of receiving another program via the RF link and writing it to EEPROM somewhere other than the 32K used for the download program. If the download program is small enough, you can use the rest of the 32K as a buffer for the downloaded program. It's best to use a 64K or larger EEPROM rather than the minimum of 32K needed for the Propeller.

    There's a loader that's part of FemtoBasic that will load and run a program from an EEPROM area other than the 1st 32K
  • EricREricR Posts: 35
    edited 2008-05-24 15:25
    Thanks Mike,

    I might make the PWM program (part of a robot) look for certain data from the xBee that says 'go run the download program now'. So, in Hyperterminal on the PC, I could type "getprogram" and then the Propeller is waiting for Kermit to download a file.

    I'm programming in Spin and assembly now and loving it. I'll should look into what the FemtoBasic is about so I can extract the dowloader, or launch a Femto Basic program to do the download.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Eric
  • EricREricR Posts: 35
    edited 2008-05-25 19:26
    FYI, I checked the pin spacing specifications for the XBee modules. They have 2mm spacing, not .1 inch spacing. So, they will not plug into the Education Kit boards.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Eric
  • Bill SturmBill Sturm Posts: 11
    edited 2008-05-27 03:28
    Check here for adapter boards.

    http://www.selmaware.com/appbee/home.htm

    I don't know why the XBee uses a 2mm spacing, it sees incompatible with anything I ever use.
  • simonlsimonl Posts: 866
    edited 2008-05-27 12:55
    Yeah, I got caught out on the 2mm spacing too - ended-up getting the Sparkfun XBee breakout board and 2mm 10pin XBee Sockets

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif
  • EricREricR Posts: 35
    edited 2008-06-06 10:51
    Thanks for the references Bill and simonl. The Sparkfun and AppBee-Proto both look good for me.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Eric
  • EricREricR Posts: 35
    edited 2008-11-20 12:48
    Status Report:


    I wrote a Spin implementation of Kermit.· This is very limited Kermit, it just gets one file, that's it.· See attachment "KermitGet - Archive· [noparse][[/noparse]Date 2008.11.20· Time 03.46].zip".· It's a demo program, not a proper object, so I did not put it in the Object Forum.· This was tested on a Demo Board, via the USB cable.· The sending application was the "HyperTerminal" that comes with Win XP.· It works fine this way.

    My next step will be to try some input pins other than 30, 31 via an XBee module.· I got a pair of these in Digi's $129 XBee 802.15.4 (Formerly Series 1) Starter Development Kit ($99 on sale).· I also got a couple of the Sparkfun Xbee breakout boards, with connectors, that Simon suggested.· I plan to test this on the Demo Board also.

    I also attached a screen shot of the VGA monitor that shows the results of a Kermit file get.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Eric
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-11-20 17:32
    Very nice, it is always great to see someone working on something that hasn't been done on the Propeller yet (Kermit and wireless programming). Definitely keep us posted with your progress on wireless programming.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2008-11-21 18:53
    Eric,
    I use the XBee's all the time and they are great. In fact I use them with more than one kind of microcontroller (but mainly SX). Here is some advice for using XBee modems:
    1) Buy the $129 802.15.4 kit for testing and use. You can buy two XBee pros additionally and end up with 4 modules (2-1mW and 2-60mW) for just a little more than buying the development kit for the pro version. The development kit is nice because it comes a USB board, Serial board and a loopback connector. If you don't need that though, you can just buy two modules, You don't actually need to have a developer kit, its just nice for interfacing w/ a PC.
    2) Sparkfun has breakout boards and sockets for the narrower spaced pins.
    3) Use the AT transparent mode. Its probably sufficient for most needs, only use packet mode if you really know what you are doing.]
    4) Make sure you are buying new modules. The version A (pre dec 2007) modules can't upgrade to the newest firmware (buying from company should be fine)
    5) 802.15.4 is the best way to go most of the time. Using zigbee or digimesh seriously impairs transmission speeds (by a factor of 100 sometimes), but you can always download different firmware to change with mode you use as the 802.15.4 and digimesh modules are the same hardware w/ different firmaware
    6) These go nice with SX chips that can run at 3.3V optionally and I assume they would be great with propeller as they are 3.3V native.
    7) The XBee PRO modules are a LOT better. Not only are they more powerful, but they have a more sensitive receiver and are especially necessary if you are doing any indoor application at all.

    Hope this helps!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thomas Talbot, MD
    Gunpowder, MD, USA
  • T ChapT Chap Posts: 4,223
    edited 2008-11-21 21:26
    This may have been stated already, but if you get Xbee Pro's, you could put a spare EEPROM (or 64k boot EEPROM ), transfer the boot program over byte by byte to the spare area, confirm by whatever method you like, checksum or sending the same file twice, then once the file is received in tact, copy it from once EEPROM location to the main boot location, then reset the Prop with code. The XBee pros operate just like straight wire in the moist basic mode, it couldn't be simpler. You have choices of board mounted antenna or a tiny antenna that sticks up, or even a connector for a larger external antenna. I once tested the Pro's at 150 feet outdoors and it worked reliably. I think they have some modules that will get you miles of coverage.
  • shanghai_foolshanghai_fool Posts: 149
    edited 2008-11-23 10:08
    Does this mean it also would not work with Bluetooth?
  • EricREricR Posts: 35
    edited 2008-11-24 12:50
    Paul,·
    Thanks for your encouragement.

    Invento-O-Doc,·
    I did get the kit you mentioned, only better, it is on sale!· I got it from Digi directly, but I think it may have the old A version modules, the "IC ID" is 4214A-XBEE.· See photograph.· Yes, this is much more cost effective than paying $300 + for un-needed 5 dev boards if you want to develop ZigBee.· I am playing around with baud rates and will try the hardware flow control.· It's working pretty well in transparent mode.

    T Chapman,
    So far, the plain XBee is working well to the fartheset corner of my apartment in the range test.· Even to my car outside, about 100 feet away.· My plan is to write directly to EEPROM first, like F11.· Then (much harder), with an all Assembly version, to RAM directly, then launch the Spin interpreter.

    Shanghai_fool,
    I think Bluetooth is in the same un licensed band, but a totally different protocol.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Eric

    Post Edited (EricR) : 11/24/2008 1:09:22 PM GMT
    702 x 576 - 71K
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-11-24 14:59
    Last fall I did some range testing on these things. Using an XBee Pro (Series 1) on a BS2 board, I was able to communicate at 2400 Baud about 490 feet away, with the transmitting unit sitting on my second-story kitchen table inside a glass patio door facing the direction I was walking down the street holding the receiving unit. I didn't think at the time to check the range in the other direction (that is, with my building between the transmitter and receiver), but I was pretty impressed. It was right about at the 500 foot range that communications became flaky.
  • shanghai_foolshanghai_fool Posts: 149
    edited 2008-11-25 10:24
    FYI
    Bluetooth will work as a terminal at 110,200 baud but the proptool does not recognize it and there is no remote reset.
  • EricREricR Posts: 35
    edited 2008-12-23 13:59
    Status Report:

    Range testing at 3 feet shows 700 cps (characters per second) using XBee transparent mode, and 400 cps at 40 feet.· This is indoors with a few walls passed through, still with the lower powered plain XBee.· Baud rate is 57,600.· This is based on receiving a 6K .JPG file.· I find that sending "eeprom" and "binary" files takes about the same time for small programs.· This is because Kermit has RLE (run length encoding) compression.

    I still did not actually save to EEPROM or RAM yet!· I refined the monitor display with annotation, and now have the Kermit receive program able to receive multiple files.· Next up is to change the program a Kermit receive object that is actually useful.

    Included in the archcive is a slightly improved 'FullDuplexSerial' called "FullDuplexSerial128".· It has a 128 byte buffer and fixes a 1ms error in the receive timeout routine.· Also, it has a receive timeout routine with microseconds units for those who are really impatient smile.gif.

    The picture, "Xbee On Prop 57600.JPG", shows the result of receiving a small file with characters 0 to 50 hex.· The program is archived in "Kermit_XBee - Archive· [noparse][[/noparse]Date 2008.12.23· Time 05.20].zip".· Some test files to send from Hyperterminal are also included in the archive zip.

    Eric Ratliff

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Eric
  • Mark EdwardsMark Edwards Posts: 1
    edited 2009-01-28 21:17
    I've been following this thread before registering. Thanks for the reference to SparkFun. I have two Explorer USB interfaces coming via USPS to host my extra XBee devices. I put the 8003 DigiMesh firmware on a pair of devices (XBIB-U-DEV and XBIB-R). I couldn't get a good "range test" going as the device on the RS232 board wasn't working with the RS232 port. The "node discover" worked fine. I've dropped back to firmware 10CD. That provides a good range test. Currently, I have WIN32 code processing the API mode 2 packets. I need to perform a "node discover" capable of handling whatever arrives. The application will have a railroad locomotive performing a "node discover" to find the rail cars in the yard. The names and addresses of the nodes that reply are put in a linked list. The rail cars will have the XBee attached to a PIC18F6680 that current operates my SmartCharger. The locomotive will pass a query packet to each car (from the linked list). Each car replies with GPS LAT/LON and digital compass heading. That
    permits the locomotive to discern which cars are on the same rail as the locomotive. After sequencing the cars from the GPS data, a "wakeup" packet will be sent to the cars to boot the PC104 system to access the higher level capability (anglecock, cutlever, handbrakes). I'm going to run the RS232 at 9600 bps as currently envisioned.

    I'm hoping Digi will "fix" the DigiMesh to work with the RS232 board in the near future. It was a disappointment to find it non-functional in 8003. The mesh capability is something I really need down the road when a train grows to upwards of 200 cars.
  • EricREricR Posts: 35
    edited 2010-07-15 10:38
    FYI... I've recently been using the XBee (2 mW version) for commands and debugging info to my mobile robot. It is not always working well with this low power level.

    Perhaps a neighbor's or my WiFi is interfering. Sometimes this low power module pair has trouble 20 feet away in my Kitchen, through a wall and some cabinets. Turning power off and back on will sometimes help this. I think I will be trying the Pro version for more power. It might also be a polarization issue, now the robot's antenna is horizontal, while the fixed central antenna is vertical. It always works in the same room at 10 feet, with perhaps just one character missing out of each 200 transmitted.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Eric
Sign In or Register to comment.