My wild guess is that the weewx user does not have permission to get down into /home/ace/go/bin to find the rtldavis executable.
On Saturday, February 22, 2025 at 3:07:27 PM UTC-8 Wayne wrote: > I am attempting to install a new weewx driver in my RPi-4 (Raspbian 12 > "bookworm") system. I am running weewx Ver 5.1.0 (DEB package install). The > driver I am attempting to install is the rtldavis Software Defined Radio > (SDR) for the Davis Vantage system. > > This driver consists of (1) a Go language-based sdr receiver application > (rtldavis) which implements the receiver code and (2) the weewx driver > extension weewx-rtldavis which runs as rtldavis.py. rtldavis.py basically > performs the data parsing of the output of rtldavis. > > I compiled and installed the Go-based rtldavis code (using V 1.15 golang > compiler version per advice from vinceskahan and others) and am able to run > it standalone and successfully receive the Davis sensor suite (ISS) data > packets. This appears to work under my normal user login (as opposed to the > weewx user). The output of a recent run of this code is shown below: > > > ******************************************************************************************************************************* > ace@nimbus:~ $ rtldavis -tr 1 -tf US > 12:39:52.016217 rtldavis.go VERSION=0.15 > 12:39:52.016993 tr=1 fc=0 ppm=0 gain=0 maxmissed=51 ex=0 receiveWindow=300 > actChan=[0] maxChan=1 > 12:39:52.017048 undefined=false verbose=false disableAfc=false > deviceString=0 > 12:39:52.017486 BitRate: 19200 > 12:39:52.017531 SymbolLength: 14 > 12:39:52.017554 SampleRate: 268800 > 12:39:52.017575 Preamble: 1100101110001001 > 12:39:52.017605 PreambleSymbols: 16 > 12:39:52.017626 PreambleLength: 224 > 12:39:52.017646 PacketSymbols: 80 > 12:39:52.017667 PacketLength: 1120 > 12:39:52.017695 BlockSize: 512 > 12:39:52.017717 BufferLength: 2048 > Detached kernel driver > Found Rafael Micro R820T tuner > 12:39:52.526214 Hop: {ChannelIdx:0 ChannelFreq:902419338 FreqError:0 > Transmitter:0} > Exact sample rate is: 268800.001367 Hz > 12:39:52.702827 GetTunerGain: 0 Db > 12:39:52.702908 SetFreqCorrection 0 ppm Successful > Allocating 1 zero-copy buffers > 12:39:52.706454 Init channels: wait max 135 seconds for a message of each > transmitter > 12:40:57.599610 TRANSMITTER 0 SEEN > 12:40:57.599839 Hop: {ChannelIdx:19 ChannelFreq:911952597 FreqError:0 > Transmitter:0} > 12:41:00.161528 duplicate packet: 800CEC1F1B0B9563 > 12:41:00.525329 ID:0 packet missed (1), missed per freq: [0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 0 0] > 12:41:00.525559 Hop: {ChannelIdx:41 ChannelFreq:922991108 FreqError:0 > Transmitter:0} > 12:41:02.723483 E00CEF3401016A62 2 0 0 0 0 msg.ID=0 > 12:41:02.723640 Hop: {ChannelIdx:25 ChannelFreq:914963100 FreqError:0 > Transmitter:0} > 12:41:05.287110 5009FBFF730C0A5F 3 0 0 0 0 msg.ID=0 > 12:41:05.287248 Hop: {ChannelIdx:8 ChannelFreq:906433342 FreqError:0 > Transmitter:0} > 12:41:07.848922 duplicate packet: 5009FBFF730C0A5F > 12:41:08.212964 ID:0 packet missed (1), missed per freq: [0 0 0 0 0 0 0 0 > 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 0 0] > 12:41:08.213078 Hop: {ChannelIdx:47 ChannelFreq:926001611 FreqError:0 > Transmitter:0} > 12:41:10.774953 ID:0 packet missed (2), missed per freq: [0 0 0 0 0 0 0 0 > 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 1 0 0 0] > 12:41:10.775076 Hop: {ChannelIdx:32 ChannelFreq:918475353 FreqError:0 > Transmitter:0} > 12:41:12.972924 E00EEE340108C97C 4 0 0 0 0 msg.ID=0 > 12:41:12.973093 Hop: {ChannelIdx:13 ChannelFreq:908942094 FreqError:0 > Transmitter:0} > 12:41:15.536887 duplicate packet: E00EEE340108C97C > 12:41:15.898466 ID:0 packet missed (1), missed per freq: [0 0 0 0 0 0 0 0 > 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 1 0 0 0] > 12:41:15.898635 Hop: {ChannelIdx:36 ChannelFreq:920482355 FreqError:0 > Transmitter:0} > 12:41:18.098802 800DEB1F19038975 5 0 0 0 0 msg.ID=0 > 12:41:18.098921 Hop: {ChannelIdx:22 ChannelFreq:913457849 FreqError:0 > Transmitter:0} > 12:41:20.660709 200BF2D4C10127C2 6 0 0 0 0 msg.ID=0 > 12:41:20.661123 Hop: {ChannelIdx:3 ChannelFreq:903924589 FreqError:0 > Transmitter:0} > 12:41:23.222601 duplicate packet: 200BF2D4C10127C2 > 12:41:23.224373 duplicate packet: 200BF2D4C10127C2 > 12:41:23.586331 ID:0 packet missed (1), missed per freq: [0 0 0 1 0 0 0 0 > 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 1 0 0 0] > 12:41:23.586505 Hop: {ChannelIdx:29 ChannelFreq:916970102 FreqError:0 > Transmitter:0} > 12:41:25.786398 500CEDFF720A46C1 7 0 0 0 0 msg.ID=0 > 12:41:25.786585 Hop: {ChannelIdx:44 ChannelFreq:924496359 FreqError:0 > Transmitter:0} > 12:41:28.348216 800CF51F1905FA1F 8 0 0 0 0 msg.ID=0 > 12:41:28.348339 Hop: {ChannelIdx:16 ChannelFreq:910447346 FreqError:0 > Transmitter:0} > ^CReattached kernel driver > ace@nimbus:~ $ > > ********************************************************************************************************************************** > This tells me that the SDR receive hardware is working and the SDR > rtldavis code is functioning. > > But when I start weewx via systemctl I get an error "Failed to start > process: [Errno 13] Permission denied" for the sdr driver file: > /home/ace/go/bin/rtldavis. This is the very same code which I can run > standalone as shown above. > > Yes, I have read and reread the helpful "What you should know about > permissions" section of the FAQ. > > The permissions on this file are: > > -rwxr-xr-x 1 root weewx 2254092 Feb 11 16:45 /home/ace/go/bin/rtldavis > > I believe I have the udev rule for the SDR receiver written correctly, > especially because I can run the driver by itself successfully. I am at a > loss for what else to look at. The error log from journalctl is presented > below: > > > **************************************************************************************************************************** > Feb 22 12:21:31 nimbus systemd[1]: Started weewx.service - WeeWX. > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: Initializing weewxd > version 5.1.0 > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: Command line: > /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: Using Python: 3.11.2 > (main, Nov 30 2024, 21:22:50) [GCC 12.2.0] > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: Located at: > /usr/bin/python3 > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: Platform: > Linux-6.6.74+rpt-rpi-v8-aarch64-with-glibc2.36 > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: Locale: 'en_US.UTF-8' > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: Entry path: > /usr/share/weewx/weewxd.py > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: WEEWX_ROOT: /etc/weewx > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: Config file: > /etc/weewx/weewx.conf > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: User module: > /etc/weewx/bin/user > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: Debug: 0 > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: User: weewx > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: Group: weewx > Feb 22 12:21:32 nimbus weewxd[8016]: INFO __main__: Groups: adm dialout > cdrom audio video plugdev games users input render netdev lpadmin weewx > gpio i2c spi ace > Feb 22 12:21:32 nimbus weewxd[8016]: INFO weewx.engine: Loading station > type Rtldavis (user.rtldavis) > Feb 22 12:21:32 nimbus weewxd[8016]: INFO user.rtldavis: driver version is > 0.20 > Feb 22 12:21:32 nimbus weewxd[8016]: INFO user.rtldavis: using > rain_bucket_type 0 > Feb 22 12:21:32 nimbus weewxd[8016]: INFO user.rtldavis: sensor map is: > {'pressure': 'pressure', 'inTemp': 'temp_in', 'windSpeed': 'wind_speed', > 'windDir': 'wind_dir', 'outTemp': 'temperature', 'outHumidity': 'humidity', > 'inHumidity': 'humidity_in', 'rainRate': 'rain_rate', 'radiation': > 'solar_radiation', 'UV': 'uv', 'soilTemp1': 'soil_temp_1', 'soilTemp2': > 'soil_temp_2', 'soilTemp3': 'soil_temp_3', 'soilTemp4': 'soil_temp_4', > 'leafTemp1': 'leaf_temp_1', 'extraHumid1': 'humid_1', 'extraHumid2': > 'humid_2', 'soilMoist1': 'soil_moisture_1', 'soilMoist2': > 'soil_moisture_2', 'soilMoist3': 'soil_moisture_3', 'soilMoist4': > 'soil_moisture_4', 'leafWet1': 'leaf_wetness_1', 'leafWet2': > 'leaf_wetness_2', 'rxCheckPercent': 'pct_good_all', 'txBatteryStatus': > 'bat_iss', 'supplyVoltage': 'supercap_volt', 'referenceVoltage': > 'solar_power', 'windBatteryStatus': 'bat_anemometer', 'rainBatteryStatus': > 'bat_leaf_soil', 'outTempBatteryStatus': 'bat_th_1', 'inTempBatteryStatus': > 'bat_th_2', 'extraTemp1': 'pct_good_0', 'extraTemp2': 'pct_good_1', > 'extraTemp3': 'pct_good_2', 'leafTemp2': 'pct_good_3', > 'consBatteryVoltage': 'freqError0', 'hail': 'freqError1', 'hailRate': > 'freqError2', 'heatingTemp': 'freqError3', 'heatingVoltage': 'freqError4'} > Feb 22 12:21:32 nimbus weewxd[8016]: INFO user.rtldavis: sensor map is {} > Feb 22 12:21:32 nimbus weewxd[8016]: INFO user.rtldavis: using frequency US > Feb 22 12:21:32 nimbus weewxd[8016]: INFO user.rtldavis: using iss_channel > 1 > Feb 22 12:21:32 nimbus weewxd[8016]: INFO user.rtldavis: using > anemometer_channel 0 > Feb 22 12:21:32 nimbus weewxd[8016]: INFO user.rtldavis: using > leaf_soil_channel 0 > Feb 22 12:21:32 nimbus weewxd[8016]: INFO user.rtldavis: using > temp_hum_1_channel 0 > Feb 22 12:21:32 nimbus weewxd[8016]: INFO user.rtldavis: using > temp_hum_2_channel 0 > Feb 22 12:21:32 nimbus weewxd[8016]: INFO user.rtldavis: using > transmitters 1 > Feb 22 12:21:32 nimbus weewxd[8016]: INFO user.rtldavis: log_humidity_raw > False > Feb 22 12:21:32 nimbus weewxd[8016]: INFO user.rtldavis: startup process > '/home/ace/go/bin/rtldavis -tf US -tr 1' > Feb 22 12:21:32 nimbus weewxd[8016]: ERROR weewx.engine: Import of driver > failed: failed to start process: [Errno 13] Permission denied: > '/home/ace/go/bin/rtldavis' (<class 'weewx.WeeWxIOError'>) > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** Traceback > (most recent call last): > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** File > "/etc/weewx/bin/user/rtldavis.py", line 452, in startup > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** > self._process = subprocess.Popen(cmd.split(' '), > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** File > "/usr/lib/python3.11/subprocess.py", line 1024, in __init__ > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** > self._execute_child(args, executable, preexec_fn, close_fds, > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** File > "/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** raise > child_exception_type(errno_num, err_msg, err_filename) > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** > PermissionError: [Errno 13] Permission denied: '/home/ace/go/bin/rtldavis' > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** During > handling of the above exception, another exception occurred: > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** Traceback > (most recent call last): > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** File > "/usr/share/weewx/weewx/engine.py", line 115, in setupStation > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** > self.console = loader_function(config_dict, self) > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** File > "/etc/weewx/bin/user/rtldavis.py", line 146, in loader > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** return > RtldavisDriver(engine, config_dict) > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** File > "/etc/weewx/bin/user/rtldavis.py", line 814, in __init__ > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** > self._mgr.startup(self.cmd, self.path, self.ld_library_path) > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** File > "/etc/weewx/bin/user/rtldavis.py", line 463, in startup > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** raise > weewx.WeeWxIOError("failed to start process: %s" % e) > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL weewx.engine: **** > weewx.WeeWxIOError: failed to start process: [Errno 13] Permission denied: > '/home/ace/go/bin/rtldavis' > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL __main__: Unable to load > driver: failed to start process: [Errno 13] Permission denied: > '/home/ace/go/bin/rtldavis' > Feb 22 12:21:32 nimbus weewxd[8016]: CRITICAL __main__: **** Exiting... > Feb 22 12:21:32 nimbus systemd[1]: weewx.service: Main process exited, > code=exited, status=4/NOPERMISSION > Feb 22 12:21:32 nimbus systemd[1]: weewx.service: Failed with result > 'exit-code'. > > ************************************************************************************************************************************* > > At this point I have reached the limits of my weewx debugging abilities > and ask the esteemed group for their advice. It seems like I am close to a > working solution (at least pieces of a solution) but obviously have > something not right. My thanks in advance for all comments. > > Wayne > -- 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 weewx-user+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/weewx-user/76eea654-66da-484e-a152-b4d3e4c4b481n%40googlegroups.com.