Page 1 of 1
Need help with ser2net
Posted: Tuesday 06 August 2013 19:22
by Jochen
What i want to do:
I have one Raspberry PI where i connect my RFXtrx433 USB
And i have another PI where i want to use the RFXtrx433 USB also.
Is this possible? Is ser2net the right tool to do that?
Can someone help me?
Thanks,
Jochen
Re: Need help with ser2net
Posted: Tuesday 06 August 2013 19:33
by tommit01
Why don't you use built in sharing of domoticz?
BR
Tommit01
Re: Need help with ser2net
Posted: Tuesday 06 August 2013 19:43
by Jochen
The second PI is my "development-machine" where i want to test my own software.
I will try to create an decoder for undecodet signals.
And there i don“t want to use domoticz.
I want to call the RFX directly and not requesting the status of devices.
Re: Need help with ser2net
Posted: Friday 11 December 2015 9:35
by alfred_j_kwak
Can someone add to Wiki the rest of process?
https://www.domoticz.com/wiki/SharingSerialDevices
After installing ser2net and setting .conf-file you can add new hardware into Domoticz -> "
RFXCOM - RFXtrx shared over LAN interface" with remote machine IP and .conf-file port.
Does someone knows correct baudrate settings for RFXCom? I use "
3001:raw:0:/dev/ttyUSB0:38400 8DATABITS NONE 1STOPBIT" and it seems to transmit ok, but I don't have any sensors into other end.
Is it confusing if there is settings for different devices in wiki (Z-wave, RFXCom, etc.)?
Also maybe mention about using dmesg | grep tty in remote machine to find out name of the serial port.
Re: Need help with ser2net
Posted: Friday 11 December 2015 10:11
by ThinkPad
Re: Need help with ser2net
Posted: Friday 11 December 2015 10:27
by alfred_j_kwak
Yes I watch it, but in my case I find much more easier just use ser2net. I don't need any client to run in my Pi server. I even try to test VirtualHere, but it doesn't worked instantly - more or less my fault, because I cant use it - and ser2net does, so thats my winner here.
What are advantages in VirtualHere against ser2net?
(I still miss IRQs and DMAs...

)
Re: Need help with ser2net
Posted: Friday 11 December 2015 11:19
by b_weijenberg
Disable Serial Console
======================
sudo nano /etc/inittab
insert a # sign in front of this line:
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
ctrl-O
Enter
ctrl-x
Remove console
==============
sudo nano /boot/cmdline.txt
delete these 2 fields: console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
ctrl-O
Enter
ctrl-x
Add ser2net
===========
sudo apt-get install ser2net
sudo nano /etc/ser2net.conf
10001:raw:0:/dev/ttyUSB0:38400 8DATABITS NONE 1STOPBIT
10002:raw:0:/dev/ttyUSB1:38400 8DATABITS NONE 1STOPBIT
sudo /etc/init.d/ser2net restart
Autostart ser2net
=================
sudo nano /etc/rc.local
add the next line before exit o :
/usr/local/sbin/ser2net -n
Re: Need help with ser2net
Posted: Friday 11 December 2015 12:07
by alfred_j_kwak
May I ask what is that serial console for? I suppose ttyAMA0 is serial via Raspberry GPIO.
Also what is USB1 in ser2net.conf?
EDIT: Ok. Found some additional info from here:
http://www.hobbytronics.co.uk/raspberry-pi-serial-port
EDIT2: Now I don't understand why GPIO serial port has to be disconnected from Linux to use ser2net with ttyUSB0?
Re: Need help with ser2net
Posted: Friday 11 December 2015 12:38
by b_weijenberg
You connect 2 RFXtrx devices and access the 1st RFXtrx on port 10001 and the 2nd RFXtrx on port 10002
Re: Need help with ser2net
Posted: Friday 11 December 2015 13:10
by alfred_j_kwak
Thank you.
So in my case when other RFXCom is connected straight into server I just use USB0.
Seems simple - at least it is working now.
