You are currently viewing Assigning USB Port in Raspberry PLC: Step-by-Step Guide
Assigning USB Port in Raspberry PLC: Step-by-Step Guide

Assigning USB Port in Raspberry PLC: Step-by-Step Guide

Spread the love
  1. Connect your USB device to one of the available USB ports on the Raspberry PLC.
  2. Log in to the Raspberry PLC using SSH or a remote desktop connection.
  3. Open a terminal or command prompt on the Raspberry PLC.
  4. Enter the following command to list the connected USB devices:
lsusb
  1. This command will display a list of connected USB devices along with their unique identifiers.
  2. Identify the USB device you want to assign to a specific port based on its unique identifier. Note down the identifier or any other relevant information about the device.
  3. Now, you need to create a symbolic link for the USB device using its identifier. To do this, enter the following command:
sudo ln -s /dev/bus/usb/{bus_number}/{device_number} /dev/{usb_port_name}

Replace {bus_number} with the bus number of the USB device, {device_number} with the device number, and {usb_port_name} with the desired name for the USB port.

For example, if the bus number is 001 and the device number is 003, and you want to assign it to usb_port_1, the command would be:

sudo ln -s /dev/bus/usb/001/003 /dev/usb_port_1
  1. After executing the command, the symbolic link will be created, and you can access the USB device using the assigned USB port name (/dev/usb_port_1 in the above example).

Remember to replace the bus number, device number, and USB port name with the appropriate values for your setup. Also, make sure you have the necessary permissions (sudo access) to create symbolic links and modify device files on the Raspberry PLC.

sachin Pagar

I am Mr. Sachin pagar Embedded software engineer, the founder of Sach Educational Support(Pythonslearning), a Passionate Educational Blogger and Author, who love to share the informative content on educational resources.

Leave a Reply