-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathINSTALL
110 lines (84 loc) · 5.87 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
INSTALL Jan-2017
--- The installation procedures here are for Debian/Ubuntu systems ---
Build instruction and prerequisites:
Check build preferences in the Makefile and make sure that WO (owner) and WG (group) is set to the webserver's runtime user and group.
The PHP part that runs as an extension of the webserver needs write access to a couple of config files.
The makefile will guide you with the user and group issues.
Also check WWWTOP if you agree with the default installation base for web pages.
For a debian based system just type:
$ make world (Answer 'y' about a patch to be applied)
$ sudo ./wsocknmea
.. and read further at "Run the application:"
.. OR by hand if you require a more user controlled installation:
These are the packages we need. You can install them by hand or trust that the makfile does it with apt-get:
$ make install-dep
.. by hand:
sudo apt-get install c++
sudo apt-get install git
sudo apt-get install cmake
sudo apt-get install automake
sudo apt-get install libtool
sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get install libbz2-dev
sudo apt-get install libz-dev
sudo apt-get install php5-cgi php5-sqlite (or php7.0-cgi php7.0-sqlite for more recent debians)
sudo apt-get install libsqlite3-dev sqlite3
sudo apt-get install libssl-dev
touch .updated
wsocknmea runtime depends on:
* kplex data multiplexer found at http://www.stripydog.com/kplex : Downloaded during this build
* A PHP CGI and websocket capable webserver such as lighthttpd : Downloaded during this build
Build and test by hand:
$ make contribs (Answer 'y' about a patch to be applied)
$ make install-contribs
$ make install
$ make install-www
$ make install-configs (Will also start the webserver we just built)
NOTE:
WHen all installations are completed, the /etc/init.d folder will be prepared ro run the webserver and wsocknmea at next reboot.
Run the application:
$ sudo ./wsocknmea
.. if the wsocknmea application starts sucessfully, it will create a database template to store configurations and a template for the kplex multiplexer.
Then you can view the result:
In your browser, go to: http://<your-ip>/npanel.php
You should see the framset with five instruments but no activity.
(Click Ctrl- if you don't see all of them)
Then click on the setting tab:
In the "Network properties" field, select the device you want to bind the network traffic to, typically eth0 or wlan0. Then click on "Use" and then "Save". Don't bother about the initial 127.0.0.1 address - the system will figure it out after the save.
NOTE: Recent Linux kernel (2017 and later) are using a new naming policy for network devices, something like "enxb827eb84c3f6" instead of "eth0". If you don't like this you may add this statement to your kernel command line: "net.ifnames=0". Check/Google on this subject with regards to u-boot/grub etc.
When the newtwork settings are saved do the following:
In "Replay from file", select the demo file, choose rate 13 and then hit "Play".
After a few moment the instruments should be activated.
NOTE: Leave the default AIS "Vessel Userid" as 366881180 in order to not have double and garbled representation of your own ship.
For real use and if you have an AIS transponder (not receiver only) it may be necessary to add your real AIS user id to this field.
The LED in the upper left corner will continuously monitor the connection:
RED : No response from the server.
YELLOW : Communication OK but no real data flow defined as the absence of RMC sentences.
GREEN : RMC traffic OK.
If the demo runs OK, then you can try to configure the serial section to pick up devices such as GPS, wind etc.
You can also re-arrange the main frame by clicking on any instruemnt and adjust the size with Ctrl+/Ctrl-.
The input area for such clicks is the lower or only LED panel on an instrument or at the center of instruments without LED panels.
The Google Map chart area will react to standard actions such as zoom and move and if the if AIS is active, a click on a vessel icon will
add or remove the vessel as a "buddy" with a different color. A mouse hover over a vessel icon will expose the vessels name and speed.
Vessels with a circular icon represents a stand still (< 0.3 knots) as reported in an AIS message from the ship.
Vessels will be deactivated and finally removed from the internal AIS list if they are not renewing their AIS messages within a specified time.
A click on the metal frame or just outside the frame will replace the instrument with a new one as explained above.
It should be quite easy to design a customized html frame container for the instruments with a different layout with only "<iframe src="http://<your i.p>/in-#-someInstruments.php"> as the fix point for a number of instruments.
The instruments ability to replace themself with a click follows the instruemnts by design.
To test just one stand-alone instrument you can address the instument directly with "http://<your i.p>/in-4-maps.php".
NOTES:
The stock versions (from Debian) of lighttpd and libwebsockets cannot be used due to obsolescence or missing features.
The demo file "PacCupStart.txt" is downloaded from http://www.navmonpc.com/ .. another great site for NMEA enthusiasts.
Any previously installed version of lighttpd will be removed.
If any other web server apart from lighttpd, is active during installation (port 80 busy), then lighttpd's configuration will not be installed and thus the application won't work.
Makefile targets:
make builds wsocknmea
make install installs wsocknmea
make clean cleans wsocknmea
make contribs builds lighttpd, libwsebockets, mod_websockets and kplex.
make install-contribs installs contribs
make install-configs installs lighttpd configs ans starts lighttpd
make install-www installs web pages
make install-dep installs package dependencies
make distclean cleans everything
make world builds everything and installs