This is a short note how to get LbServer V1 running on a Raspberry Pi.
We used:
raspberry
ssh -X pi@192.168.213.168
).pi
using password raspberry
.sudo raspi-config
and rebootReconnect through ssh to update:
$ sudo apt-get update
$ sudo apt-get upgrade
This triggered updating some kernel files so a reboot was required:
$ sudo reboot
Connect again and finish installation:
$ sudo apt-get install oracle-java8-jdk
$ java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)
$
$ # FIXME: fix url, add -o lbserver1_r415.run when required, fix checksum
$ # https://sourceforge.net/projects/loconetovertcp/files/LbServer1/1.0/lbserver1_r415.run/download
$ # https://sourceforge.net/projects/loconetovertcp/files/LbServer1/1.0/lbserver1_r415.run
$ wget http://192.168.213.8/~martin/lbserver1_r415.run
$ sha1sum lbserver1_r415.run
1bb981dd370bc3a4d15c6a2a5e03db87e9429277 lbserver1_r415.run
$ sudo sh lbserver1_r415.run
Verifying archive integrity... All good.
Uncompressing LbServer trunk from LocoNet over TCP Project 100%
make directory /opt/lbserver1
copy files to /opt/lbserver1
setting owner and access mode
create logging directory /var/log/lbserver1
create links 'lbserver' and 'lbservercfg' in /usr/local/bin
$ sudo mkdir /etc/opt/lbserver1
$ sudo cp /opt/lbserver1/LbServer.properties /etc/opt/lbserver1/
$
Plug the LocoBuffer-USB in the USB port of the Raspberry Pi and validate
that this loads device driver and creates device /dev/ttyUSB0
:
$ tail /var/log/messages
usb 1-1.3: new full-speed USB device number 1 using dwc_otg
usb 1-1.3: New USB device found, idVendor=0403, idProduct=c7d0
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.3: Product: LocoBuffer-USB
usb 1-1.3: Manufacturer: RR-CirKits
usb 1-1.3: SerialNumber: FTOVCXPZ
ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
usb 1-1.3: Detected FT232RL
usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0
$ ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Aug 10 11:39 /dev/ttyUSB0
$
Configure by editing /etc/opt/lbserver1/LbServer.properties
. You can use
nano or vi as editor:
$ sudo vi /etc/opt/lbserver1/LbServer.properties
INTERFACE = LocoBuffer_USB.interface
net.sf.loconetovertcp.LbServer.port = 1234
net.sf.loconetovertcp.LbServer.host =
net.sf.loconetovertcp.driver.device = /dev/ttyUSB0
$
(When using vi save by pressing Esc
, :
, x
tp save and exit).
Now you should be able to start LbServer by typing lbserver
.