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

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

Update Copyright, fix encoding issue

  • Property svn:mime-type set to text/plain
File size: 5.6 KB
RevLine 
[296]1#-------------------------------------------------------------------------------
2# This file is part of the FLARM®-Radar Project.
3#   
4#   Copyright 2012-2014 Simon Moser
5#   Copyright 2013-2014 Dominic Spreitz
6#
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11#   http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18#
19#   Project Website: www.flarmradar.ch
20#   Email: info@flarmradar.ch
21#-------------------------------------------------------------------------------
[211]22    OVERVIEW
23   
24This document describes the installation procedure for the Flarm-Radar Client
25on a Raspberry PI running Raspbian. At the time of writing this document, this
26is the only platform where the client has been tested over a long time period
27in a production-like environment.
28
29However, the client can be installed on any operating system where
[265]30Perl (http://www.perl.org) is available. Some customising might be required
[211]31in this case.
32
33
34    REQUIREMENTS
35   
36Note: Early versions of Raspbian had a nasty bug that caused minicom to freeze
37  the entire system after some hours or days of operations. Don't forget to
38  update the OS before starting with the installation.
39
[265]401. Log on the Raspberry (as user 'pi') and install required dependencies
41  -> $ sudo apt-get update && apt-get install zip dnsutils libwww-perl minicom
[211]42 
[265]432. Connect the Flarm to the Raspberry and start minicom
[294]44  -> $ sudo minicom -s
[265]45
463. Configure communication settings for minicom (tty, baud rate, etc.). Save the
[294]47  configuration file, exit and restart mincom (no parameters) to see the data
48  stream. Once the configuration is correct and the Flarm Device is
[215]49  turned on, you must be able to see live position data when you start minicom:
50
[265]51$ sudo minicom
[211]52....
53$GPRMC,123512.00,A,4710.24781,N,00902.46662,E,0.017,237.67,240312,,,A*6E
54$GPGGA,123512.00,4710.24781,N,00902.46662,E,1,8,1.40,413.2,M,48.0,M,,*6E
55$PFLAA,0,-118,-85,1,1,4B51BC,0,,0,0.1,1*1E
56$PFLAA,0,-35,-124,2,1,4B51FF,158,,0,0.1,1*14
57$PFLAU,2,1,1,1,0,,0,,*61
58$GPRMC,123513.00,A,4710.24782,N,00902.46659,E,0.002,237.67,240312,,,A*60
59$GPGGA,123513.00,4710.24782,N,00902.46659,E,1,8,1.40,413.1,M,48.0,M,,*67
60....
61 
62If you reach that: Congratulations, you're nearly done :-)
63
64
65    INSTALLATION
[265]66
67Installation is possible via software package or manually, the second option
68is for advanced users.
69
70Installation via Software Package
71
721. Download and unzip the client from http://www.flarmradar.ch/public/dist/pkg
[294]73  -> $ wget http://www.flarmradar.ch/public/dist/client/pkg/flarmclient_<version>_all.deb
[265]74
752. Install the package
76  -> $ sudo pkg -i flarmclient_<version>_all.deb
[211]77 
[265]78
79Manual Installation
80
[211]811. Create a new account named 'flarm'
[265]82  -> $ sudo useradd -m --system flarm
[211]83
[216]84Note1: This account does not need a password (because you might loose it and
[211]85  it is safer anyway).
86 
[216]872. Make sure that the user 'flarm' has permissions to read from the device
88  that was previously configured in minicom. If RS232-USB adapter is used, then
89  this is /dev/ttyUSB0, or alike. It is usually sufficient to assign the user
90  with an additional secondary group.
91 
923. Change identity to 'flarm'
[265]93  -> $ sudo su - flarm
[211]94 
[216]954. Download and unzip the client from http://www.flarmradar.ch/public/dist
[294]96  -> $> wget http://www.flarmradar.ch/public/dist/client-<version>.zip
97  -> $> unzip flarmclient-<version>.zip
[211]98 
99
100    CONFIGURATION
101
[265]102The client reads a single configuration file /etc/flarmclient.conf
[211]103
[292]1041. Set the a client key. If you use your own server, then you are free to set
105  your own key. To use the public server, request a key at info@flarmradar.ch
106  with the following information:
107  o) ICAO-Code of your airport/airfield
108  o) Short Name (will appear in the menu)
109  o) Elevation (in mAMSL)
110  o) Antenna level (in mAGL)
111  o) Email Address of a responsible person/organization
[211]112
[265]1132. Configure the URL of the flarm server. If you use the public server, then
114  you can leave the default value.
[211]115
[294]1163. Configure the serial device:
117  - serial_device = /dev/AMA0 (if you are using the UART port)
118  - serial_device = /dev/ttyUSB0 (if you are using a USB-Serial adapter)
[211]119
120    TEST THE INSTALLATION
[265]121
1221. Download a file containing sample data for testing
123  -> $ wget https://secure.netzschmiede.ch/trac/flarmradar/browser/core/trunk/client/data/2012_03_25_departure.data
[211]124   
[265]1252. Start the client as user 'flarm', use the test file from above for testing
126  $> sudo -u flarm flarmclient -f 2012_03_25_departure.data
[211]127 
128The client must run without errors and stream the data to the server. Check on
129the server while the client is processing the data file.
130
[265]1313. Connect the FLARM device and run the client software
[215]132  $> flarmclient
133 
134... if all goes well, you can see live data on your radar. Congratulations!
135
136   
137    INTEGRATION
138
139We must make sure that the client starts automatically after booting the
[265]140device.
[215]141
[265]142If the client was installed via software package, then you find
143a working example in /etc/cron.d/flarmclient. Remove the hash(#)-character
144at the beginning of the first line. The cron-job then periodically checks if
145the client is up and restarts it if necessary. This is useful for a device
146that is installed on the field where you don't have direct access to restart
147the process.
[223]148
[265]149Alternatively, use a runlevel script to start the client at boot time. Many
[296]150examples for this can be found in the internet.
Note: See TracBrowser for help on using the repository browser.