USB otg热拔插功能怎么实现

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB otg热拔插功能怎么实现

1,133 Views
dengboping
Contributor I

USB摄像头接入IMX6DL otg口,/dev目录下生成video2 ,  如果摄像头断开后重新接入,video2消失变成video3,项目需要将其固定为video2, 以实现热拔插效果,请问有什么办法?

0 Kudos
1 Reply

849 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Boping,

The name of the USB camera device node changes between video0 and video63, so your problem is not BSP or driver. You need to query the existence of videox and open it once in the application layer software. That's all right. There are many peers on the Internet to meet your needs.

USB camera设备节点名字会在video0~video63之间变化,因此,您的问题不是BSP和driver的问题。你需要在应用层软件中,一次去查询videox是否存在,存在则打开。这样就可以了。网上有很多同行实现了您的需求。

1.  解决Android USB摄像头热擦拔问题 - gooogleman#foxmail.com - CSDN博客 

2. usbcamera热插拔后无法打开的问题-CSDN论坛 

Have a nice day!

NXP TIC Weidong

0 Kudos