[SOLVED] "RFXCOM USB Transceiver over TCP/IP" wont work with an RFX trx433e on an RPi running sre2net

Hello! First post.

Setup:
Machine1: Atom300 4GB+40GB SSD, Debian 10 light SMP Debian 4.19.67-2+deb10u1, Zulu 8.42.0.23-CA-linux64, OpenHAB 2.4.0-1
Machine2: Raspberry Pie 2b raspbian 10 light, ser2net

Machine 1&2 are connected via wired network. ssh works for both machines

I have previously run OpenHAB2 on my Machine 2, but the cpu-load is getting too much, so Openhab was moved to Machine 1. An RFXtrx433e is still connected to the machine 2, and I would like to controlit from OpenHAB2 on machine 1. Configuring a “RFXCOM USB Transceiver over TCP/IP” in openhab on machine 1 and ser2net on machine 2 gives some signs of life, but does not work.

Symptoms:

  • The thing is offline
  • The openhab.log keeps repeting “2019-12-11 23:04:39.139 [INFO ] [nternal.connector.RFXComTcpConnector] - Connecting to RFXCOM at 192.168.1.62:10001 over TCP/IP”
  • netstat on machine 2 keepsd reporting “tcp6 0 0 192.168.1.62:10001 192.168.1.58:47598 ESTABLISHED”
  • If I change the port in openhab to something wrong (say 10002), I get a connection refused error in the log "2019-12-11 22:39:18.606 [ERROR] [g.rfxcom.handler.RFXComBridgeHandler] - Connection to RFXCOM transceiver failed
    java.net.ConnectException: Connection refused (Connection refused)
    "
  • Running telnet to the ser2net-port after stopping the thing seems to work (no connection errors)

Some possibly relevant configuration files:
ser2net.conf: 10001:raw:0:/dev/ttyUSB_RFXtrx433e0:115200

/etc/udev/rules.d/10-usb-tty-maps.rules
SUBSYSTEM==“tty”, ATTRS{manufacturer}==“RFXCOM”, ATTRS{product}==“RFXtrx433”, ATTRS{serial}==“A1Z95G5G”, MODE=“0660”, GROUP=“dialout”, SYMLINK+=“ttyUSB_RFXtrx433e0”

All openhab settings done using PaperUI

Any input appreciated!

The RFXtrx needs 38400baud.

sudo nano /etc/ser2net.conf
10001:raw:0:/dev/ttyUSB0:38400 8DATABITS NONE 1STOPBIT

Hi,

here are my settings, which are working stable:

udev rule:
/lib/udev/rules.d/99-usbsticks.rules
SUBSYSTEM==“tty”, ATTRS{serial}==“A1WJAIY0”, SYMLINK+=“rfxtrx”

ser2net:
/etc/ser2net.conf
1001:raw:0:/dev/rfxtrx:38400 NONE 1STOPBIT 8DATABITS

Thanks! Now its working :slight_smile:

But I dont like berts edit solution. This is how I do it:

cat /etc/ser2net.conf # Look at the file. The config line is at the bottom
cat /etc/ser2net.conf | wc -l # Find out the length of the file (84)
cat /etc/ser2net.conf | head -83 > tmp # Copy all but the old config line
echo ‘10001:raw:0:/dev/ttyUSB_RFXtrx433e0:38400 8DATABITS NONE 1STOPBIT’ >> tmp # Add a new config line
sudo bash
cat tmp > /etc/ser2net.conf # Erite a new config file (without affecting file mode or owner)
kill -1 cat /run/ser2net.pid # Send SIGHUP to ser2net to make it reread its config file

I think interactive software (except shells and logins) on UNIX-like OS:es should be banned :stuck_out_tongue: