Xbee transform 0x00 in 0x80

Hello,

When i try this simple code :

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

Have you tried smaller baud rates?

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.

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 :

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

I put UART_BAUDRATE_DOUBLE_SPEED=0 due to Google Code Archive - Long-term storage for Google Code Project Hosting.

Upload the bootloader, reconfigure the xbees

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

To be clear:

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