| | 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> |
| | 50 | }}} |