FHEM auf RASPI4 verbindet nicht über LAN mit HMUART/HMUARTLGW auf 2. raspi4

Begonnen von @tango, 03 Oktober 2021, 19:39:03

Vorheriges Thema - Nächstes Thema

@tango

Hi,

sieht in der Tat komisch aus, scheint aber richtig zu sein.

Hier die Varianter auf dem raspi, bei dem die Verbindung klappt:


root       405  0.0  0.1   5624  1116 ?        Ss   18:39   0:00 /usr/bin/socat TCP4-LISTEN:2020,fork,reuseaddr /dev/ttyAMA0,raw,echo=0,b115200
root       824  0.0  0.0   5624   268 ?        S    18:48   0:01 /usr/bin/socat TCP4-LISTEN:2020,fork,reuseaddr /dev/ttyAMA0,raw,echo=0,b115200
RASPI 4B, PI USV+, ext. SSD, ohne MicroSD
IO: CUL433,2xHMUART
HM, IT, Rev, AVM

Wernieman

- 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

@tango

Guten Morgen,

Persönlich habe ich keine Firewall installiert.
Keine Ahnung, ob nextcloud eine mitbringt???

Mein nächster Plan ist es, mal zu sehen, ob socat Debugmöglickeiten hat.
Vielleicht bekomme ich heraus, ob das Problem eher auf der LAN Seite oder auf der seriellen Seite liegt.
RASPI 4B, PI USV+, ext. SSD, ohne MicroSD
IO: CUL433,2xHMUART
HM, IT, Rev, AVM

Otto123

Mal noch ne andere Idee: mal mit ser2net probieren?  Ich habe immer Schwierigkeiten mit socat gehabt auch jetzt aktuell wieder bei einem Versuch
https://wiki.fhem.de/wiki/HM-MOD-RPI-PCB_HomeMatic_Funkmodul_f%C3%BCr_Raspberry_Pi#Anbindung_.C3.BCber_das_Netzwerk
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

@tango

Hi,

den ser2net Versuch habe ich auf dem nextcloud raspi schon hinter mir bevor ich diesen Thread anfing.
Hat nicht funktioniert.

Leider.

Auf dem reserve raspi habe ich das nicht probiert, da es mit sokat funktionierte.
RASPI 4B, PI USV+, ext. SSD, ohne MicroSD
IO: CUL433,2xHMUART
HM, IT, Rev, AVM

Otto123

Ich glaube nicht an eine Firewall aber Du kannst ja mal eine Verbindung auf dem Port daneben testen:
Auf dem nextcloud Pi
nc -l 4001
auf deinem FHEM Pi
nc 4001
Dann solltest Du auf dem FHEM pi weiter text eingeben können, der Zeilenweise (enter) auf dem anderen pi in der Konsole erscheint. Die Verbindung sollte stabil bleiben, bis man sie mit ctrl+c beendet.
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

@tango

Danke für den Tip.

Ich habe inzwischen mit socat gespielt.

Ich habe den hmlangw Dienst gestopt und socat mit debug options per Hand gestartet.
Dann auf dem FHEM raspi  ein

set XX_HMUART2  open

gemacht.

Eine Weile später dann wieder das close.

Der socat auf dem nextcloud raspi reagiert sofort mit folgendem Trace:

/usr/bin/socat -d -d -d  TCP4-LISTEN:2020,fork,reuseaddr /dev/ttyAMA0,raw,echo=0,b115200


2021/10/05 11:56:08 socat[1744] I socat by Gerhard Rieger and contributors - see www.dest-unreach.org
2021/10/05 11:56:08 socat[1744] I This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)
2021/10/05 11:56:08 socat[1744] I This product includes software written by Tim Hudson (tjh@cryptsoft.com)
2021/10/05 11:56:08 socat[1744] I setting option "fork" to 1
2021/10/05 11:56:08 socat[1744] I setting option "so-reuseaddr" to 1
2021/10/05 11:56:08 socat[1744] I socket(2, 1, 6) -> 5
2021/10/05 11:56:08 socat[1744] I starting accept loop
2021/10/05 11:56:08 socat[1744] N listening on AF=2 0.0.0.0:2020
2021/10/05 11:56:18 socat[1744] I accept(5, {2, AF=2 192.....21:54738}, 16) -> 6
2021/10/05 11:56:18 socat[1744] N accepting connection from AF=2 192.....21:54738 on AF=2 192.....33:2020
2021/10/05 11:56:18 socat[1744] I permitting connection from AF=2 192.....21:54738
2021/10/05 11:56:18 socat[1744] N forked off child process 1746
2021/10/05 11:56:18 socat[1744] I close(6)
2021/10/05 11:56:18 socat[1744] I still listening
2021/10/05 11:56:18 socat[1744] N listening on AF=2 0.0.0.0:2020
2021/10/05 11:56:18 socat[1746] I just born: child process 1746
2021/10/05 11:56:18 socat[1746] I just born: child process 1746
2021/10/05 11:56:18 socat[1746] I close(5)
2021/10/05 11:56:18 socat[1746] I interpreting address "/dev/ttyAMA0" as file name
2021/10/05 11:56:18 socat[1746] I setting option "raw"
2021/10/05 11:56:18 socat[1746] I setting option "echo" to 0
2021/10/05 11:56:18 socat[1746] I setting option "b115200"
2021/10/05 11:56:18 socat[1746] I "/dev/ttyAMA0" is not a socket, open()'ing it
2021/10/05 11:56:18 socat[1746] N opening character device "/dev/ttyAMA0" for reading and writing
2021/10/05 11:56:18 socat[1746] I open("/dev/ttyAMA0", 02002, 0666) -> 5
2021/10/05 11:56:18 socat[1746] I resolved and opened all sock addresses
2021/10/05 11:56:18 socat[1746] N starting data transfer loop with FDs [6,6] and [5,5]
2021/10/05 11:56:19 socat[1746] I transferred 8 bytes from 6 to 5
2021/10/05 11:56:22 socat[1746] I transferred 8 bytes from 6 to 5
2021/10/05 11:56:25 socat[1746] I transferred 8 bytes from 6 to 5
2021/10/05 11:56:28 socat[1746] I transferred 8 bytes from 6 to 5
2021/10/05 11:56:31 socat[1746] N socket 1 (fd 6) is at EOF
2021/10/05 11:56:31 socat[1744] I accept(5, {2, AF=2 192.....21:54748}, 16) -> 6
2021/10/05 11:56:31 socat[1744] N accepting connection from AF=2 192.....21:54748 on AF=2 192.....33:2020
2021/10/05 11:56:31 socat[1744] I permitting connection from AF=2 192.....21:54748
2021/10/05 11:56:31 socat[1744] N forked off child process 1747
2021/10/05 11:56:31 socat[1744] I close(6)
2021/10/05 11:56:31 socat[1744] I still listening
2021/10/05 11:56:31 socat[1744] N listening on AF=2 0.0.0.0:2020
2021/10/05 11:56:31 socat[1747] I just born: child process 1747
2021/10/05 11:56:31 socat[1747] I just born: child process 1747
2021/10/05 11:56:31 socat[1747] I close(5)
2021/10/05 11:56:31 socat[1747] I interpreting address "/dev/ttyAMA0" as file name
2021/10/05 11:56:31 socat[1747] I setting option "raw"
2021/10/05 11:56:31 socat[1747] I setting option "echo" to 0
2021/10/05 11:56:31 socat[1747] I setting option "b115200"
2021/10/05 11:56:31 socat[1747] I "/dev/ttyAMA0" is not a socket, open()'ing it
2021/10/05 11:56:31 socat[1747] N opening character device "/dev/ttyAMA0" for reading and writing
2021/10/05 11:56:31 socat[1747] I open("/dev/ttyAMA0", 02002, 0666) -> 5
2021/10/05 11:56:31 socat[1747] I resolved and opened all sock addresses
2021/10/05 11:56:31 socat[1747] N starting data transfer loop with FDs [6,6] and [5,5]
2021/10/05 11:56:31 socat[1746] I poll timed out (no data within 0.500000 seconds)
2021/10/05 11:56:31 socat[1746] I shutdown(6, 2)
2021/10/05 11:56:31 socat[1746] N exiting with status 0
2021/10/05 11:56:31 socat[1744] N childdied(): handling signal 17
2021/10/05 11:56:31 socat[1744] I childdied(signum=17)
2021/10/05 11:56:31 socat[1744] I childdied(17): cannot identify child 1746
2021/10/05 11:56:31 socat[1744] I waitpid(): child 1746 exited with status 0
2021/10/05 11:56:31 socat[1744] I waitpid(-1, {}, WNOHANG): no child has exited
2021/10/05 11:56:31 socat[1744] I childdied() finished
2021/10/05 11:56:32 socat[1747] I transferred 8 bytes from 6 to 5
2021/10/05 11:56:35 socat[1747] I transferred 8 bytes from 6 to 5
2021/10/05 11:56:38 socat[1747] I transferred 8 bytes from 6 to 5
2021/10/05 11:56:41 socat[1747] I transferred 8 bytes from 6 to 5
2021/10/05 11:56:44 socat[1747] N socket 1 (fd 6) is at EOF
2021/10/05 11:56:44 socat[1744] I accept(5, {2, AF=2 192.....21:54754}, 16) -> 6
2021/10/05 11:56:44 socat[1744] N accepting connection from AF=2 192.....21:54754 on AF=2 192.....33:2020
2021/10/05 11:56:44 socat[1744] I permitting connection from AF=2 192.....21:54754
2021/10/05 11:56:44 socat[1744] N forked off child process 1749
2021/10/05 11:56:44 socat[1744] I close(6)
2021/10/05 11:56:44 socat[1744] I still listening
2021/10/05 11:56:44 socat[1744] N listening on AF=2 0.0.0.0:2020
2021/10/05 11:56:44 socat[1749] I just born: child process 1749
2021/10/05 11:56:44 socat[1749] I just born: child process 1749
2021/10/05 11:56:44 socat[1749] I close(5)
2021/10/05 11:56:44 socat[1749] I interpreting address "/dev/ttyAMA0" as file name
2021/10/05 11:56:44 socat[1749] I setting option "raw"
2021/10/05 11:56:44 socat[1749] I setting option "echo" to 0
2021/10/05 11:56:44 socat[1749] I setting option "b115200"
2021/10/05 11:56:44 socat[1749] I "/dev/ttyAMA0" is not a socket, open()'ing it
2021/10/05 11:56:44 socat[1749] N opening character device "/dev/ttyAMA0" for reading and writing
2021/10/05 11:56:44 socat[1749] I open("/dev/ttyAMA0", 02002, 0666) -> 5
2021/10/05 11:56:44 socat[1749] I resolved and opened all sock addresses
2021/10/05 11:56:44 socat[1749] N starting data transfer loop with FDs [6,6] and [5,5]
2021/10/05 11:56:44 socat[1747] I poll timed out (no data within 0.500000 seconds)
2021/10/05 11:56:44 socat[1747] I shutdown(6, 2)
2021/10/05 11:56:44 socat[1747] N exiting with status 0
2021/10/05 11:56:44 socat[1744] N childdied(): handling signal 17
2021/10/05 11:56:44 socat[1744] I childdied(signum=17)
2021/10/05 11:56:44 socat[1744] I childdied(17): cannot identify child 1747
2021/10/05 11:56:44 socat[1744] I waitpid(): child 1747 exited with status 0
2021/10/05 11:56:44 socat[1744] I waitpid(-1, {}, WNOHANG): no child has exited
2021/10/05 11:56:44 socat[1744] I childdied() finished
2021/10/05 11:56:45 socat[1749] I transferred 8 bytes from 6 to 5
2021/10/05 11:56:48 socat[1749] I transferred 8 bytes from 6 to 5
2021/10/05 11:56:51 socat[1749] I transferred 8 bytes from 6 to 5
2021/10/05 11:56:54 socat[1749] I transferred 8 bytes from 6 to 5
2021/10/05 11:56:57 socat[1749] N socket 1 (fd 6) is at EOF
2021/10/05 11:56:57 socat[1744] I accept(5, {2, AF=2 192.....21:54760}, 16) -> 6
2021/10/05 11:56:57 socat[1744] N accepting connection from AF=2 192.....21:54760 on AF=2 192.....33:2020
2021/10/05 11:56:57 socat[1744] I permitting connection from AF=2 192.....21:54760
2021/10/05 11:56:57 socat[1744] N forked off child process 1750
2021/10/05 11:56:57 socat[1744] I close(6)
2021/10/05 11:56:57 socat[1744] I still listening
2021/10/05 11:56:57 socat[1744] N listening on AF=2 0.0.0.0:2020
2021/10/05 11:56:57 socat[1750] I just born: child process 1750
2021/10/05 11:56:57 socat[1750] I just born: child process 1750
2021/10/05 11:56:57 socat[1750] I close(5)
2021/10/05 11:56:57 socat[1750] I interpreting address "/dev/ttyAMA0" as file name
2021/10/05 11:56:57 socat[1750] I setting option "raw"
2021/10/05 11:56:57 socat[1750] I setting option "echo" to 0
2021/10/05 11:56:57 socat[1750] I setting option "b115200"
2021/10/05 11:56:57 socat[1750] I "/dev/ttyAMA0" is not a socket, open()'ing it
2021/10/05 11:56:57 socat[1750] N opening character device "/dev/ttyAMA0" for reading and writing
2021/10/05 11:56:57 socat[1750] I open("/dev/ttyAMA0", 02002, 0666) -> 5
2021/10/05 11:56:57 socat[1750] I resolved and opened all sock addresses
2021/10/05 11:56:57 socat[1750] N starting data transfer loop with FDs [6,6] and [5,5]
2021/10/05 11:56:57 socat[1749] I poll timed out (no data within 0.500000 seconds)
2021/10/05 11:56:57 socat[1749] I shutdown(6, 2)
2021/10/05 11:56:57 socat[1749] N exiting with status 0
2021/10/05 11:56:57 socat[1744] N childdied(): handling signal 17
2021/10/05 11:56:57 socat[1744] I childdied(signum=17)
2021/10/05 11:56:57 socat[1744] I childdied(17): cannot identify child 1749
2021/10/05 11:56:57 socat[1744] I waitpid(): child 1749 exited with status 0
2021/10/05 11:56:57 socat[1744] I waitpid(-1, {}, WNOHANG): no child has exited
2021/10/05 11:56:57 socat[1744] I childdied() finished
2021/10/05 11:56:58 socat[1750] I transferred 8 bytes from 6 to 5
2021/10/05 11:57:01 socat[1750] I transferred 8 bytes from 6 to 5
2021/10/05 11:57:04 socat[1750] I transferred 8 bytes from 6 to 5
2021/10/05 11:57:07 socat[1750] I transferred 8 bytes from 6 to 5
2021/10/05 11:57:10 socat[1750] N socket 1 (fd 6) is at EOF
2021/10/05 11:57:10 socat[1744] I accept(5, {2, AF=2 192.....21:54768}, 16) -> 6
2021/10/05 11:57:10 socat[1744] N accepting connection from AF=2 192.....21:54768 on AF=2 192.....33:2020
2021/10/05 11:57:10 socat[1744] I permitting connection from AF=2 192.....21:54768
2021/10/05 11:57:10 socat[1744] N forked off child process 1752
2021/10/05 11:57:10 socat[1744] I close(6)
2021/10/05 11:57:10 socat[1744] I still listening
2021/10/05 11:57:10 socat[1744] N listening on AF=2 0.0.0.0:2020
2021/10/05 11:57:10 socat[1752] I just born: child process 1752
2021/10/05 11:57:10 socat[1752] I just born: child process 1752
2021/10/05 11:57:10 socat[1752] I close(5)
2021/10/05 11:57:10 socat[1752] I interpreting address "/dev/ttyAMA0" as file name
2021/10/05 11:57:10 socat[1752] I setting option "raw"
2021/10/05 11:57:10 socat[1752] I setting option "echo" to 0
2021/10/05 11:57:10 socat[1752] I setting option "b115200"
2021/10/05 11:57:10 socat[1752] I "/dev/ttyAMA0" is not a socket, open()'ing it
2021/10/05 11:57:10 socat[1752] N opening character device "/dev/ttyAMA0" for reading and writing
2021/10/05 11:57:10 socat[1752] I open("/dev/ttyAMA0", 02002, 0666) -> 5
2021/10/05 11:57:10 socat[1752] I resolved and opened all sock addresses
2021/10/05 11:57:10 socat[1752] N starting data transfer loop with FDs [6,6] and [5,5]
2021/10/05 11:57:10 socat[1750] I poll timed out (no data within 0.500000 seconds)
2021/10/05 11:57:10 socat[1750] I shutdown(6, 2)
2021/10/05 11:57:10 socat[1750] N exiting with status 0
2021/10/05 11:57:10 socat[1744] N childdied(): handling signal 17
2021/10/05 11:57:10 socat[1744] I childdied(signum=17)
2021/10/05 11:57:10 socat[1744] I childdied(17): cannot identify child 1750
2021/10/05 11:57:10 socat[1744] I waitpid(): child 1750 exited with status 0
2021/10/05 11:57:10 socat[1744] I waitpid(-1, {}, WNOHANG): no child has exited
2021/10/05 11:57:10 socat[1744] I childdied() finished
2021/10/05 11:57:11 socat[1752] I transferred 8 bytes from 6 to 5
2021/10/05 11:57:14 socat[1752] I transferred 8 bytes from 6 to 5
2021/10/05 11:57:17 socat[1752] I transferred 8 bytes from 6 to 5
2021/10/05 11:57:19 socat[1752] N socket 1 (fd 6) is at EOF
2021/10/05 11:57:20 socat[1752] I poll timed out (no data within 0.500000 seconds)
2021/10/05 11:57:20 socat[1752] I shutdown(6, 2)
2021/10/05 11:57:20 socat[1752] N exiting with status 0
2021/10/05 11:57:20 socat[1744] N childdied(): handling signal 17
2021/10/05 11:57:20 socat[1744] I childdied(signum=17)
2021/10/05 11:57:20 socat[1744] I childdied(17): cannot identify child 1752
2021/10/05 11:57:20 socat[1744] I waitpid(): child 1752 exited with status 0
2021/10/05 11:57:20 socat[1744] I waitpid(-1, {}, WNOHANG): No child processes
2021/10/05 11:57:20 socat[1744] I childdied() finished
^C2021/10/05 11:57:26 socat[1744] N socat_signal(): handling signal 2
2021/10/05 11:57:26 socat[1744] N exiting on signal 2
2021/10/05 11:57:26 socat[1744] N socat_signal(): finishing signal 2
2021/10/05 11:57:26 socat[1744] N exit(130)


Damit klappt zumindest die LAN Verbindung in einer Richtung.
Aber /dev/ttyAMA0 scheint Probleme zu machen.
Kann jemand das interpretieren?
RASPI 4B, PI USV+, ext. SSD, ohne MicroSD
IO: CUL433,2xHMUART
HM, IT, Rev, AVM

Wernieman

- 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

@tango

RASPI 4B, PI USV+, ext. SSD, ohne MicroSD
IO: CUL433,2xHMUART
HM, IT, Rev, AVM

Otto123

Zitat von: Wernieman am 05 Oktober 2021, 12:32:19
Mit welchem User startest Du socat?
Du startest ev. systemctl mit user pi und sudo aber der Dienst läuft ja mit root (siehe Ausgabe oben) - oder geht es um den Test in #21?
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Wernieman

Es ging mir um die Interpretation des letzten Test .. also ja #21
- 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

@tango

Hi,

der Dienst wird doch normalerweise beim booten gestartet, also doch als root.
Ich habe jetzt meinen Trace ebenfalls als root nach

sudo su

wiederholt. Zusätzlich noch die -x option gesetzt:

root@raspicloud3:/home/pi# /usr/bin/socat -d -d -d  -x TCP4-LISTEN:2020,fork,reuseaddr /dev/ttyAMA0,raw,echo=0,b115200 2>&1
2021/10/05 13:24:59 socat[2816] I socat by Gerhard Rieger and contributors - see www.dest-unreach.org
2021/10/05 13:24:59 socat[2816] I This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)
2021/10/05 13:24:59 socat[2816] I This product includes software written by Tim Hudson (tjh@cryptsoft.com)
2021/10/05 13:24:59 socat[2816] I setting option "fork" to 1
2021/10/05 13:24:59 socat[2816] I setting option "so-reuseaddr" to 1
2021/10/05 13:24:59 socat[2816] I socket(2, 1, 6) -> 5
2021/10/05 13:24:59 socat[2816] I starting accept loop
2021/10/05 13:24:59 socat[2816] N listening on AF=2 0.0.0.0:2020
2021/10/05 13:25:21 socat[2816] I accept(5, {2, AF=2 192. ... .21:57362}, 16) -> 6
2021/10/05 13:25:21 socat[2816] N accepting connection from AF=2 192. ... .21:57362 on AF=2 192. ... .33:2020
2021/10/05 13:25:21 socat[2816] I permitting connection from AF=2 192. ... .21:57362
2021/10/05 13:25:21 socat[2816] N forked off child process 2820
2021/10/05 13:25:21 socat[2816] I close(6)
2021/10/05 13:25:21 socat[2816] I still listening
2021/10/05 13:25:21 socat[2816] N listening on AF=2 0.0.0.0:2020
2021/10/05 13:25:21 socat[2820] I just born: child process 2820
2021/10/05 13:25:21 socat[2820] I just born: child process 2820
2021/10/05 13:25:21 socat[2820] I close(5)
2021/10/05 13:25:21 socat[2820] I interpreting address "/dev/ttyAMA0" as file name
2021/10/05 13:25:21 socat[2820] I setting option "raw"
2021/10/05 13:25:21 socat[2820] I setting option "echo" to 0
2021/10/05 13:25:21 socat[2820] I setting option "b115200"
2021/10/05 13:25:21 socat[2820] I "/dev/ttyAMA0" is not a socket, open()'ing it
2021/10/05 13:25:21 socat[2820] N opening character device "/dev/ttyAMA0" for reading and writing
2021/10/05 13:25:21 socat[2820] I open("/dev/ttyAMA0", 02002, 0666) -> 5
2021/10/05 13:25:21 socat[2820] I resolved and opened all sock addresses
2021/10/05 13:25:21 socat[2820] N starting data transfer loop with FDs [6,6] and [5,5]
> 2021/10/05 13:25:22.452023  length=8 from=0 to=7
fd 00 03 00 01 00 9e 03
2021/10/05 13:25:22 socat[2820] I transferred 8 bytes from 6 to 5
> 2021/10/05 13:25:25.453357  length=8 from=8 to=15
fd 00 03 00 01 00 9e 03
2021/10/05 13:25:25 socat[2820] I transferred 8 bytes from 6 to 5
> 2021/10/05 13:25:28.458246  length=8 from=16 to=23
fd 00 03 00 01 00 9e 03
2021/10/05 13:25:28 socat[2820] I transferred 8 bytes from 6 to 5
> 2021/10/05 13:25:31.464128  length=8 from=24 to=31
fd 00 03 00 01 00 9e 03
2021/10/05 13:25:31 socat[2820] I transferred 8 bytes from 6 to 5
2021/10/05 13:25:34 socat[2820] N socket 1 (fd 6) is at EOF
2021/10/05 13:25:34 socat[2816] I accept(5, {2, AF=2 192. ... .21:57370}, 16) -> 6
2021/10/05 13:25:34 socat[2816] N accepting connection from AF=2 192. ... .21:57370 on AF=2 192. ... .33:2020
2021/10/05 13:25:34 socat[2816] I permitting connection from AF=2 192. ... .21:57370
2021/10/05 13:25:34 socat[2816] N forked off child process 2821
2021/10/05 13:25:34 socat[2816] I close(6)
2021/10/05 13:25:34 socat[2816] I still listening
2021/10/05 13:25:34 socat[2816] N listening on AF=2 0.0.0.0:2020
2021/10/05 13:25:34 socat[2821] I just born: child process 2821
2021/10/05 13:25:34 socat[2821] I just born: child process 2821
2021/10/05 13:25:34 socat[2821] I close(5)
2021/10/05 13:25:34 socat[2821] I interpreting address "/dev/ttyAMA0" as file name
2021/10/05 13:25:34 socat[2821] I setting option "raw"
2021/10/05 13:25:34 socat[2821] I setting option "echo" to 0
2021/10/05 13:25:34 socat[2821] I setting option "b115200"
2021/10/05 13:25:34 socat[2821] I "/dev/ttyAMA0" is not a socket, open()'ing it
2021/10/05 13:25:34 socat[2821] N opening character device "/dev/ttyAMA0" for reading and writing
2021/10/05 13:25:34 socat[2821] I open("/dev/ttyAMA0", 02002, 0666) -> 5
2021/10/05 13:25:34 socat[2821] I resolved and opened all sock addresses
2021/10/05 13:25:34 socat[2821] N starting data transfer loop with FDs [6,6] and [5,5]
2021/10/05 13:25:34 socat[2820] I poll timed out (no data within 0.500000 seconds)
2021/10/05 13:25:34 socat[2820] I shutdown(6, 2)
2021/10/05 13:25:34 socat[2820] N exiting with status 0
2021/10/05 13:25:34 socat[2816] N childdied(): handling signal 17
2021/10/05 13:25:34 socat[2816] I childdied(signum=17)
2021/10/05 13:25:34 socat[2816] I childdied(17): cannot identify child 2820
2021/10/05 13:25:34 socat[2816] I waitpid(): child 2820 exited with status 0
2021/10/05 13:25:34 socat[2816] I waitpid(-1, {}, WNOHANG): no child has exited
2021/10/05 13:25:34 socat[2816] I childdied() finished
> 2021/10/05 13:25:35.481998  length=8 from=0 to=7
fd 00 03 00 01 00 9e 03
2021/10/05 13:25:35 socat[2821] I transferred 8 bytes from 6 to 5
> 2021/10/05 13:25:38.486884  length=8 from=8 to=15
fd 00 03 00 01 00 9e 03
2021/10/05 13:25:38 socat[2821] I transferred 8 bytes from 6 to 5
> 2021/10/05 13:25:41.493071  length=8 from=16 to=23
fd 00 03 00 01 00 9e 03
2021/10/05 13:25:41 socat[2821] I transferred 8 bytes from 6 to 5
> 2021/10/05 13:25:44.496153  length=8 from=24 to=31
fd 00 03 00 01 00 9e 03
2021/10/05 13:25:44 socat[2821] I transferred 8 bytes from 6 to 5
2021/10/05 13:25:47 socat[2821] N socket 1 (fd 6) is at EOF
2021/10/05 13:25:47 socat[2816] I accept(5, {2, AF=2 192. ... .21:57376}, 16) -> 6
2021/10/05 13:25:47 socat[2816] N accepting connection from AF=2 192. ... .21:57376 on AF=2 192. ... .33:2020
2021/10/05 13:25:47 socat[2816] I permitting connection from AF=2 192. ... .21:57376
2021/10/05 13:25:47 socat[2816] N forked off child process 2823
2021/10/05 13:25:47 socat[2816] I close(6)
2021/10/05 13:25:47 socat[2816] I still listening
2021/10/05 13:25:47 socat[2816] N listening on AF=2 0.0.0.0:2020
2021/10/05 13:25:47 socat[2823] I just born: child process 2823
2021/10/05 13:25:47 socat[2823] I just born: child process 2823
2021/10/05 13:25:47 socat[2823] I close(5)
2021/10/05 13:25:47 socat[2823] I interpreting address "/dev/ttyAMA0" as file name
2021/10/05 13:25:47 socat[2823] I setting option "raw"
2021/10/05 13:25:47 socat[2823] I setting option "echo" to 0
2021/10/05 13:25:47 socat[2823] I setting option "b115200"
2021/10/05 13:25:47 socat[2823] I "/dev/ttyAMA0" is not a socket, open()'ing it
2021/10/05 13:25:47 socat[2823] N opening character device "/dev/ttyAMA0" for reading and writing
2021/10/05 13:25:47 socat[2823] I open("/dev/ttyAMA0", 02002, 0666) -> 5
2021/10/05 13:25:47 socat[2823] I resolved and opened all sock addresses
2021/10/05 13:25:47 socat[2823] N starting data transfer loop with FDs [6,6] and [5,5]
2021/10/05 13:25:48 socat[2821] I poll timed out (no data within 0.500000 seconds)
2021/10/05 13:25:48 socat[2821] I shutdown(6, 2)
2021/10/05 13:25:48 socat[2821] N exiting with status 0
2021/10/05 13:25:48 socat[2816] N childdied(): handling signal 17
2021/10/05 13:25:48 socat[2816] I childdied(signum=17)
2021/10/05 13:25:48 socat[2816] I childdied(17): cannot identify child 2821
2021/10/05 13:25:48 socat[2816] I waitpid(): child 2821 exited with status 0
2021/10/05 13:25:48 socat[2816] I waitpid(-1, {}, WNOHANG): no child has exited
2021/10/05 13:25:48 socat[2816] I childdied() finished
> 2021/10/05 13:25:48.523764  length=8 from=0 to=7
fd 00 03 00 01 00 9e 03
2021/10/05 13:25:48 socat[2823] I transferred 8 bytes from 6 to 5
2021/10/05 13:25:50 socat[2823] N socket 1 (fd 6) is at EOF
2021/10/05 13:25:50 socat[2823] I poll timed out (no data within 0.500000 seconds)
2021/10/05 13:25:50 socat[2823] I shutdown(6, 2)
2021/10/05 13:25:50 socat[2823] N exiting with status 0
2021/10/05 13:25:50 socat[2816] N childdied(): handling signal 17
2021/10/05 13:25:50 socat[2816] I childdied(signum=17)
2021/10/05 13:25:50 socat[2816] I childdied(17): cannot identify child 2823
2021/10/05 13:25:50 socat[2816] I waitpid(): child 2823 exited with status 0
2021/10/05 13:25:50 socat[2816] I waitpid(-1, {}, WNOHANG): No child processes
2021/10/05 13:25:50 socat[2816] I childdied() finished


Sieht gleich aus.
Die empfangenen Daten stimmen meiner Erinnerung nach laut verbose=5 mit den vom FHEM raspi gesendeten überein.
Es wird aber nichts zurück gesendet!!
RASPI 4B, PI USV+, ext. SSD, ohne MicroSD
IO: CUL433,2xHMUART
HM, IT, Rev, AVM

@tango

Hi,

Als Vergleich, so sieht das auf dem funktionierenden testraspi aus:


root@testraspi:/home/pi# /usr/bin/socat -d -d -d -x TCP4-LISTEN:2020,fork,reuseaddr /dev/ttyAMA0,raw,echo=0,b115200 2>&1
2021/10/05 13:56:03 socat[861] I socat by Gerhard Rieger and contributors - see www.dest-unreach.org
2021/10/05 13:56:03 socat[861] I This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)
2021/10/05 13:56:03 socat[861] I This product includes software written by Tim Hudson (tjh@cryptsoft.com)
2021/10/05 13:56:03 socat[861] I setting option "fork" to 1
2021/10/05 13:56:03 socat[861] I setting option "so-reuseaddr" to 1
2021/10/05 13:56:03 socat[861] I socket(2, 1, 6) -> 5
2021/10/05 13:56:03 socat[861] I starting accept loop
2021/10/05 13:56:03 socat[861] N listening on AF=2 0.0.0.0:2020
2021/10/05 13:56:21 socat[861] I accept(5, {2, AF=2 192. ... .21:53188}, 16) -> 6
2021/10/05 13:56:21 socat[861] N accepting connection from AF=2 192. ... .21:53188 on AF=2 192. ... .40:2020
2021/10/05 13:56:21 socat[861] I permitting connection from AF=2 192. ... .21:53188
2021/10/05 13:56:21 socat[861] N forked off child process 862
2021/10/05 13:56:21 socat[861] I close(6)
2021/10/05 13:56:21 socat[861] I still listening
2021/10/05 13:56:21 socat[861] N listening on AF=2 0.0.0.0:2020
2021/10/05 13:56:21 socat[862] I just born: child process 862
2021/10/05 13:56:21 socat[862] I just born: child process 862
2021/10/05 13:56:21 socat[862] I close(5)
2021/10/05 13:56:21 socat[862] I interpreting address "/dev/ttyAMA0" as file name
2021/10/05 13:56:21 socat[862] I setting option "raw"
2021/10/05 13:56:21 socat[862] I setting option "echo" to 0
2021/10/05 13:56:21 socat[862] I setting option "b115200"
2021/10/05 13:56:21 socat[862] I "/dev/ttyAMA0" is not a socket, open()'ing it
2021/10/05 13:56:21 socat[862] N opening character device "/dev/ttyAMA0" for reading and writing
2021/10/05 13:56:21 socat[862] I open("/dev/ttyAMA0", 02002, 0666) -> 5
2021/10/05 13:56:21 socat[862] I resolved and opened all sock addresses
2021/10/05 13:56:21 socat[862] N starting data transfer loop with FDs [6,6] and [5,5]
> 2021/10/05 13:56:22.033217  length=8 from=0 to=7
fd 00 03 00 01 00 9e 03
2021/10/05 13:56:22 socat[862] I transferred 8 bytes from 6 to 5
< 2021/10/05 13:56:22.035255  length=8 from=0 to=7
fd 00 0d 00 01 04 02 43
2021/10/05 13:56:22 socat[862] I transferred 8 bytes from 5 to 6
< 2021/10/05 13:56:22.035937  length=8 from=8 to=15
6f 5f 43 50 55 5f 42 4c
2021/10/05 13:56:22 socat[862] I transferred 8 bytes from 5 to 6
< 2021/10/05 13:56:22.036403  length=2 from=16 to=17
7f 7b
2021/10/05 13:56:22 socat[862] I transferred 2 bytes from 5 to 6
> 2021/10/05 13:56:22.053085  length=8 from=8 to=15
fd 00 03 00 02 03 94 09
2021/10/05 13:56:22 socat[862] I transferred 8 bytes from 6 to 5
< 2021/10/05 13:56:22.479686  length=8 from=18 to=25
fd 00 04 00 02 04 01 19
2021/10/05 13:56:22 socat[862] I transferred 8 bytes from 5 to 6
< 2021/10/05 13:56:22.480247  length=1 from=26 to=26
16
2021/10/05 13:56:22 socat[862] I transferred 1 bytes from 5 to 6
< 2021/10/05 13:56:22.491973  length=8 from=27 to=34
fd 00 0d 00 00 00 43 6f
2021/10/05 13:56:22 socat[862] I transferred 8 bytes from 5 to 6
00 00 80 14 c5 00 00 00

......


2021/10/05 13:56:31 socat[862] I transferred 8 bytes from 5 to 6
< 2021/10/05 13:56:31.779216  length=7 from=544 to=550
00 00 08 eb 02 dc 3b
2021/10/05 13:56:31 socat[862] I transferred 7 bytes from 5 to 6
> 2021/10/05 13:56:40.812263  length=8 from=462 to=469
fd 00 03 00 26 08 cc 30
2021/10/05 13:56:40 socat[862] I transferred 8 bytes from 6 to 5
< 2021/10/05 13:56:40.814834  length=8 from=551 to=558
fd 00 05 00 26 04 02 00
2021/10/05 13:56:40 socat[862] I transferred 8 bytes from 5 to 6
< 2021/10/05 13:56:40.815324  length=2 from=559 to=560
34 59
2021/10/05 13:56:40 socat[862] I transferred 2 bytes from 5 to 6
> 2021/10/05 13:56:40.816492  length=8 from=470 to=477
fd 00 03 00 27 03 ca 0a
2021/10/05 13:56:40 socat[862] I transferred 8 bytes from 6 to 5
2021/10/05 13:56:40 socat[862] W read(6, 0x1969cd8, 8192): Connection reset by peer
2021/10/05 13:56:40 socat[862] N socket 1 to socket 2 is in error
2021/10/05 13:56:40 socat[862] N socket 1 (fd 6) is at EOF
< 2021/10/05 13:56:40.818803  length=8 from=561 to=568
fd 00 04 00 27 04 01 9b
2021/10/05 13:56:40 socat[862] E write(6, 0x1969cd8, 8): Broken pipe
2021/10/05 13:56:40 socat[862] N exit(1)
2021/10/05 13:56:40 socat[862] I shutdown(6, 2)
2021/10/05 13:56:40 socat[862] I shutdown(6, 2): Transport endpoint is not connected
2021/10/05 13:56:40 socat[861] N childdied(): handling signal 17
2021/10/05 13:56:40 socat[861] I childdied(signum=17)
2021/10/05 13:56:40 socat[861] I childdied(17): cannot identify child 862
2021/10/05 13:56:40 socat[861] I waitpid(): child 862 exited with status 1
2021/10/05 13:56:40 socat[861] I waitpid(-1, {}, WNOHANG): No child processes
2021/10/05 13:56:40 socat[861] I childdied() finished


Außer dass er sendet, auch nicht anders. :-[
RASPI 4B, PI USV+, ext. SSD, ohne MicroSD
IO: CUL433,2xHMUART
HM, IT, Rev, AVM

@tango

Hi,

Der Fehler ist gefunden.

Der nextcloud raspi telefoniert jetzt mit HMUART nach Hause.

In den raspi-config gibt es seit raspberry pi 4 einen Eintrag


   raspi-config>Performance Options>Fan>Would you like to enable fan temperature control?


Der muss auf Nein stehen.

Aus historischen Gründen hatte ich den bei mir gesetzt, weil mein raspi mit Lüfter geliefert wurde.
Der dazu passenden raspi pin liegt im Bereich der pins des HMUART.

Ich danke euch allen für die Mühe, die ihr mit mir hattet.

"Wer den Fehler nicht findet, sucht an der falschen Stelle"
hat sich wieder mal bewahrheitet.
RASPI 4B, PI USV+, ext. SSD, ohne MicroSD
IO: CUL433,2xHMUART
HM, IT, Rev, AVM

Wernieman

Naja .. wollte Dich gerade darauf Hinweisen, das sie eben NICHT gleich sein ...
2021/10/05 13:25:34 socat[2821] N starting data transfer loop with FDs [6,6] and [5,5]
2021/10/05 13:25:34 socat[2820] I poll timed out (no data within 0.500000 seconds)
2021/10/05 13:25:34 socat[2820] I shutdown(6, 2)
2021/10/05 13:25:34 socat[2820] N exiting with status 0


Da dürfte ein andere Programm reinschnippen .. was Du eben auch gefunden hast ;o)

Aber für die Zukunft:
Baue ein Server möglichst simpel auf und dazu gehört: keine grafische Oberfläche ...
- 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