Add a delay on power up to avoid bricking xbee

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Add a delay on power up to avoid bricking xbee

josibarns
Hi Guys,

I have been having some trouble with my xbee. It bricks every time I power up the board, but works fine if I power up the board first and then connect the xbee. It might be some sort of signal before power issue.

I am not very familiar with C. How should I got about adding a delay of 1 second before sending a signal through the xbee? Would sleep(1000) at the beginning of telemetry.c do the trick?

Thanks,
Joseph

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: Add a delay on power up to avoid bricking xbee

josibarns
I found a solution.

in v5.0 I modified paparazzi/sw/airborne/firmware/fixedwing/main_ap.c

after line 227 #if defined DATALINK I added:
sys_time_usleep(5000000);

It works although I'm not sure it's the best fix.

On Wed, Feb 18, 2015 at 12:33 AM, Joseph Muhlhausen <[hidden email]> wrote:
Hi Guys,

I have been having some trouble with my xbee. It bricks every time I power up the board, but works fine if I power up the board first and then connect the xbee. It might be some sort of signal before power issue.

I am not very familiar with C. How should I got about adding a delay of 1 second before sending a signal through the xbee? Would sleep(1000) at the beginning of telemetry.c do the trick?

Thanks,
Joseph


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: Add a delay on power up to avoid bricking xbee

flixr
Administrator
Hi Joseph,

that sounds bit strange, I've never had this problem before...
What mode are you running the XBee in?
Do you maybe have xbee_api mode configured in your airframe file and are sending some wrong XBEE_INIT codes?

Cheers, Felix

On Thu, Feb 19, 2015 at 8:07 PM, Joseph Muhlhausen <[hidden email]> wrote:
I found a solution.

in v5.0 I modified paparazzi/sw/airborne/firmware/fixedwing/main_ap.c

after line 227 #if defined DATALINK I added:
sys_time_usleep(5000000);

It works although I'm not sure it's the best fix.

On Wed, Feb 18, 2015 at 12:33 AM, Joseph Muhlhausen <[hidden email]> wrote:
Hi Guys,

I have been having some trouble with my xbee. It bricks every time I power up the board, but works fine if I power up the board first and then connect the xbee. It might be some sort of signal before power issue.

I am not very familiar with C. How should I got about adding a delay of 1 second before sending a signal through the xbee? Would sleep(1000) at the beginning of telemetry.c do the trick?

Thanks,
Joseph


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: Add a delay on power up to avoid bricking xbee

josibarns
Hi Felix,

I am using transparent mode, I haven't been able to have my xbee 900 talk to each other in API mode using X-CTU so I gave up on the idea of using API. I did however tried to use xbee_api just to see if my xbee would brick when powering up, and it did.

This problem was common in ardupilot flight controllers and since my xbee adapter comes from an ardupilot package that may be it. I am getting another xbee adapter today, I'll see if it makes any difference.

Best,
Joseph

On Fri, Feb 20, 2015 at 3:32 PM, Felix Ruess <[hidden email]> wrote:
Hi Joseph,

that sounds bit strange, I've never had this problem before...
What mode are you running the XBee in?
Do you maybe have xbee_api mode configured in your airframe file and are sending some wrong XBEE_INIT codes?

Cheers, Felix

On Thu, Feb 19, 2015 at 8:07 PM, Joseph Muhlhausen <[hidden email]> wrote:
I found a solution.

in v5.0 I modified paparazzi/sw/airborne/firmware/fixedwing/main_ap.c

after line 227 #if defined DATALINK I added:
sys_time_usleep(5000000);

It works although I'm not sure it's the best fix.

On Wed, Feb 18, 2015 at 12:33 AM, Joseph Muhlhausen <[hidden email]> wrote:
Hi Guys,

I have been having some trouble with my xbee. It bricks every time I power up the board, but works fine if I power up the board first and then connect the xbee. It might be some sort of signal before power issue.

I am not very familiar with C. How should I got about adding a delay of 1 second before sending a signal through the xbee? Would sleep(1000) at the beginning of telemetry.c do the trick?

Thanks,
Joseph


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: Add a delay on power up to avoid bricking xbee

josibarns
An update for those who may be having the same issue. I got an xbee adapter from Gravitech.us and it fixed the issue, no delay needed.

Cheers,
Joseph

On Fri, Feb 20, 2015 at 3:47 PM, Joseph Muhlhausen <[hidden email]> wrote:
Hi Felix,

I am using transparent mode, I haven't been able to have my xbee 900 talk to each other in API mode using X-CTU so I gave up on the idea of using API. I did however tried to use xbee_api just to see if my xbee would brick when powering up, and it did.

This problem was common in ardupilot flight controllers and since my xbee adapter comes from an ardupilot package that may be it. I am getting another xbee adapter today, I'll see if it makes any difference.

Best,
Joseph

On Fri, Feb 20, 2015 at 3:32 PM, Felix Ruess <[hidden email]> wrote:
Hi Joseph,

that sounds bit strange, I've never had this problem before...
What mode are you running the XBee in?
Do you maybe have xbee_api mode configured in your airframe file and are sending some wrong XBEE_INIT codes?

Cheers, Felix

On Thu, Feb 19, 2015 at 8:07 PM, Joseph Muhlhausen <[hidden email]> wrote:
I found a solution.

in v5.0 I modified paparazzi/sw/airborne/firmware/fixedwing/main_ap.c

after line 227 #if defined DATALINK I added:
sys_time_usleep(5000000);

It works although I'm not sure it's the best fix.

On Wed, Feb 18, 2015 at 12:33 AM, Joseph Muhlhausen <[hidden email]> wrote:
Hi Guys,

I have been having some trouble with my xbee. It bricks every time I power up the board, but works fine if I power up the board first and then connect the xbee. It might be some sort of signal before power issue.

I am not very familiar with C. How should I got about adding a delay of 1 second before sending a signal through the xbee? Would sleep(1000) at the beginning of telemetry.c do the trick?

Thanks,
Joseph


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel




_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel