« Track Following, Take One | Main | ISR Timing and Throughts on Speed Calculation »

Sun, March 12, 2006 11:05 PM

BlueSMiRF Radio Link Problems

For the last few days, I've been having a really hard time getting the SparkFun BlueSMiRF radio to establish a link. At first I thought it was due to RF interference from the Power Board, but it had worked in the past.

After much trial and error, I narrowed it down to what I thought was this: merely initializing USART0 on the ATmega128 was enough to prevent a link from being established. If I commented out the initialization code, then ZTerm (or any other program) could make a connection to the BlueSMiRF and AT commands could be sent. I modified the firmware to allow me to initialize USART0 after establishing a link to the radio, and discovered that there was still code sending data. Once I cleaned that up (put it under the control of the global "send telemetry" flag), I could safely initialize USART0 as part of the normal startup, and subsequently connect.

My theory is that the BlueSMiRF's transmission buffer (from firmware to PowerBook) was filling up, and that somehow prevented its normal connection establishment. That, or simply writing to the buffer before a connection was established. Something along those lines.

In any case, it seems to be working well now, so hopefully we can get on with the task of improving our tracking code.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Please enter the security code you see here