鸿蒙4.0:插入usb指纹仪,底层驱动能识别,但是ohos.usbManager.getDevices无法获取到该设备
respect_for_linus 2024-10-18 18:13:09
lsusb 能正常获取到该usb设备的pid vid,但是ohos.usbManager.getDevices无法获取到该设备。
后面换了其他usb设备插入,例如usb摄像头,ohos.usbManager.getDevices能正常获取
并且指纹插入时,我看到hilog有很多报错,截取部分片段如下:完整部分在附件
08-05 17:43:22.936 483 586 I C02500/USB_RAW_API_LIBRARY: RawInit: created default context
08-05 17:43:22.936 483 586 E C02500/USB_INTERFACE_POOL: IfFindInterfacePool:348 interface pool list is empty
08-05 17:43:22.937 483 586 E C02500/USB_RAW_API_LIBRARY: RawUsbMemFree:1604 mem is null.
08-05 17:43:22.938 483 586 E C02500/USB_RAW_API_LIBRARY: RawGetConfigDescriptor:<private> invalid param
08-05 17:43:22.939 483 586 E C02500/USB_INTERFACE_POOL: IfGetInterfacePool:760 UsbProtocalParseDescriptor failed, ret = <private>
08-05 17:43:22.939 483 586 E C02500/USB_INTERFACE_POOL: ClaimInterface:993 interfacePool or interfacePool->device is null
08-05 17:43:22.939 483 586 E C02500/Usbd: GetUsbInterfaceById: UsbClaimInterface failed
08-05 17:43:22.939 483 586 E C02500/Usbd: UsbdClaimInterfaces:GetUsbInterfaceById nullptr
08-05 17:43:22.939 483 586 E C02500/Usbd: UsbdInit:UsbdClaimInterfaces failed ret:-1
08-05 17:43:22.939 483 586 E C02500/Usbd: FunAttachDevice:UsbInit failed ret:-1
08-05 17:43:22.939 483 586 E C02500/Usbd: UsbdBulkASyncListReleasePort: port or port->bulkASyncList is nullptr
08-05 17:43:22.939 483 586 I C02500/Usbd: ReportUsbdSysEvent: UsbdDeviceCreateAndAttach failed
08-05 17:43:22.943 483 586 E C02500/usb_interface_stub: UsbInterfaceStubOpenDevice_ failed, error code is -202
08-05 17:43:22.944 707 707 E C01510/BinderInvoker: 124: SendRequest: handle=2 result = -202
08-05 17:43:22.944 707 707 E C02500/usb_interface_proxy: OpenDevice_ failed, error code is -202
08-05 17:43:22.944 707 707 E C02904/UsbService: [usb_service.cpp] GetDeviceInfo# OpenDevice failed ret=-202
08-05 17:43:22.944 707 707 I C02904/UsbService: [usb_service.cpp] AddDevice# GetDeviceInfo ret=-202
08-05 17:43:22.944 707 707 W C02904/UsbService: [usb_service.cpp] UnLoadSelf# not need unload
08-05 17:43:22.945 254 698 I C02d10/HiView-SysEventSource: Parser: parser result domain_=HDF_USB eventName_=RECOGNITION_FAIL
08-05 17:43:22.945 483 586 I C02500/USB_RAW_API_LIBRARY: RawInit: created default context
08-05 17:43:22.945 483 586 E C02500/USB_INTERFACE_POOL: IfFindInterfacePool:348 interface pool list is empty
08-05 17:43:22.946 483 586 E C02500/USB_RAW_API_LIBRARY: RawUsbMemFree:1604 mem is null.
08-05 17:43:22.947 483 586 E C02500/USB_RAW_API_LIBRARY: RawGetConfigDescriptor:<private> invalid param
08-05 17:43:22.947 483 586 E C02500/USB_INTERFACE_POOL: IfGetInterfacePool:760 UsbProtocalParseDescriptor failed, ret = <private>
08-05 17:43:22.948 254 698 I C02d10/HiView-SysEventSource: Parser: parser result domain_=HDF_USB eventName_=RECOGNITION_FAIL_STATISTICS
08-05 17:43:22.949 254 698 I C02d10/HiView-SysEventSource: CheckValidSysEvent: HandleEventJson fail
08-05 17:43:22.949 483 586 E C02500/USB_INTERFACE_POOL: ClaimInterface:993 interfacePool or interfacePool->device is null
08-05 17:43:22.950 483 586 E C02500/Usbd: GetUsbInterfaceById: UsbClaimInterface failed
08-05 17:43:22.950 483 586 E C02500/Usbd: UsbdClaimInterfaces:GetUsbInterfaceById nullptr
08-05 17:43:22.950 483 586 E C02500/Usbd: UsbdInit:UsbdClaimInterfaces failed ret:-1
麻烦大佬们分析一下
您需要先 登录 才能评论/回答
全部评论(10)
已经解决了。是oh 底层没有默认把cdc驱动编j'q
赞
2024-10-23 14:59:26
我遇到了你同样的报错打印,不过我的是CD-ROM设备,底层也能识别出CD-ROM,就是ohos.usbManager.getDevices无法获取到该设备,请问你是在哪里修改启动cdc驱动的呀
赞
只有指纹仪会出现这种情况吗?
赞
2024-10-21 11:34:07