On Wednesday, January 31, 2024 at 12:31:20 PM UTC-5 [email protected] wrote:

Doing a fresh install of weewx to another Pi just to check everything is 
working before migrating over. If I'm using rtl_433 and weewx-sdr, am I 
correct in adding the line: 
SUBSYSTEM=="usb",ATTRS{idVendor}=="0bda", 
ATTRS{idProduct}=="2832",MODE="0664",GROUP="weewx", SYMLINK+="rtl_sdr" 
to /usr/lib/udev/rules.d/60-weewx.rules ? 


you probably do not want to do that.  /usr/lib/udev/rules.d is for things 
installed by system packages.  do your overrides in /etc

if you want to add your own rules, they should go in a file in 
/etc/udev/rules.d, for example /etc/udev/rules.d/weewx.rules

also, you might already have rules for the sdr hardware.  when you install 
rtl-sdr (which is a pre-req for rtl_433) from source, one of the options is 
to install the udev rules.  if you do that, then you should see the file 
/etc/udev/rules.d/rtl-sdr.rules which contains the rules for a large number 
of different sdr devices.

here is the rule for your device from those rules:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", 
ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"

note that they use the group 'plugdev', and a mode of 0660 (0660 is more 
'secure' than 0666, but not usually a big deal in this kind of system).  
when you install the rtl-sdr software, it puts the current user into the 
'plugdev' group.

so if you run weewxd as root, the group does not matter.

if you run weewxd as user 'weewx', then you would put user 'weewx' into 
group 'plugdev' (if you have the sdr-rtl rules), or use the sdr-rtl rule 
for your hardware but with group 'weewx' and put that in /etc/udev/rules.d

m

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a217f391-915b-4ffa-9b31-23c88794f5a4n%40googlegroups.com.

Reply via email to