- Platform information:
- Hardware: Raspberry PI 4 -
- OS: Strech
- Java 11.0.5
- openHAB version: 2.4
*RFlink on Wemos® Mega +WiFi R3 Module ATmega2560+ESP8266 32Mb Memory USB-TTL CH340G Compatible For Arduino Mega NodeMCU ESP8266
Everything works correctly when connected to USB
*** Items configuration related to the issue**
String RFLinkRaw "RFLink raw data [%s]" <text> { serial="/dev/ttyAMA0@57600", autoupdate="false" }
*** Sitemap configuration related to the issue**
sitemap rflink label= "RFlink"
{
Text item=RFLinkRaw
}
But I can not find the configuration to use it in WIFI to deport to another location
I tested under telnet and I visualize the information sent by RFlink/ESP_Easy
I installed ser2net and socat on my RPI4 (IP:192.168.0.27)
my /etc/ser2net.conf
8000:raw:0:/dev/ttyAMA0:57600 8DATABITS NONE 1STOPBIT
my /etc/default/socat.conf
OPTIONS="pty,link=/dev/ttyUSB0,raw,user=openhab,group=dialout,mode=777 tcp:192.168.0.27:8000"
Service Verification for ser2net:
systemctl status ser2net
● ser2net.service - LSB: Allows network connections to serial ports
Loaded: loaded (/etc/init.d/ser2net; generated)
Active: active (running) since Sun 2019-11-24 20:10:27 CET; 11h ago
Docs: man:systemd-sysv-generator(8)
Process: 1976 ExecStart=/etc/init.d/ser2net start (code=exited, status=0/SUCCE
Tasks: 1 (limit: 4915)
Memory: 1.7M
CGroup: /system.slice/ser2net.service
└─1984 /usr/sbin/ser2net -c /etc/ser2net.conf -P /run/ser2net.pid
nov. 24 20:10:27 pi4 systemd[1]: Starting LSB: Allows network connections to ser
nov. 24 20:10:27 pi4 ser2net[1982]: ser2net startup
nov. 24 20:10:27 pi4 ser2net[1976]: Starting Serial port to network proxy: ser2n
nov. 24 20:10:27 pi4 systemd[1]: Started LSB: Allows network connections to seri
lines 1-14/14 (END)
Service Verification for socat:
systemctl status socat
● socat.service - LSB: Start/stop (socat a multipurpose relay)
Loaded: loaded (/etc/init.d/socat; generated)
Active: active (running) since Sun 2019-11-24 20:19:29 CET; 11h ago
Docs: man:systemd-sysv-generator(8)
Process: 2377 ExecStart=/etc/init.d/socat start (code=exited, status=0/SUCCESS
Tasks: 1 (limit: 4915)
Memory: 804.0K
CGroup: /system.slice/socat.service
└─2383 /usr/bin/socat -d -d -d -lf /var/log/socat.log pty,link=/dev/t
nov. 24 20:19:29 pi4 systemd[1]: Starting LSB: Start/stop (socat a multipurpose
nov. 24 20:19:29 pi4 socat[2377]: Starting multipurpose relay: socat.
nov. 24 20:19:29 pi4 systemd[1]: Started LSB: Start/stop (socat a multipurpose r
lines 1-13/13 (END)
tail -f /var/log/socat.log
2019/11/24 20:19:29 socat[2383] I setting option “perm” to 511
2019/11/24 20:19:29 socat[2383] I openpty({6}, {7}, {"/dev/pts/2"},) -> 0
2019/11/24 20:19:29 socat[2383] N PTY is /dev/pts/2
2019/11/24 20:19:29 socat[2383] N opening connection to AF=2 192.168.0.27:8000
2019/11/24 20:19:29 socat[2383] I starting connect loop
2019/11/24 20:19:29 socat[2383] I socket(2, 1, 6) -> 8
2019/11/24 20:19:29 socat[2383] N successfully connected from local address AF=2 192.168.0.27:49866
2019/11/24 20:19:29 socat[2383] I resolved and opened all sock addresses
2019/11/24 20:19:29 socat[2383] N starting data transfer loop with FDs [6,6] and [8,8]
2019/11/24 20:21:21 socat[2383] I transferred 3 bytes from 6 to 8
ls -lah /dev/ttyU*
lrwxrwxrwx 1 root root 10 nov. 24 20:19 /dev/ttyUSB0 -> /dev/pts/2
And so I modified the item that was related to the physical USB port (ttyAMA0) to receive socat as follows to virtual -> ttyUSB0
String RFLinkRaw "RFLink raw data [%s]" <text> { serial="/dev/ttyUSB0@57600", autoupdate="false" }
And there I receive absolutely nothing!
I do not understand why it does not work!
Help !!