raspi as a wireless feedback module

Helge
Posts: 114
Joined: 31.05.2010, 18:32

Post by Helge » 16.08.2013, 20:28

Hello Richard,

Thank you for your comprehensive explanation and sorry for my delayed response .
As far as I understand in order to use srcp for accessory decoder communication I have to register every single raspi accessory decoder as a command station.
Only the command station have a tcp/ip address and every raspi accessory has a very simple srcp server installed just to receive und accept the accessory decoder commands. But I doubt that this a reasonable solution.
I discussed this issue with a friend and I found in the wiki a protocol called "rocnet" using udp multicast communication. This seems to be a viable solution, but at least for me a challenge to code the udp communication in python.
I will think it over a while.

Helge

Richard-TX
Posts: 1320
Joined: 10.07.2012, 04:00
Location: Texas, USA
Contact:

Post by Richard-TX » 16.08.2013, 21:01

Having to define another command station is a fallacy.

Actually there is no need to define anything as a command station when using Rocrail's built in srcp server.

Here is how to do it.

Enable srcp within rocrail. Restart Rocrail.

configure a sensor with no IID, bus = 0, address = 10 (or some other address that is unused.

Telnet to the machine that is running rocrail using port 4303
type "go"
type "set 1 fb 10 1"
that turns on #10 sensor
sending a "set 1 fb 10 0" turns the sensor off

It is just that simple.


Here is a sample session using feedback addr #1

# telnet 10.232.1.101 4303
Trying 10.232.1.101...
Connected to 10.232.1.101.
Escape character is '^]'.
Rocrail 2.0r5286; SRCP 0.8.4; SRCPOTHER 0.8.3
go
1376682802.944 200 OK GO 1
set 1 fb 1 1
1376682810.574 200 OK
set 1 fb 1 0
1376682839.471 200 OK

In the case above I was using the demo layout with no controllers defined.

Richard-TX
Posts: 1320
Joined: 10.07.2012, 04:00
Location: Texas, USA
Contact:

Post by Richard-TX » 16.08.2013, 21:15

Many thanks to Lothar and Rob for the excellent work on the srcp implementation in Rocrail. It is slicker than greasy teflon. :lol:

rjversluis
Site Admin
Posts: 40997
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 10.10.2013, 13:11

The script and the Rocrail server trace are missing in your zip.

Try to activate automatic trace level to seen unregistered sensor events.

rjversluis
Site Admin
Posts: 40997
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 10.10.2013, 15:28

Still no rocrail.*.trc attached with the needed info.

Pirat-Kapitan
Moderator
Posts: 4904
Joined: 06.02.2010, 15:46
Location: Rösrath bei Köln / Germany

Post by Pirat-Kapitan » 10.10.2013, 20:41

Hi Halvor,
do You have a /opt/rocrail/nohup.out file?
It is like the last *.trc of rocrail.

Best regards
Johannes

Pirat-Kapitan
Moderator
Posts: 4904
Joined: 06.02.2010, 15:46
Location: Rösrath bei Köln / Germany

Post by Pirat-Kapitan » 12.10.2013, 17:17

Hi Halvor,
I use the instructions by Manolo Serano from the english part of this forum.
Hi modified the file /opt/rocrail/rocraild.sh to get a via WLAN readable rocrail-output.

best regards
johannes

MS instructions:
http://tren.enmicasa.net/wp-content/upl ... i_v1.4.pdf
Attachments
rocraild.zip
(353 Bytes) Downloaded 47 times

gramels
Posts: 221
Joined: 24.12.2009, 08:32
Location: around Zürich/ Switzerland and SouthWest Germany (Südbaden)

Post by gramels » 13.02.2014, 22:24

Hi folks,

I am looking in the same topic, wireless rfid reader on the loko, G gauge, RFID tags on the track.

I start to consider to use WIFI UART modules ( like http://www.shuncomwireless.com/sell-mod ... 08863.html ) and attach a ID20 RFID reader to it. Connection to rocrail via wireless, on the rocrail side I need to check, but I guess this might be relatively easy to map in.
This would eliminate the whole rasp-pi on the Loko and make it way smaller, so it might fit alos in small Diesel shunters.

I started a threat about this in german here http://forum.rocrail.net/viewtopic.php?p=64072#64072

Thoughts?

Cheers

Lothar

Post Reply

Return to “DIY Hardware”