altera2015 / usbserial

Flutter Android USB Serial plugin
BSD 3-Clause "New" or "Revised" License
121 stars 83 forks source link

Device - GetInterfaces #17

Closed broberts-nybble closed 4 years ago

broberts-nybble commented 4 years ago

Is it possible to expose the call to list the device interfaces?

altera2015 commented 4 years ago

Looking at the USB Serial code https://github.com/felHR85/UsbSerial/blob/05936835859973ac78214809aab2d3eea02acbb6/usbserial/src/main/java/com/felhr/usbserial/SerialPortBuilder.java#L185

I can do getInterfaceCount. Would that help?

broberts-nybble commented 4 years ago

yes please

ghost commented 4 years ago

I currently have a device that has 3 interfaces on a single serial port, the 'getInterfaceCount' would help so that I know how many items I would have to loop through. Ideally though we could have more information when the 'listDevices' returns its list of devices.

Is there any chance this feature would be looked at and potentially implemented?

Thanks for your time! Michael

altera2015 commented 4 years ago

I've added this as a UsbDevice.interfaceCount property. (release upcoming)