Closed pit65535 closed 7 months ago
I found the solution: in /etc/udev/rules.d need to be placed a file sdr.rules with the following content:
SUBSYSTEM=="usb",ATTRS{idVendor}=="0bda",ATTRS{idProduct}=="2832",MODE="0664",GROUP="weewx" SUBSYSTEM=="usb",ATTRS{idVendor}=="0bda",ATTRS{idProduct}=="2838",MODE="0664",GROUP="weewx"
the weewx group needs the permission to access the rtl_sdr-stick in usb.
look comment above
I ugraded my weewx with sdr from 5.00 to 5.02 which has been working for two years without any trouble. After the upgrade weewx won´t start anymore with the following error:
[root@weewxN:/]# systemctl status weewx ● weewx.service - WeeWX Loaded: loaded (/lib/systemd/system/weewx.service; enabled; preset: enabled) Active: active (running) since Mon 2024-02-12 12:06:40 GMT; 3s ago Docs: https://weewx.com/docs Main PID: 24795 (python3) Tasks: 1 (limit: 3919) CPU: 385ms CGroup: /system.slice/weewx.service └─24795 python3 /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
Feb 12 12:06:40 weewxN weewxd[24795]: File "/etc/weewx/bin/user/sdr.py", line 198, in run Feb 12 12:06:40 weewxN weewxd[24795]: for line in iter(self._fd.readline, ''): Feb 12 12:06:40 weewxN weewxd[24795]: ValueError: PyMemoryView_FromBuffer(): info->buf must not be NULL Feb 12 12:06:40 weewxN weewxd[24795]: self.run() Feb 12 12:06:40 weewxN weewxd[24795]: File "/etc/weewx/bin/user/sdr.py", line 198, in run Feb 12 12:06:40 weewxN weewxd[24795]: for line in iter(self._fd.readline, ''): Feb 12 12:06:40 weewxN weewxd[24795]: ValueError: PyMemoryView_FromBuffer(): info->buf must not be NULL Feb 12 12:06:40 weewxN weewxd[24795]: INFO user.sdr: shutdown complete Feb 12 12:06:40 weewxN weewxd[24795]: CRITICAL main: Caught WeeWxIOError: rtl_433 process is not running Feb 12 12:06:40 weewxN weewxd[24795]: CRITICAL main: **** Waiting 60.0 seconds then retrying...
So I tried a fresh install from Scratch and the same error appeats after switching from Simulator to SDR.
in syslog i found the following error (sam in old station and fresh install): 2024-02-12T12:06:40.861296+00:00 weewxN weewxd[24795]: INFO weewx.engine: Starting main packet loop. 2024-02-12T12:06:40.862126+00:00 weewxN weewxd[24795]: ERROR user.sdr: rtl_433 version 22.11 (2022-11-19) inputs file rtl_tcp RTL-SDR SoapySDR 2024-02-12T12:06:40.862354+00:00 weewxN weewxd[24795]: ERROR user.sdr: Use -h for usage help and see https://triq.org/ for documentation. 2024-02-12T12:06:40.862648+00:00 weewxN weewxd[24795]: ERROR user.sdr: Trying conf file at "rtl_433.conf"... 2024-02-12T12:06:40.862894+00:00 weewxN weewxd[24795]: ERROR user.sdr: Trying conf file at "/var/lib/weewx/.config/rtl_433/rtl_433.conf"... 2024-02-12T12:06:40.863187+00:00 weewxN weewxd[24795]: ERROR user.sdr: Trying conf file at "/usr/local/etc/rtl_433/rtl_433.conf"... 2024-02-12T12:06:40.863436+00:00 weewxN weewxd[24795]: ERROR user.sdr: Trying conf file at "/etc/rtl_433/rtl_433.conf"... 2024-02-12T12:06:40.863677+00:00 weewxN weewxd[24795]: ERROR user.sdr: Registered 191 out of 223 device decoding protocols [ 1-4 8 11-12 15-17 19-23 25-26 29-36 38-60 63 67-71 73-100 102-105 108-116 119 121 124-128 130-149 151-161 163-168 170-175 177-197 199 201-215 217-223 ] 2024-02-12T12:06:40.863962+00:00 weewxN weewxd[24795]: ERROR user.sdr: usb_open error -3 2024-02-12T12:06:40.864207+00:00 weewxN weewxd[24795]: ERROR user.sdr: Please fix the device permissions, e.g. by installing the udev rules file rtl-sdr.rules 2024-02-12T12:06:40.864458+00:00 weewxN weewxd[24795]: INFO weewx.engine: Main loop exiting. Shutting engine down. 2024-02-12T12:06:40.864895+00:00 weewxN weewxd[24795]: INFO user.sdr: shutdown process rtl_433 -M utc -F json 2024-02-12T12:06:40.865788+00:00 weewxN weewxd[24795]: Exception in thread stdout-thread: 2024-02-12T12:06:40.866170+00:00 weewxN weewxd[24795]: Exception in thread stderr-thread: 2024-02-12T12:06:40.866304+00:00 weewxN weewxd[24795]: Traceback (most recent call last): 2024-02-12T12:06:40.866428+00:00 weewxN weewxd[24795]: File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner 2024-02-12T12:06:40.866872+00:00 weewxN weewxd[24795]: Traceback (most recent call last): 2024-02-12T12:06:40.867206+00:00 weewxN weewxd[24795]: File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner 2024-02-12T12:06:40.867445+00:00 weewxN weewxd[24795]: self.run() 2024-02-12T12:06:40.867754+00:00 weewxN weewxd[24795]: File "/etc/weewx/bin/user/sdr.py", line 198, in run 2024-02-12T12:06:40.868445+00:00 weewxN weewxd[24795]: for line in iter(self._fd.readline, ''): 2024-02-12T12:06:40.868853+00:00 weewxN weewxd[24795]: ValueError: PyMemoryView_FromBuffer(): info->buf must not be NULL 2024-02-12T12:06:40.869231+00:00 weewxN weewxd[24795]: self.run() 2024-02-12T12:06:40.869527+00:00 weewxN weewxd[24795]: File "/etc/weewx/bin/user/sdr.py", line 198, in run 2024-02-12T12:06:40.870031+00:00 weewxN weewxd[24795]: for line in iter(self._fd.readline, ''): 2024-02-12T12:06:40.870233+00:00 weewxN weewxd[24795]: ValueError: PyMemoryView_FromBuffer(): info->buf must not be NULL 2024-02-12T12:06:40.870801+00:00 weewxN weewxd[24795]: INFO user.sdr: shutdown complete 2024-02-12T12:06:40.871707+00:00 weewxN weewxd[24795]: CRITICAL main: Caught WeeWxIOError: rtl_433 process is not running 2024-02-12T12:06:40.871951+00:00 weewxN weewxd[24795]: CRITICAL main: **** Waiting 60.0 seconds then retrying... 2024-02-12T12:07:16.254834+00:00 weewxN weewxd[24795]: INFO main: Received signal TERM (15). 2024-02-12T12:07:16.257890+00:00 weewxN systemd[1]: Stopping weewx.service - WeeWX...
Can someone help me please to solve this Problem?