OK3568 4.19.206 Buildroot Fixed USB to Network Port or Serial Port Name

Document classification: □ Top secret □ Secret □ Internal information ■ Open

Revision History

Date

Version

Revision History

04/08/2022

V1.0

Initial Version

Fixed USB to Network Port or Serial Port Name

1. Use the command to view the rules

udevadm info –attribute-walk –path=$(udevadm info –query=path –path=/sys/class/net/eth0)

udevadm info –attribute-walk –path=$(udevadm info –query=path –name=/dev/ttyUSB0)

udevadm info –attribute-walk –path=$(udevadm info –query=path –name=/dev/ttyXRUSB0)

udevadm info –attribute-walk –path=$(udevadm info –query=path –name=/dev/usb-serial1)

Image

2. Select a few rules from the above figure:

Create/etc/udev/rules.d/99rename.rules files

Image

3. Add executable permissions

chmod +x /etc/udev/rules.d/99rename.rules

4. Restart the development board and test that the serial port on the USB interface has been fixed. The user application can directly use/dev/usb-serial-1 to call the serial port on the relevant USB interface.