User`s manual

TC-6110 Linux User's Manual Managing Communications
3-36
log_application script before the disk is umounted. The command pidof returns the process i.d. of the
program referenced in the argument position.
#!/bin/sh
file=`basename $0`
num=$1
#Add your commands here
kill -9 `pidof -x log_application`
#Internal operation
mxhtspd-remove-disk $num
Setting Up GPS
The National Marine Electronics Association (NMEA) has developed a specification for a communications
interface that links marine electronic equipment. The standard permits marine electronics to send information
to computers and to other marine equipment. GPS receivers communicate via the NMEA interface, and
computer programs expect data to be in the NMEA format. This data includes the complete PVT (position,
velocity, time) solution computed by the GPS receiver.
Retrieving GPS Data
The GPS kernel module is precompiled into the Linux kernel binary, so there is no need to install one. GPS
hardware is read and managed by the gpsd daemon, and accessed through the port
/dev/ttyACM0. Follow
these steps for installation:
1. First check if the GPS card is transmitting raw data by issuing the following command to the device node,
/dev/ttyACM0. If no data is being returned by the card, try adjusting the GPS antenna to troubleshoot the
problem. If there is no way of establishing reception, contact Moxa technical support at the phone number
provided in the title plate of this manual.
moxa@Moxa:~# cat /dev/ttyACM0
$GPGSV,1,1,04,24,28,123,37,21,09,054,31,19,52,213,,23,47,270,*74
$GPGGA,061824.0,2458.835139,N,12133.055835,E,1,05,19.7,-103.5,M,,,,*14
$GPRMC,061824.0,A,2458.835139,N,12133.055835,E,,,290710,,,A*68
$GPGSA,A,3,24,21,06,31,16,,,,,,,,,25.5,19.7,18.5*29
$GPVTG,,T,,M,0.0,N,0.0,K*4E
2. Next, install GPSd, the GPS background interface that will communicate with the raw GPS device. First,
terminate the cat process you have just initiated using either
<ctrl> + c, or :
moxa@Moxa:~# killall cat
and then install the GPS daemon using the command
moxa@Moxa:~# apt-get install gpsd:
3. You may change the options with which gpsd will be called by using the Debian package installer. To
reconfigure how gpsd is called, use the command: