ODROID-N2 USB Accessory reconnect issue

Post Reply
jsiebert
Posts: 3
Joined: Tue Oct 27, 2020 8:18 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

ODROID-N2 USB Accessory reconnect issue

Post by jsiebert »

Hi everyone,

for a project in our company we connect DJI Remote Control devices for DJI Mavic 2 drones to ODROID-N2 boards. Until now we used quite an old 32 bit Android image from ODROID (20190820) with the modifications mentioned here as a basis for our application.

Today I wanted to upgrade to the latest 64 bit Android image (20201015). Basically everything works fine except for one thing: When I switch off the remote control (not pulling the USB cable!) and turn it on again the remote control is no longer recognized by the Android system until I reboot it. This worked flawlessly with the older image (20190820) and is a required functionality for our use case.
Interestingly, if I pull the USB from the remote control and plug it afterwards (without switching off and on), the remote control is recognized again, without rebooting the system.

I did a little bit of research and here is what I've found so far:
  • The issue first occurred with the ODROID Android image version 20191028.
  • With image versions 20191028 and 20201015 the USB_ACCESSORY_ATTACHED intent action does not seem to be sent from the Android base system when I reconnect the remote control by switching it off and on again.
  • On image version 20191028 (same for 20201015) I recognized that /sys/class/android_usb/android0/subsystem/android0/state sticks to "DISCONNECTED" and /config/usb_gadget/g1/idProduct sticks to "0x4e40" after switching the remote control off and on again
  • On image version 20190820 (same for 20201015) /sys/class/android_usb/android0/subsystem/android0/state switches to "CONFIGURED" and /config/usb_gadget/g1/idProduct switches to "0x2d01" after switching the remote control off and on again
  • Side note: the remote control connects to the ODROID board as a USB host.
I don't have any further ideas on how to solve this issue as its root cause seems to be buried deeper in the Android base system. I'm looking for help from the community and maybe the ODROID devs can have a look at this as well...

Thanks in advance and best regards,

Jens

jsiebert
Posts: 3
Joined: Tue Oct 27, 2020 8:18 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: ODROID-N2 USB Accessory reconnect issue

Post by jsiebert »

Here's an update on the topic:

This morning I tested our use case, as described above, with an ODROID-N2+ board (HW rev. 0.5.20200406) and Android image version 20201015. With this combination of hardware and software the issue described above does not occur! I validated my result with another N2 board (HW rev. 0.4.20190207) and Android image version 20201015 where the issue did occur again like on the other N2 board that I used for my first tests. I don't have a second N2+ board at hand to validate my results any further but I'm pretty confident that the issue won't occur on other N2+ boards as well.

I hope that these results might be of any help for further investigation of this issue.

Thanks and best regards,

Jens

mad_ady
Posts: 8831
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 586 times
Been thanked: 531 times
Contact:

Re: ODROID-N2 USB Accessory reconnect issue

Post by mad_ady »

The difference might be in the dtb, since otherwise the Android binaries are the same...
These users thanked the author mad_ady for the post:
jsiebert (Tue Nov 03, 2020 3:02 am)

jsiebert
Posts: 3
Joined: Tue Oct 27, 2020 8:18 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: ODROID-N2 USB Accessory reconnect issue

Post by jsiebert »

Hi @mad_ady,

thanks for your reply and your suggestion. In the meantime we have decided to replace the original N2 boards with N2+ boards. So no further investigation of this issue is necessary.

Thanks again and best regards,

Jens

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 2 guests