Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADK failing when reconnecting to a phone #245

Closed
Freezerohmatic opened this Issue Jun 15, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@Freezerohmatic
Copy link

commented Jun 15, 2016

Hi All,

I'm having issues with the ADK connecting to a Android phone after been disconnected by the USB cord once. The first time the phone is connected everything works fine, then if it is disconnected then reconnected, the phone does not see the arduino and it is unable to connect.

If the reset button is pressed quickly then "data is received" with the value of 0x0D and 0x04 (04 is very rare) even when no data is being sent by the phone. A long press of the reset button or a power cycle is needed to get the communication working again. This happens with all the example code.

In debug mode I sometimes get this

ADK Init
Acc.mode device detected
Got 1st bad code for config: 0D

getConf 0D

ADK Init
getDevDescr 0D

ADK Init
getDevDescr 0D

ADK Init
getDevDescr 0D

or

ADK Init
Acc.mode device detected
Configuration successful
ADK Init
Address in useData rcv. :0D
Data rcv. :0D
Data rcv. :0D
Data rcv. :0D
...

I also receive the bellow but only if the cable has been disconnected and reconnected

ADK Init
ADK protocol rev. 0002

Accessory mode switch attempt
ADK Init
ADK protocol rev. 0002

Accessory mode switch attempt

Any ideas?

Thanks in advance.

@Lauszus

This comment has been minimized.

Copy link
Collaborator

commented Jul 17, 2016

@Freezerohmatic please test if the following comment fixes your issue: #236 (comment).

@Freezerohmatic

This comment has been minimized.

Copy link
Author

commented Jul 21, 2016

@Lauszus, Thanks for for showing me that comment. While it does help (I can now reconnect sometimes) I still get the same errors, it now happens about 50% of them time.

@Lauszus

This comment has been minimized.

Copy link
Collaborator

commented Oct 12, 2017

Did you ever get this working 100 % of the time?

I believe a VBUS power switch should solve the issue: https://www.circuitsathome.com/mcu/vbus-power-control-on-usb-host-shield/.

I'm closing this issue. Feel free to re-open.

@Lauszus Lauszus closed this Oct 12, 2017

@Freezerohmatic

This comment has been minimized.

Copy link
Author

commented Oct 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.