quick.flutter icon indicating copy to clipboard operation
quick.flutter copied to clipboard

Getting different identifier on reconnect after connection loss.

Open sbrsubuvga opened this issue 3 years ago • 4 comments

can't get device by 'identifier' after reconnected.

val device = manager.deviceList[identifier]

be cause, getting different 'UsbDevice.identifier' on each re-connection,

so doesn't get print after reconnect,

Got this issue on android device (version 11)

sbrsubuvga avatar Jul 29 '22 13:07 sbrsubuvga

Not sure what you mean. An example may help

Sunbreak avatar Jul 31 '22 23:07 Sunbreak

@Sunbreak This issue exists, because the device is identified by its index, each time device connects and disconnects it will change the index/identifier.

To rectify this issue we have to take the device by vendor id and productid

mjafartp avatar Aug 03 '22 14:08 mjafartp

This issue is because Device ID's are not persistent across USB disconnects. should add an option to get deviceId using vendorId and productId. Then only can connect across USB disconnects. Or connection method should change to VendorId or ProductId Based.

mjafartp avatar Aug 08 '22 09:08 mjafartp

Thanks for your info. However I'm busy on work these days. Could PR on this?

Sunbreak avatar Aug 08 '22 09:08 Sunbreak