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.
Thanks in advance and best regards,