Sources:
http://www.libelium.com/squidbee/index.php?title=How_to_set_XBee_parameters
- To send a command to the XBee: Serial.print(cmd), where cmd is a string
- A 2 second delay is required before the next command, perhaps more.
- To enter command mode: send "+++" until OK is returned.
Useful cmds (all prefixed with "AT" and suffixed by "\r" (a carriage return))
1. Check/set something (suffix with the setting)
a. BD - baud rate
b. - network id -Arduino website is down right now :(
c. CH - channel
d -
* whenever we set something, the command is sent twice...?
Configuration
2. WR - write settings to memory so power off will not erase them
3. CN - exits command mode
- after each command you should receive an OK
* instead of OK, we get a random character after ATWR, and our script completely resets...
We managed the change the baud rate setting and save it using ATWR (even with the anomaly described above), but running our 5 sine wave signal generation code seems to break the setting. We thought this was why our other XBee was not receiving anything until we realized that they were on different network IDs...
_________________________________________________________________
2/23 Chronicles: After Anand found that XBees may have a bug that prevents them from transmitting at 115200 bits/s, we tried 57600 bits/s instead and it seems to be working well! We can graph data generated by our FiveSinLongGen script nicely in Python. However, buffer overflow appears to be a potentially crippling issue, since our Python script is not processing data quickly enough as it is being sent through the air. See Python Adventures post for more information on our (possible brewing) solution!
a. BD - baud rate
b. - network id -Arduino website is down right now :(
c. CH - channel
d -
* whenever we set something, the command is sent twice...?
Configuration
Setting | PINKYX | WHITEX |
ID | 3332 | 3332 |
CH | C | C |
SH | 13A20013A20013A200 | 13A20013A20013A200 |
SL | 40998CB340998CB3 | 40998D0040998D00 |
MY | 0 | 0 |
DH | 0 | 0 |
DL | 0 | 0 |
BD | 7 | 7 |
2. WR - write settings to memory so power off will not erase them
3. CN - exits command mode
- after each command you should receive an OK
* instead of OK, we get a random character after ATWR, and our script completely resets...
We managed the change the baud rate setting and save it using ATWR (even with the anomaly described above), but running our 5 sine wave signal generation code seems to break the setting. We thought this was why our other XBee was not receiving anything until we realized that they were on different network IDs...
_________________________________________________________________
2/23 Chronicles: After Anand found that XBees may have a bug that prevents them from transmitting at 115200 bits/s, we tried 57600 bits/s instead and it seems to be working well! We can graph data generated by our FiveSinLongGen script nicely in Python. However, buffer overflow appears to be a potentially crippling issue, since our Python script is not processing data quickly enough as it is being sent through the air. See Python Adventures post for more information on our (possible brewing) solution!
No comments:
Post a Comment