Connection and disconnection

Post Reply
markpaxton
Posts: 2
Joined: Fri Aug 26, 2011 8:58 am

Connection and disconnection

Post by markpaxton » Fri Aug 26, 2011 9:16 am

Hello,

I've built a device using thet USB host board, based roughly on the DemoKit implementation, but I'm having a few troubles when connecting and disconnecting the device.

Basically, if you unplug the device and plug it back in again it does't reconnect to Android, but it seems only on certain occasions. I think it is blocking on acc.read, and when it's unplugged it just stays there.

Any suggestions?

Cheers,
Mark

paul
Site Admin
Posts: 733
Joined: Mon May 12, 2008 4:19 pm

Re: Connection and disconnection

Post by paul » Mon Aug 29, 2011 11:20 am

We have found that connecting the demo app is slightly klugey too, and requires a couple of trys sometimes.
I believe this is all on the Android side and is going to take some low-level debugging to find.

Sorry to not have a more helpful news.

Paul

markpaxton
Posts: 2
Joined: Fri Aug 26, 2011 8:58 am

Re: Connection and disconnection

Post by markpaxton » Wed Aug 31, 2011 8:57 am

Thanks for the help anyway; it does seem a little related to the board as well though as when the board first powered up, or when I start the serial console it connects ok, but if I pull the plug from the phone and re plug, it's unreliable and the board hangs up.

Something I have noticed is that the button on my board appears not to do anything - should it reset the arduino? I always use usb power, so unless it's related to that, I'm a bit confused about what the button is for. If I could use it to reset the board and make it be a "reconnect" button then that would be a big help.

paul
Site Admin
Posts: 733
Joined: Mon May 12, 2008 4:19 pm

Re: Connection and disconnection

Post by paul » Wed Aug 31, 2011 9:03 am

markpaxton,

It does reset the board - you won't see it in the status LEDs though - They are just RX, TX and Power. Try a meter on the reset pin. It should be high, and you should see it go low on reset button press.

Paul

Post Reply