1 | | {{{#!html |
2 | | <div id="wikipage" class="trac-content"><p> |
3 | | </p><div class="wiki-toc"> |
4 | | <ol> |
5 | | <li> |
6 | | <a href="#Goal">Goal</a> |
7 | | </li> |
8 | | <li> |
9 | | <a href="#GPS"><b style="color:#000;background:#66ffff">GPS</b></a> |
10 | | </li> |
11 | | </ol> |
12 | | </div><p> |
13 | | </p> |
14 | | <p> |
15 | | Please visit <a class="wiki" href="/wiki/gps">this page</a> for an overview of <b style="color:#000;background:#66ffff">GPS</b> and hardware mappings for your particular SBC. |
16 | | </p> |
17 | | <h1 id="Goal">Goal</h1> |
18 | | <p> |
19 | | The goal of this page is to detail <b style="color:#000;background:#66ffff">GPS</b> usage on the <b style="color:#000;background:#ffff66">Yocto</b> BSP. |
20 | | </p> |
21 | | <h1 id="GPS"><b style="color:#000;background:#66ffff">GPS</b></h1> |
22 | | <p> |
23 | | <tt>gpsd</tt> is the daemon service that Gateworks recommends (and is preinstalled) in order to communicate effectively with an optionally loaded <b style="color:#000;background:#66ffff">GPS</b> module. There exist several clients that can talk to <tt>gpsd</tt> such as <tt>xgps</tt>. |
24 | | </p> |
25 | | <p> |
26 | | <tt>gpsd</tt> runs as a service in our <b style="color:#000;background:#ffff66">Yocto</b> BSPs. By default, we have opted to disable starting it on boot so it does not 'stomp' on another processes TTY device. |
27 | | </p> |
28 | | <p> |
29 | | In order to configure and enable <tt>gpsd</tt>, you will have to touch the <tt>/etc/default/gpsd</tt> file and enable the <a class="wiki" href="/wiki/Yocto/GPS#Yocto/service">service</a>. The default configuration is as follows: |
30 | | </p> |
31 | | <div class="code"><pre>root@ventana:~# cat /etc/default/gpsd |
32 | | <span class="c"># If you must specify a non-NMEA driver, uncomment and modify the next line |
33 | | </span><span class="nv">GPSD_SOCKET</span><span class="o">=</span><span class="s2">"/var/run/gpsd.sock"</span> |
34 | | <span class="nv">GPSD_OPTIONS</span><span class="o">=</span><span class="s2">""</span> |
35 | | <span class="nv"><b style="color:#000;background:#66ffff">GPS</b>_DEVICES</span><span class="o">=</span><span class="s2">""</span> |
36 | | </pre></div><p> |
37 | | <tt><b style="color:#000;background:#66ffff">GPS</b>_DEVICES</tt> and <tt>GPSD_OPTIONS</tt> should be set to the device you would like <tt>gpsd</tt> to monitor. For example, on a GW400: |
38 | | </p> |
39 | | <div class="code"><pre><span class="nv">GPSD_SOCKET</span><span class="o">=</span><span class="s2">"/var/run/gpsd.sock"</span> |
40 | | <span class="nv">GPSD_OPTIONS</span><span class="o">=</span><span class="s2">"-b -n"</span> |
41 | | <span class="nv"><b style="color:#000;background:#66ffff">GPS</b>_DEVICES</span><span class="o">=</span><span class="s2">"/dev/ttymxc4"</span> |
42 | | </pre></div><p> |
43 | | To enable <tt>gpsd</tt> on boot, please execute the following: |
44 | | </p> |
45 | | <div class="code"><pre>root@ventana:~# update-rc.d gpsd start 35 5 . |
46 | | Adding system startup <span class="k">for</span> /etc/init.d/gpsd. |
47 | | </pre></div><p> |
48 | | For more information, please visit <a class="wiki" href="/wiki/gps">this page</a>. |
49 | | </p> |
| 1 | [[PageOutline]] |
| 2 | |
| 3 | Please visit this page for an overview of GPS and hardware mappings for your particular SBC. |
| 4 | |
| 5 | The goal of this page is to detail GPS usage on the Yocto BSP. |
| 6 | |
| 7 | = GPS = |
| 8 | {{{gpsd}}} is the daemon service that Gateworks recommends (and is preinstalled) in order to communicate effectively with an optionally loaded GPS module. There exist several clients that can talk to {{{gpsd}}} such as {{{xgps}}}. |
| 9 | |
| 10 | {{{gpsd}}} runs as a service in our Yocto BSPs. By default, we have opted to disable starting it on boot so it does not 'stomp' on another processes TTY device. |
| 11 | |
| 12 | In order to configure and enable {{{gpsd}}}, you will have to touch the {{{/etc/default/gpsd}}} file and enable the service. The default configuration is as follows: |
| 13 | {{{#!bash |
| 14 | root@ventana:~# cat /etc/default/gpsd |
| 15 | # If you must specify a non-NMEA driver, uncomment and modify the next line |
| 16 | GPSD_SOCKET="/var/run/gpsd.sock" |
| 17 | GPSD_OPTIONS="" |
| 18 | GPS_DEVICES="" |
| 20 | |
| 21 | {{{GPS_DEVICES}}} and {{{GPSD_OPTIONS}}} should be set to the device you would like gpsd to monitor. For example, on a GW400: |
| 22 | {{{#!bash |
| 23 | GPSD_SOCKET="/var/run/gpsd.sock" |
| 24 | GPSD_OPTIONS="-b -n" |
| 25 | GPS_DEVICES="/dev/ttymxc4" |
| 26 | }}} |
| 27 | |
| 28 | To enable {{{gpsd}}} on boot, please execute the following: |
| 29 | {{{#!bash |
| 30 | root@ventana:~# update-rc.d gpsd start 35 5 . |
| 31 | Adding system startup for /etc/init.d/gpsd. |
| 32 | }}} |
| 33 | |
| 34 | For more information, please visit [wiki:gps the gps page]. |