Home - manu-fwi/openlcb-gateway GitHub Wiki
A quick note on how it works. You need two programs running (on linux for now, but someone can adapt it easily probably for windows):
openlcb-gateway.py
This is the main server which is listening on two ports:
- server_base_port: by default 50000 on which JMRI must connect (OpenLCB / CAN via gridconnect Network interface / IP / port 50000 / protocol OpenLCB)
- server_base_port+1 : this port listens for the serial interface programs that communicate with the CMRI or RR-Duino network nodes.
This program has one configuration file.
openlcb_gateway.cfg
Contains a dict (JSON formatted) here is an example:
{
"server_ip":"192.168.0.1",
"server_base_port":50000
}
If it does not find it, it will set "reasonable defaults": server IP/port is 127.0.0.1:50000
NOTE: The server_ip is the IP address the gateway will listen on. If your PC/Pi has multiple IP, then you must choose which one to listen on. The IP address should also be the IP address used when configuring your Serial Interfaces (CMRI/RR-duino).
Once you have this initial configuration file setup, you can start the gateway program.
python3 openlcb_gateway.py
Serial Interface Program
Now that you have the gateway running, it is time to connect your RS485 network of nodes to the gateway. To setup the serial interface program, follow one of the wiki pages listed below.
Remember this is still alpha stage ;-)