milador / RaspberryPi-Joystick

A virtual HID USB joystick created using Raspberry Pi
MIT License
117 stars 29 forks source link

Android compatibility #18

Closed silviacesari95 closed 3 years ago

silviacesari95 commented 3 years ago

Hi, I'm trying to test it on android phone but the phone doesn't recognize it as a controller, it recognize it as a power charger. Running the demo python script i receive error 108. Is there a way to fix it?

milador commented 3 years ago

This code is not tested on android phones. Are you using a splitter with power source? Phone can't provide enough power for the raspberry pi. Also made sure you are using kernel 5.10.11. The new kernels have an issue which I am trying to fix.

silviacesari95 commented 3 years ago

Raspberry is powered by a phone charger of 2.0A without splitter. I tried on 2 phones with kernels 4.19.81 and 4.14.113, and now I found how to let it work. If I connect first the "usb-C-usbA otg" to the phone and then the usb A from the raspberry to the adapter it works, instead if I connect first the adapter to the usbA and than to the phone it doesn't work.

milador commented 3 years ago

Oh you are talking about Android kernel. I am glad it worked. The cable connection order is important and I remember having similar issue with other devices.