Gents, I've found a solution for who's having problems with the xBee being corrupted when starting Ardupilot.

Everytime I had to pull of the blue wire to not damage my xBee, but now I found a solution.

I've added a delay command right before the serial initialization serial.begin() in the setup() session of ardupilot.

Looks like that:

void setup() {
#if GPS_PROTOCOL == 0
delay(3000);
Serial.begin(FIFTY_SEVEN_K_BAUD);
#endif
#if GPS_PROTOCOL == 1
delay(3000);
Serial.begin(FIFTY_SEVEN_K_BAUD);
#endif
#if GPS_PROTOCOL == 2
delay(3000);
Serial.begin(THIRTY_EIGHT_K_BAUD);
#endif
#if GPS_PROTOCOL == 3
delay(3000);
Serial.begin(THIRTY_EIGHT_K_BAUD);
#endif
#if GPS_PROTOCOL == 5
delay(3000);
Serial.begin(THIRTY_EIGHT_K_BAUD);
#endif

init_ardupilot();
}

That causes a 3 seconds delay during the initialization, allowing the modem to startup before sending the serial init.

Cheers,
Leonardo

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Yes, I am having the same problem. I call DIgi (also I have the new firmware for the Xbee Pro 900 DP ver. 1051 Beta if anyone needs it, PM me)
    I have to flash the firmware on the Xbee everytime I run the Ardupilot 2.6.2 and use the Xbee.

    That didn't fix the problem, so its on to the code....
    The tech at Digi told me it sounds like Xbee is getting the command "ATRW" in the command line some where. He said that would clear it out of the Xbee and cause this problem. I have yet to find it.

    Jason
  • Moderator
    Is anybody else still experiencing problems with their xbee "bricking" if they leave it connected at start-up while using code v2.6?
  • Yes, thermopiles...
  • Moderator
    @John,

    Are you using thermopiles, or IMU?
  • Looks like this already got integrated into the SVN checkout for 2.6

    Nice...this one has caused me a lot of frustration!

    JC
  • 3D Robotics
    Sweet! We'll test that and add it if it works on all our setups...

    Many thanks!
This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…