1 year ago
#127031
Doris
Specify path of usb devices connecting with raspberry pi
I'm using raspberry pi, connecting two usb devices at the same time, incluing a arduino nano and one usb camera. Each of them can work properly when separately running with code (plug in only one device to raspberry pi), where the default path is /dev/ttyUSB0 or /dev/video0. However, when I plug in both two usb devices, arduino takes the default path, and the camera path is not accessible. I've tried adding udev rules:
SUBSYSTEM=="tty",ATTRS{idProduct}=="7523",ATTRS{idVendor}=="1a86", SYMLINK+="arduino">
SUBSYSTEM=="tty",ATTRS{idProduct}=="6001",ATTRS{idVendor}=="038f", ,SYMLINK+="camera1">
Then I tried to call camera in c, still get error:
Open dev/camera1: No such file or directory
Is there any other way to specify the usb device path or port? I appreciate a lot for your help.
raspberry-pi
usb
udev
0 Answers
Your Answer