Closed NortacYWang closed 1 year ago
Hello, I use an usb and it has been detected , and I logged usbDevice: (firstDriver.getDevice());
UsbDevice[mName=/dev/bus/usb/002/002, mVendorId=1155, mProductId=22336, mClass=2, mSubclass=2, mProtocol=0, mManufacturerName=STMicroelectronics,mProductName=STM32 VirtualComPort, mVersion=2.00,mSerialNumberReader=android.hardware.usb.IUsbSerialReader$Stub$Proxy@8406b31, mHasAudioPlayback=false, mHasAudioCapture=false, mHasMidi=false, mHasVideoCapture=false, mHasVideoPlayback=false, mConfigurations=[ UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=50,mInterfaces=[ UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=2,mSubclass=2,mProtocol=1,mEndpoints=[ UsbEndpoint[mAddress=130,mAttributes=3,mMaxPacketSize=8,mInterval=16]] UsbInterface[mId=1,mAlternateSetting=0,mName=null,mClass=10,mSubclass=0,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=1,mAttributes=2,mMaxPacketSize=64,mInterval=0] UsbEndpoint[mAddress=129,mAttributes=2,mMaxPacketSize=64,mInterval=0]]]]
I see in devices.filter, the ST CDC(1155/22336) is supported,
UsbDeviceConnection connection = usbManager.openDevice(firstDriver.getDevice())
but still the connection returns null, can someone help me with this ?
Thanks
my bad, I need to requestPermission to usb if connection return null
Hello, I use an usb and it has been detected , and I logged usbDevice: (firstDriver.getDevice());
I see in devices.filter, the ST CDC(1155/22336) is supported,
but still the connection returns null, can someone help me with this ?
Thanks