First, set the name to 'py'_ Install_ Copy the V0.0.1 folder to the root directory of your own system, and then enter the folder
cd py_install
sudo python3 setup.py install
Use the following command to check if the installation was successful,
xxxxxxxxxx
pip list
Query USB device ID,
xxxxxxxxxx
lsusb
Create a new my_ Speech.rules file, terminal input,
xxxxxxxxxx
sudo gedit /etc/udev/rules.d/my_speech.rules
Copy the following content into this file,
KERNEL=="ttyUSB*",ATTRS{idVendor}=="1a86",ATTRS{idProduct}=="7523",MODE:="0777",SYMLINK+="myspeech"
After saving, exit and enter the following command to refresh the port rule file,
sudo udevadm trigger
sudo service udev reload
sudo service udev restart
The appearance of the above image indicates successful binding.
The above binding method is only applicable to a unique USB device ID. Sometimes, there may be the same device ID. For example, if there are two 1a86:7523 devices, then the ATTRS {devpath} parameter and ATTRS {devpath} parameter need to be added to the query method. For example, if I confirm that ttyUSB1 is a voice board, then input,,
xxxxxxxxxx
udevadm info --attribute-walk --name=/dev/ttyUSB1 |grep devpath
The terminal will print the following content, based on the actual situation,
The red box represents the value of ATTRS {devpath}, so my_ The speech.rules file needs to be modified to the following content,
KERNEL=="ttyUSB*",ATTRS{devpath}=="1.4.3",ATTRS{idVendor}=="1a86",ATTRS{idProduct}=="7523",MODE:="0777",SYMLINK+="myspeech"
After saving, exit and enter the following command to refresh the port rule file,
xxxxxxxxxx
sudo udevadm trigger
sudo service udev reload
sudo service udev restart
Note that after binding, it cannot be inserted into the driver port, otherwise it will not be recognized.