Hi
I am trying to build a fresh fhem installation on my Raspberry. All the software is the current versions. Fhem is updated. However, RFXTRX is not connected and I get in my logging:
2024.04.15 16:53:59 3: Opening RFXTRX device /dev/serial/by-id/usb-RFXCOM_RFXtrx433XL_DO3EM9Z6-if00-port0
2024.04.15 16:53:59 1: RFXTRX: Can't open /dev/serial/by-id/usb-RFXCOM_RFXtrx433XL_DO3EM9Z6-if00-port0: Permission denied
This happens on a Raspberry Pi 3 and 4.
When I insert the card with my previous installation everything works find with the same hardware. My fhem.cfg is identical in the old and the new situation.
Anybody an idea what can be wrong and how to fix this?
Thanks
{HT}
ZitatPermission denied
Ist fhem in the Group dialout?
Can you:
ls -lha /dev/serial/by-id/usb-RFXCOM_RFXtrx433XL_DO3EM9Z6-if00-port0
Hi Wernieman
Thanks for the quick answer.
Zitat von: Wernieman am 15 April 2024, 17:16:52ZitatPermission denied
Ist fhem in the Group dialout?
Yes.
Zitatgroups fhem
fhem : dialout
ZitatCan you:
ls -lha /dev/serial/by-id/usb-RFXCOM_RFXtrx433XL_DO3EM9Z6-if00-port0
Zitatls -lha /dev/serial/by-id/usb-RFXCOM_RFXtrx433_03VHO3LW-if00-port0
lrwxrwxrwx 1 root root 13 15 apr 17:37 /dev/serial/by-id/usb-RFXCOM_RFXtrx433_03VHO3LW-if00-port0 -> ../../ttyUSB0
This is another RFXTRX on my test environment. But with my new installation and the same problem.
I see no problems in this
addition to my previous message
I just did a fresh new installation (from scratch on an other empty sd card) with Fhem 6.3 but no updates. I got the same result. :-(
My old correct installation is updated to Fhem 6.3 so there shouldn´t be any difference.
I have other usb devices on the raspberry and there are no problems with them.
Anybody an idea?
ZitatAnybody an idea?
An obvious one:
Did you assign root rights to fhem on your old installation?
Zitat von: TomLee am 15 April 2024, 20:52:13ZitatAnybody an idea?
An obvious one:
Did you assign root rights to fhem on your old installation?
Thanks for the suggestion. But no I didn´t.
See the output of groups I posted at 19:28.
Cloud you give us:
ls -lha /dev/ttyUSB0
The /dev/serial/by-id/usb-RFXCOM_RFXtrx433XL_DO3EM9Z6-if00-port0 ist a symlink to the Device. the first ls give the permissions of the symlink, but we need the permission of the Device.
Hi Wernierman
That is the reason I guess. In the new installation:
Zitat$ ls -lha /dev/ttyUSB0
crw-rw----+ 1 root plugdev 188, 0 15 apr 20:42 /dev/ttyUSB0
In the old installation
Zitat$ ls -lha /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 15 apr 17:50 /dev/ttyUSB0
I tested this finding by adding the group plugdev to fhem. That seems to work.
Thanks for your time.
At the moment I don´t understand why this worked without plugdev in the past and there is a new group needed now.
I will search the internet in the coming days, but if anybody knows the answer, I would be happy to read it.
mfg
{HT}
It could be, that the distri (wich do you use) change the group.
To give fhem the group acces to the device is the best and easy way to solve the issue. There are other ways too, but it is not easy to explain (my english is not god)
At Example, Keyword: udev roul
Zitat von: Wernieman am 16 April 2024, 09:44:44There are other ways too, but it is not easy to explain (my english is not god)
Don't bother about that. My german is sufficient to read german manuals, but writing is a dissaster. :-)
Zitat von: Wernieman am 16 April 2024, 09:44:44the distri (wich do you use)
Raspberry Pi OS 64 bit. (Debian bookworm) Dated 2024-03-15
Zitat von: Wernieman am 16 April 2024, 09:44:44It could be, that the distri (wich do you use) change the group.
Yes they did. I now see more devices now using the group plugdev. In the past this was dialout. I guess adding the group plugdev to the account fhem is mandatory now.
I have no idea how to notify the fhem installer developer about this.
Thanks again for your help. Stupid from me that I didn´t notice I was looking at the symlink rights.
mfg
{HT}
you are not the first person, which have the "permission denied". So it was easy to see the problem.