RFXTRX refuses to connect

Begonnen von HarryT, 15 April 2024, 17:06:11

Vorheriges Thema - Nächstes Thema

HarryT

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}
FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Wernieman

ZitatPermission denied
Ist fhem in the Group dialout?
Can you:
ls -lha /dev/serial/by-id/usb-RFXCOM_RFXtrx433XL_DO3EM9Z6-if00-port0
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

HarryT

Hi Wernieman

Thanks for the quick answer.

Zitat von: Wernieman am 15 April 2024, 17:16:52
ZitatPermission 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


FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

HarryT

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? 
FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

TomLee

#4
ZitatAnybody an idea?

An obvious one:

Did you assign root rights to fhem on your old installation?

HarryT

Zitat von: TomLee am 15 April 2024, 20:52:13
ZitatAnybody 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.


FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Wernieman

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.
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

HarryT

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}

FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Wernieman

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
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

HarryT

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}

FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Wernieman

you are not the first person, which have the "permission denied". So it was easy to see the problem.
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html