source: core/trunk/client/README.txt @ 294

Last change on this file since 294 was 294, checked in by smoser, 11 years ago

Merge feedback from Peter Wyld

  • Property svn:mime-type set to text/plain
File size: 4.7 KB
Line 
1
2
3    OVERVIEW
4   
5This document describes the installation procedure for the Flarm-Radar Client
6on a Raspberry PI running Raspbian. At the time of writing this document, this
7is the only platform where the client has been tested over a long time period
8in a production-like environment.
9
10However, the client can be installed on any operating system where
11Perl (http://www.perl.org) is available. Some customising might be required
12in this case.
13
14
15    REQUIREMENTS
16   
17Note: Early versions of Raspbian had a nasty bug that caused minicom to freeze
18  the entire system after some hours or days of operations. Don't forget to
19  update the OS before starting with the installation.
20
211. Log on the Raspberry (as user 'pi') and install required dependencies
22  -> $ sudo apt-get update && apt-get install zip dnsutils libwww-perl minicom
23 
242. Connect the Flarm to the Raspberry and start minicom
25  -> $ sudo minicom -s
26
273. Configure communication settings for minicom (tty, baud rate, etc.). Save the
28  configuration file, exit and restart mincom (no parameters) to see the data
29  stream. Once the configuration is correct and the Flarm Device is
30  turned on, you must be able to see live position data when you start minicom:
31
32$ sudo minicom
33....
34$GPRMC,123512.00,A,4710.24781,N,00902.46662,E,0.017,237.67,240312,,,A*6E
35$GPGGA,123512.00,4710.24781,N,00902.46662,E,1,8,1.40,413.2,M,48.0,M,,*6E
36$PFLAA,0,-118,-85,1,1,4B51BC,0,,0,0.1,1*1E
37$PFLAA,0,-35,-124,2,1,4B51FF,158,,0,0.1,1*14
38$PFLAU,2,1,1,1,0,,0,,*61
39$GPRMC,123513.00,A,4710.24782,N,00902.46659,E,0.002,237.67,240312,,,A*60
40$GPGGA,123513.00,4710.24782,N,00902.46659,E,1,8,1.40,413.1,M,48.0,M,,*67
41....
42 
43If you reach that: Congratulations, you're nearly done :-)
44
45
46    INSTALLATION
47
48Installation is possible via software package or manually, the second option
49is for advanced users.
50
51Installation via Software Package
52
531. Download and unzip the client from http://www.flarmradar.ch/public/dist/pkg
54  -> $ wget http://www.flarmradar.ch/public/dist/client/pkg/flarmclient_<version>_all.deb
55
562. Install the package
57  -> $ sudo pkg -i flarmclient_<version>_all.deb
58 
59
60Manual Installation
61
621. Create a new account named 'flarm'
63  -> $ sudo useradd -m --system flarm
64
65Note1: This account does not need a password (because you might loose it and
66  it is safer anyway).
67 
682. Make sure that the user 'flarm' has permissions to read from the device
69  that was previously configured in minicom. If RS232-USB adapter is used, then
70  this is /dev/ttyUSB0, or alike. It is usually sufficient to assign the user
71  with an additional secondary group.
72 
733. Change identity to 'flarm'
74  -> $ sudo su - flarm
75 
764. Download and unzip the client from http://www.flarmradar.ch/public/dist
77  -> $> wget http://www.flarmradar.ch/public/dist/client-<version>.zip
78  -> $> unzip flarmclient-<version>.zip
79 
80
81    CONFIGURATION
82
83The client reads a single configuration file /etc/flarmclient.conf
84
851. Set the a client key. If you use your own server, then you are free to set
86  your own key. To use the public server, request a key at info@flarmradar.ch
87  with the following information:
88  o) ICAO-Code of your airport/airfield
89  o) Short Name (will appear in the menu)
90  o) Elevation (in mAMSL)
91  o) Antenna level (in mAGL)
92  o) Email Address of a responsible person/organization
93
942. Configure the URL of the flarm server. If you use the public server, then
95  you can leave the default value.
96
973. Configure the serial device:
98  - serial_device = /dev/AMA0 (if you are using the UART port)
99  - serial_device = /dev/ttyUSB0 (if you are using a USB-Serial adapter)
100
101    TEST THE INSTALLATION
102
1031. Download a file containing sample data for testing
104  -> $ wget https://secure.netzschmiede.ch/trac/flarmradar/browser/core/trunk/client/data/2012_03_25_departure.data
105   
1062. Start the client as user 'flarm', use the test file from above for testing
107  $> sudo -u flarm flarmclient -f 2012_03_25_departure.data
108 
109The client must run without errors and stream the data to the server. Check on
110the server while the client is processing the data file.
111
1123. Connect the FLARM device and run the client software
113  $> flarmclient
114 
115... if all goes well, you can see live data on your radar. Congratulations!
116
117   
118    INTEGRATION
119
120We must make sure that the client starts automatically after booting the
121device.
122
123If the client was installed via software package, then you find
124a working example in /etc/cron.d/flarmclient. Remove the hash(#)-character
125at the beginning of the first line. The cron-job then periodically checks if
126the client is up and restarts it if necessary. This is useful for a device
127that is installed on the field where you don't have direct access to restart
128the process.
129
130Alternatively, use a runlevel script to start the client at boot time. Many
131examples for this can be found in the internet.
Note: See TracBrowser for help on using the repository browser.