T113 Tina otg gadget uvc失败
-
参考了《Linux_USB_开发指南.pdf》,其中mass storage已经成功
log:[ 30.608897] rmmod_host_driver [ 30.608897] [ 30.615506] [ehci0-controller]: sunxi_usb_disable_ehci [ 30.621256] [sunxi-ehci0]: remove, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xc0c6be88 [ 30.630996] sunxi-ehci 4101000.ehci0-controller: remove, state 4 [ 30.637701] usb usb3: USB disconnect, device number 1 [ 30.644409] sunxi-ehci 4101000.ehci0-controller: USB bus 3 deregistered [ 30.652214] [ohci0-controller]: sunxi_usb_disable_ohci [ 30.657952] [sunxi-ohci0]: remove, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xc0c6c118 [ 30.667684] sunxi-ohci 4101400.ohci0-controller: remove, state 4 [ 30.674437] usb usb4: USB disconnect, device number 1 [ 30.681026] sunxi-ohci 4101400.ohci0-controller: USB bus 4 deregistered [ 32.528909] usb1-vbus: disabling [ 34.248882] [ 34.248882] insmod_device_driver [ 34.248882] [ 34.256049] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator [ 34.427355] sunxi_set_cur_vol_work()489 WARN: get power supply failed [ 34.514007] android_work: sent uevent USB_STATE=CONNECTED [ 34.575763] configfs-gadget gadget: high-speed config #1: c [ 34.582056] android_work: sent uevent USB_STATE=CONFIGURED [ 37.024543] random: crng init done
然后再尝试uvc失败了,pc上没有识别:
log:
[ 130.902109] configfs-gadget gadget: uvc: uvc_function_bind() [ 141.897361] rmmod_host_driver [ 141.897361] [ 141.903971] [ehci0-controller]: sunxi_usb_disable_ehci [ 141.909723] [sunxi-ehci0]: remove, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xc0c6be88 [ 141.919462] sunxi-ehci 4101000.ehci0-controller: remove, state 4 [ 141.926168] usb usb3: USB disconnect, device number 1 [ 141.932870] sunxi-ehci 4101000.ehci0-controller: USB bus 3 deregistered [ 141.940680] [ohci0-controller]: sunxi_usb_disable_ohci [ 141.946416] [sunxi-ohci0]: remove, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xc0c6c118 [ 141.956154] sunxi-ohci 4101400.ohci0-controller: remove, state 4 [ 141.962907] usb usb4: USB disconnect, device number 1 [ 141.969512] sunxi-ohci 4101400.ohci0-controller: USB bus 4 deregistered [ 145.537351] [ 145.537351] insmod_device_driver [ 145.537351] [ 145.544516] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator [ 206.524188] random: crng init done
从mass storage改成uvc设备重启过,然后configfs也重新配置过了。log对比看起来uvc模式都没有建立连接,大佬帮忙看看问题可能在哪里?
-
是还需要在应用层运行什么程序吗?
-
configfs配置完成后,/dev/video2成功注册(gadget uvc设备),之后连接PC,运行了uvc-gadget之后PC端出现"UVC Camera"设备,,但PC端使用软件打开设备不能出图,同时linux出现报错,log:
root@TinaLinux:~# ./uvc-gadget -c /dev/video0 g1/functions/uvc.usb0 Device /dev/video0 opened: SKT-SL500C-125A: SKT-SL500C-125 (usb-sunxi-ehci-1.4). Device /dev/video2 opened: sunxi_usb_udc (gadget). [ 24.861291] sunxi_set_cur_vol_work()489 WARN: get power supply failed [ 24.947920] android_work: sent uevent USB_STATE=CONNECTED [ 25.004974] configfs-gadget gadget: high-speed config #1: c [ 25.011196] configfs-gadget gadget: uvc: uvc_function_set_alt(0, 0) [ 25.018181] configfs-gadget gadget: uvc: reset UVC Control [ 25.024307] configfs-gadget gadget: uvc: uvc_function_set_alt(1, 0) [ 25.031356] configfs-gadget gadget: uvc: uvc_function_set_alt(1, 0) [ 25.038398] android_work: sent uevent USB_STATE=CONFIGURED [ 25.051649] configfs-gadget gadget: uvc: uvc_function_set_alt(1, 0) bRequestType a1 bRequest 81 wValue 0200 wIndex 0000 wLength 0001 control request (req GET_CUR cs BRIGHTNESS) bRequestType a1 bRequest 81 wValue 0200 wIndex 0000 wLength 0001 control request (req GET_CUR cs BRIGHTNESS) bRequestType a1 bRequest 81 wValue 0200 wIndex 0000 wLength 0001 control request (req GET_CUR cs BRIGHTNESS) [ 26.225582] sunxi_vbus_det_work()3493 WARN: get power supply failed [ 26.232578] configfs-gadget gadget: uvc: uvc_function_disable() [ 26.239233] android_work: sent uevent USB_STATE=DISCONNECTED [ 32.525579] usb1-vbus: disabling [ 108.515566] sunxi_vbus_det_work()3493 WARN: get power supply failed [ 108.522566] android_work: did not send uevent (0 0 00000000) [ 111.330935] ERR: Operation not supported [ 111.335358] android_work: sent uevent USB_STATE=CONNECTED [ 111.341394] ERR: Operation not supported [ 111.345792] ERR: Operation not supported [ 111.350195] ERR: Operation not supported [ 111.354573] ERR: Operation not supported [ 111.358959] ERR: Operation not supported [ 111.363343] ERR: Operation not supported [ 111.367738] ERR: Operation not supported [ 111.377574] ERR: Operation not supported [ 111.382104] ERR: Operation not supported [ 115.495562] sunxi_vbus_det_work()3493 WARN: get power supply failed [ 115.502589] android_work: sent uevent USB_STATE=DISCONNECTED
不知道是不是常说的usb 端点不够导致的问题
-
应用端应该有个uvc的节点,然后将输出传递给PC,要不然PC给过来的信息都没有处理,表现为ERR: Operation not supported
-
@xucw15990192241 请问你这个问题解决了吗?我也遇到这个问题了
-
你好,请问这个问题有解决方法了吗,我也遇到了这个问题,参考的也是《Linux_USB_开发指南》,用VLC打开之后报错
-
@xucw15990192241
可以参考这个脚本去枚举
run_otg
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号