Writing a UDEV rule for the ENVI-R Serial USB

James Young · November 5, 2012

By default the ENVI-R’s serial USB adapter will get a device name such as /dev/ttyUSB0, but this may wander if you have multiple serial devices connected.  In order to get a fixed name, create an appropriate .rules file in /etc/udev/rules.d, and enter this;

SUBSYSTEMS=="usb", ATTRS{idProduct}=="2303", ATTRS{idVendor}=="067b", NAME="%k", SYMLINK+="envir_serial", MODE="0660"

With this, you’ll wind out with a /dev/envir_serial that you can connect your scripts to.  This can be done with any such device, just determine the vendor ID from running lsusb.

Twitter, Facebook