felHR85 / UsbSerial

Usb serial controller for Android
MIT License
1.8k stars 585 forks source link

Correctly determine Microchip pid:vid 04d8:000a device class #255

Closed TheSven73 closed 5 years ago

TheSven73 commented 5 years ago

According to the Linux kernel tree [1], Microchip pid:vid 04d8:000a is generally a CDC ACM device, implemented by a demo firmware application.

However, some vendors have re-used this vid:pid for other types of firmware, emulating FTDI chips. The Linux kernel attempts to detect such cases by matching on interface class/subclass/proto. If these are ff/ff/00 it uses FTDI, otherwise CDC.

Mimic the Linux kernel's logic in determining whether the Microchip device is CDC or FTDI.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f08dea734844aa42ec57c229b0b73b3d7d21f810

felHR85 commented 5 years ago

Thank you @TheSven73 I will check it out as soon as possible