From 053dcbeca4871a8bc299c2081fcd4f0372cdf41a Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Wed, 5 Jan 2011 23:43:06 +0000 Subject: [PATCH] Updated udev rules to reflect the new udevadm command. --- docs/readme.htm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/readme.htm b/docs/readme.htm index dbf106ed..1203c0c4 100644 --- a/docs/readme.htm +++ b/docs/readme.htm @@ -1053,7 +1053,7 @@ as well. You just specify port /dev/vpro and be done w

I have installed a file /etc/udev/rules.d/66-vpro.rules on my fit-PC that looks like this:

# Automount the VantagePro2 to port /dev/vpro.
-
# Install in /dev/udev/rules.d/66-vpro.rules
+
# Install in /etc/udev/rules.d/66-vpro.rules
#
ACTION=="add", ATTRS{interface}=="CP2102 USB to UART Bridge Controller", SYMLINK+="vpro"

What this rule says is that when the USB port is plugged in (action @@ -1064,12 +1064,17 @@ to /dev/vpro.

Your controller may have a different identifier!! I can recommend this article, "Writing udev rules," for how to find and write an -appropriate udev rule for your controller. In +appropriate udev rule for your controller. (Note, +however, that this article uses the old udevinfo +command, rather than the newer udevadm command.) In particular, run the command

-
# udevinfo -a -p $(udevinfo -q path -n /dev/ttyUSB0)
+
# udevadm info --attribute-walk --path $(udevadm info --query=path --name=/dev/ttyUSB0) 

where /dev/ttyUSB0 is the port (substitute your real USB port) the VP2 is attached to. It will print out various identifiers -that can be useful in identifying your VP2 to udev.

+that can be useful in identifying your VP2 to udev. +While the example script above used a rule that matched attribute +interface, others are possible. For example, you might +chose to match the attribute product.

Once you've installed your udev rule, you can then set port=/dev/vpro in weewx.conf, confident that it will always point to your VantagePro2, no matter which USB