User Tools

Site Tools


wiopi:zero-server-en
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


wiopi:zero-server-en [2021/11/29 08:16] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== Zero Rocrail Server ======
 +  * [[:wio:wiopi-en|WIOpi]]
 +    * [[:wiopi-pios-en|PiOS]]
 +
 +
 +{{:wiopi:zero-usb-serial.jpg?300}}\\
 +
 +
 +=====Introduction=====
 +The Rasberry Zero has two USB connectors:
 +|< >|
 +^ Code ^ Usage ^
 +| PWR | 5V power supply |
 +| USB | Normal USB port |
 +
 +The USB connector can be used to connect a CommandStation with Serial port.\\
 +This will be available in Rocrail as device ''/dev/ttyUSB0''.\\
 +
 + \\
 +=====Setup Zero=====
 +Provide the Zero with a PiOS Lite SD-Card and activate ssh and WiFi.\\
 +How to setup a Raspberry Pi is found on many places in Internet, so it won't be part of this Wiki.\\
 +Some hints and tips can be found here: [[:rocnet:headless-cam-en|Headless CAM]] \\
 +
 + \\
 +=====Setup Rocrail=====
 +Open an ssh session with the zero.\\
 +====Install the Server====
 +<code>
 +sudo apt install zip
 +mkdir Rocrail
 +cd Rocrail/
 +wget https://wiki.rocrail.net/rocrail-snapshot/Rocrail-ARMHF.zip
 +unzip Rocrail-ARMHF.zip
 +</code>
 +
 +====Create a Workspace and Startup script====
 +<code>
 +cd
 +mkdir RocrailZero
 +nano startrocrail.sh 
 +</code>
 +
 +Content of startrocrail.sh:
 +<code>
 +#!/bin/sh
 +cd /home/pi/RocrailZero
 +/home/pi/Rocrail/bin/rocrail -l /home/pi/Rocrail/bin 
 +if [ $? -eq 70 ]
 +then
 +  sudo halt -p
 +fi
 +</code>
 +The last 4 lines will shut down the Zero properly in case of a normal end, but is of course optional.\\
 +A normal Server end is signalled by the return value of 70.\\
 +Booting the Zero 2 W is very fast, so the Rocrail server is available after 10...20 seconds.\\
 +
 +
 +====Make startrocrail.sh executable====
 +<code>
 +chmod +x startrocrail.sh
 +</code>
 +
 +
 +====Add a line in CronTab====
 +<code>
 +crontab -e
 +@reboot /home/pi/startrocrail.sh
 +</code>
 +
 +====Update the Server====
 +<code>
 +cd ~/Rocrail/
 +wget https://wiki.rocrail.net/rocrail-snapshot/Rocrail-ARMHF.zip
 +unzip Rocrail-ARMHF.zip
 +</code>
 +
 +
 +
 + \\
 +=====GO=====
 +After a reboot the Rocrail server will be started automatically, and every Rocrail Client can connect to it by the Network name as assigned at the Zero setup.\\
 +__**Note:**__ The default network name is //Raspberry//. (Rename it)\\
 +
 + \\
 +=====Command Stations=====
 +Every __**[[:english#command_stations|Command Station]]**__ featuring a serial USB, LAN or WLAN connection can be connected.\\
 +
 + \\
 +=====WIOpi=====
 +Parallel a __**[[:wio:wiopi-en|WIOpi]]**__ can be active on the same Zero.\\
 +It will automatically connect to the Rocrail Server.\\
 +
 +
  
wiopi/zero-server-en.txt · Last modified: 2021/11/29 08:16 by 127.0.0.1