Changes between Initial Version and Version 1 of Yocto/GPS

10/24/2017 04:37:41 AM (6 years ago)



  • Yocto/GPS

    v1 v1  
     2          <div id="wikipage" class="trac-content"><p>
     3</p><div class="wiki-toc">
     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>
     15Please 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.
     17<h1 id="Goal">Goal</h1>
     19The 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.
     21<h1 id="GPS"><b style="color:#000;background:#66ffff">GPS</b></h1>
     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>.
     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.
     29In 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:
     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>
     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:
     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>
     43To enable <tt>gpsd</tt> on boot, please execute the following:
     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.
     48For more information, please visit <a class="wiki" href="/wiki/gps">this page</a>.