Shop OBEX P1 Docs P2 Docs Learn Events
XBee configuration — Parallax Forums

XBee configuration

4x5n4x5n Posts: 745
edited 2013-04-15 13:28 in Accessories
I just ordered an XBee starter set and have been doing some reading up on it. I've got a project in mind and am wondering if when changing the interface speed from 9600 baud to something high is that change saved in flash on the XBee or will I need to make the changes at every power up or reset.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-04-14 08:34
    My understanding is that the interface speed parameter to the set Baud (BD) command is stored when you use the write (WR) command and then used on reset or power up. The stored default is 9600 Baud. If you don't use the write command, any changes you make are ignored when you reset the module.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2013-04-14 11:15
    The new baud rate will take effect as soon as you exit command mode, either by timing out or by issuing the CN command. But if you want the setting to stick through a power cycle you have to include the WR command.

    If you opt for the 115200 setting, be aware that what you get is actually closer to 111111 baud.
  • 4x5n4x5n Posts: 745
    edited 2013-04-14 12:58
    The new baud rate will take effect as soon as you exit command mode, either by timing out or by issuing the CN command. But if you want the setting to stick through a power cycle you have to include the WR command.

    If you opt for the 115200 setting, be aware that what you get is actually closer to 111111 baud.

    I will be shooting for 115200 baud. I hope the timing of 111111 baud is close enough for what I'm going to be doing.

    I hoping to use these with the Radio Shack Color Computer and a PC using software package called drivewire. The idea is to have the PC (anything running Java) act as a virtual harddrive for the Coco and transfer the data via a serial port on the coco. It's working well but naturally needs a wire between the coco and pc. My hope is that I can replace the wire with a couple of XBee modules. My hope is that I'll be able to configure the XBees and plug them in and it'll work.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-04-14 13:12
    You're talking about roughly a 4% error. If the PC's clock or the RadioShack's clock is also off, that 4% error can become significant.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2013-04-14 19:10
    Will you have hardware flow control available? The XBee (as an IEEE 802.15.4 device) is not fast in comparison to say wifi or bluetooth. While the host and over-the-air baud rates may be 115200 and 230000 baud respectively, the XBee has only a 100 byte max buffer. It has to send that 100 bytes as a packet before it can accept any more data, and it indicates its ready status on its CTS (pin 12) flow control pin. If radio conditions are busy, it may take some time or multiple tries for it to get the data through. To achieve the highest throughput, you pretty much have to implement flow control back to the host.
  • 4x5n4x5n Posts: 745
    edited 2013-04-15 13:28
    Will you have hardware flow control available? The XBee (as an IEEE 802.15.4 device) is not fast in comparison to say wifi or bluetooth. While the host and over-the-air baud rates may be 115200 and 230000 baud respectively, the XBee has only a 100 byte max buffer. It has to send that 100 bytes as a packet before it can accept any more data, and it indicates its ready status on its CTS (pin 12) flow control pin. If radio conditions are busy, it may take some time or multiple tries for it to get the data through. To achieve the highest throughput, you pretty much have to implement flow control back to the host.

    The only flow control available on the Coco is CD (carrier detect). Since the "other end" will be to a PC via USB my hope is that speed, timing, etc won't be an issue. Right now the software that runs on both ends is "spray and pray". For the purposes of the testing I think we'll just start using slow data rates and increase the rate until the Coco can't keep up or we have problems because of baud rate mismatches.
Sign In or Register to comment.