1 | |
---|
2 | |
---|
3 | OVERVIEW |
---|
4 | |
---|
5 | This document describes the installation procedure for the Flarm-Radar Client |
---|
6 | on a Raspberry PI running Raspbian. At the time of writing this document, this |
---|
7 | is the only platform where the client has been tested over a long time period |
---|
8 | in a production-like environment. |
---|
9 | |
---|
10 | However, the client can be installed on any operating system where |
---|
11 | Perl (http://www.perl.org) is available. Some customising might be required |
---|
12 | in this case. |
---|
13 | |
---|
14 | |
---|
15 | REQUIREMENTS |
---|
16 | |
---|
17 | Note: 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 | |
---|
21 | 1. 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 | |
---|
24 | 2. Connect the Flarm to the Raspberry and start minicom |
---|
25 | -> $ sudo minicom |
---|
26 | |
---|
27 | 3. Configure communication settings for minicom (tty, baud rate, etc.). Save the |
---|
28 | configuration file. Once the configuration is correct and the Flarm Device is |
---|
29 | turned on, you must be able to see live position data when you start minicom: |
---|
30 | |
---|
31 | $ sudo minicom |
---|
32 | .... |
---|
33 | $GPRMC,123512.00,A,4710.24781,N,00902.46662,E,0.017,237.67,240312,,,A*6E |
---|
34 | $GPGGA,123512.00,4710.24781,N,00902.46662,E,1,8,1.40,413.2,M,48.0,M,,*6E |
---|
35 | $PFLAA,0,-118,-85,1,1,4B51BC,0,,0,0.1,1*1E |
---|
36 | $PFLAA,0,-35,-124,2,1,4B51FF,158,,0,0.1,1*14 |
---|
37 | $PFLAU,2,1,1,1,0,,0,,*61 |
---|
38 | $GPRMC,123513.00,A,4710.24782,N,00902.46659,E,0.002,237.67,240312,,,A*60 |
---|
39 | $GPGGA,123513.00,4710.24782,N,00902.46659,E,1,8,1.40,413.1,M,48.0,M,,*67 |
---|
40 | .... |
---|
41 | |
---|
42 | If you reach that: Congratulations, you're nearly done :-) |
---|
43 | |
---|
44 | |
---|
45 | INSTALLATION |
---|
46 | |
---|
47 | Installation is possible via software package or manually, the second option |
---|
48 | is for advanced users. |
---|
49 | |
---|
50 | Installation via Software Package |
---|
51 | |
---|
52 | 1. Download and unzip the client from http://www.flarmradar.ch/public/dist/pkg |
---|
53 | -> $ wget http://www.flarmradar.ch/public/dist/pkg/flarmclient_<version>_all.deb |
---|
54 | |
---|
55 | 2. Install the package |
---|
56 | -> $ sudo pkg -i flarmclient_<version>_all.deb |
---|
57 | |
---|
58 | |
---|
59 | Manual Installation |
---|
60 | |
---|
61 | 1. Create a new account named 'flarm' |
---|
62 | -> $ sudo useradd -m --system flarm |
---|
63 | |
---|
64 | Note1: This account does not need a password (because you might loose it and |
---|
65 | it is safer anyway). |
---|
66 | |
---|
67 | 2. Make sure that the user 'flarm' has permissions to read from the device |
---|
68 | that was previously configured in minicom. If RS232-USB adapter is used, then |
---|
69 | this is /dev/ttyUSB0, or alike. It is usually sufficient to assign the user |
---|
70 | with an additional secondary group. |
---|
71 | |
---|
72 | 3. Change identity to 'flarm' |
---|
73 | -> $ sudo su - flarm |
---|
74 | |
---|
75 | 4. Download and unzip the client from http://www.flarmradar.ch/public/dist |
---|
76 | -> $> wget http://www.flarmradar.ch/public/dist/client-SNAPSHOT.zip |
---|
77 | -> $> unzip flarmclient-SNAPSHOT.zip |
---|
78 | |
---|
79 | |
---|
80 | CONFIGURATION |
---|
81 | |
---|
82 | The client reads a single configuration file /etc/flarmclient.conf |
---|
83 | |
---|
84 | 1. Set the a client key. Request a key at info@flarmradar.ch if you use |
---|
85 | the public server. If you use your own server, then you are free to set |
---|
86 | your own key. |
---|
87 | |
---|
88 | 2. Configure the URL of the flarm server. If you use the public server, then |
---|
89 | you can leave the default value. |
---|
90 | |
---|
91 | |
---|
92 | |
---|
93 | TEST THE INSTALLATION |
---|
94 | |
---|
95 | 1. Download a file containing sample data for testing |
---|
96 | -> $ wget https://secure.netzschmiede.ch/trac/flarmradar/browser/core/trunk/client/data/2012_03_25_departure.data |
---|
97 | |
---|
98 | 2. Start the client as user 'flarm', use the test file from above for testing |
---|
99 | $> sudo -u flarm flarmclient -f 2012_03_25_departure.data |
---|
100 | |
---|
101 | The client must run without errors and stream the data to the server. Check on |
---|
102 | the server while the client is processing the data file. |
---|
103 | |
---|
104 | 3. Connect the FLARM device and run the client software |
---|
105 | $> flarmclient |
---|
106 | |
---|
107 | ... if all goes well, you can see live data on your radar. Congratulations! |
---|
108 | |
---|
109 | |
---|
110 | INTEGRATION |
---|
111 | |
---|
112 | We must make sure that the client starts automatically after booting the |
---|
113 | device. |
---|
114 | |
---|
115 | If the client was installed via software package, then you find |
---|
116 | a working example in /etc/cron.d/flarmclient. Remove the hash(#)-character |
---|
117 | at the beginning of the first line. The cron-job then periodically checks if |
---|
118 | the client is up and restarts it if necessary. This is useful for a device |
---|
119 | that is installed on the field where you don't have direct access to restart |
---|
120 | the process. |
---|
121 | |
---|
122 | Alternatively, use a runlevel script to start the client at boot time. Many |
---|
123 | examples for this can be found in the internet. |
---|