Per, this is valuable information that can easily get lost in the vast depths of the weewx-user group. There is already a section <http://weewx.com/docs/usersguide.htm#udev_script> in the User's Guide that covers some of the same material. How about combining the two into a comprehensive Wiki page?
-tk On Sun, Jan 15, 2017 at 5:39 AM, Per Edström <[email protected]> wrote: > To my Oregon WMR928 I have a USB-to-COM-port converter. That one seems to > change device for unknown reason. It can happen during reboot or > spontaneously. If it changes from /dev/ttyUSB0 to /dev/ttyUSB1 then Weewx > stops. So I need to have a fixed device to use in weewx.conf > > This page describes how to do it: > http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/ > > What I did was check the settings using "lsusb": > [email protected]:~# lsusb > Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub > Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub > Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub > Bus 001 Device 003: ID 1781:0c31 Multiple Vendors > Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible > Power Supply > *Bus 001 Device 005: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial > Port* > Bus 001 Device 002: ID 1a40:0101 TERMINUS TECHNOLOGY INC. > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub > > I created the file* /etc/udev/rules.d/99-usb-serial.rules* with the > content: > SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", > SYMLINK+="wmr928" > > (In the description they have "serial" too but I could not get that to > work so I skipped it and it seems to do the trick anyway) > > The new device (link) will be */dev/wmr928* so change > */etc/weewx/weewx.conf* for your station. > > Reboot > > Check that the new device is created and that Weewx works.. > > Reboot. > > > -- > You received this message because you are subscribed to the Google Groups > "weewx-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
