P PicTech Member Licensed User Longtime User Feb 2, 2020 #1 Hi everyone, I want to build a project that will use a PIC24FJ32GB002 microcontroller in USB Host mode and on the other side an Android tablet in USB Device (Slave) mode. On the PIC24 side, my code works well, it detects the tablet and can communicate in HID. Now the question is how to write my program in B4A to make the tablet in USB HID Device mode and be able to receive and transmit frames of 64 bytes in both directions initiated by the PIC24? I have searched a lot here but all examples of USB seem to be USB Host only. Thank you for your precious help!
Hi everyone, I want to build a project that will use a PIC24FJ32GB002 microcontroller in USB Host mode and on the other side an Android tablet in USB Device (Slave) mode. On the PIC24 side, my code works well, it detects the tablet and can communicate in HID. Now the question is how to write my program in B4A to make the tablet in USB HID Device mode and be able to receive and transmit frames of 64 bytes in both directions initiated by the PIC24? I have searched a lot here but all examples of USB seem to be USB Host only. Thank you for your precious help!
Erel B4X founder Staff member Licensed User Longtime User Feb 3, 2020 #2 There is no API in Android that allows you to implement a HID device. The accessory framework: https://developer.android.com/guide/topics/connectivity/usb/accessory which is available with the USB library might be relevant. Upvote 0
There is no API in Android that allows you to implement a HID device. The accessory framework: https://developer.android.com/guide/topics/connectivity/usb/accessory which is available with the USB library might be relevant.
P PicTech Member Licensed User Longtime User Feb 4, 2020 #3 Hi Erel, Thanks for the track "Usb Accessory", I saw that it is the right one but I did not manage to put all the pieces of the puzzle together. I would like to find a functional basic project to help me. I keep searching! Richard Upvote 0
Hi Erel, Thanks for the track "Usb Accessory", I saw that it is the right one but I did not manage to put all the pieces of the puzzle together. I would like to find a functional basic project to help me. I keep searching! Richard