Go Down

Topic: Xbee transform 0x00 in 0x80 (Read 948 times) previous topic - next topic

jlouis

Hello,

When i try this simple code :
Code: [Select]

void setup() {
  Serial.begin(115200);
}

void loop() {
  Serial.write((uint8_t)0);
  delay(1000);
}


With this configuration :

X-CTU - driver FTDI 2.8.14 - Mega 2560 - Xbee shield - Xbee 1mw s1   
<-->     
Xbee 1mw s1 - Xbee Usb Explorer - driver FTDI 2.8.14 - X-CTU


the byte 0x00 is transformed in 0x80 on the receiver
In the attachment, COM8 is the sender, COM7 the receiver.

Can someone confirm and/or explain ?

Jérôme

bubulindo

Have you tried smaller baud rates?
This... is a hobby.

48X24X48X

It might be the XBee module baud rate itself. Also check the baud rate in the X-CTU is the one matches the module baud rate.

jlouis

In fact, i want to wireless upload my mega 2560 via xbee and the bootloader is 115200 baud.

I've verified at 57600, and all is OK.
I've compiled the bootloader with this options in the Makefile at line 341 :

Code: [Select]

mega2560: CFLAGS += -D_MEGA_BOARD_ -DBAUDRATE=57600 -DUART_BAUDRATE_DOUBLE_SPEED=0 -fno-inline


I put UART_BAUDRATE_DOUBLE_SPEED=0 due to http://code.google.com/p/arduino/issues/detail?id=394

Upload the bootloader, reconfigure the xbees

All is OK, avrdude can communicate via xbee
Thank you very much
Jérôme

syrinx

To be clear:
- go in: C:\...\Arduino\arduino-1.0.3\hardware\arduino\bootloaders\stk500v2
- modify the makefile as said
- write "make mega2560"

Go Up