Node Location Data in the Mesh

In the last couple days, I added support for distributing mesh node location (latitude, longitude) throughout the mesh.  You can specify the lat-lon explicitly through the HSMM-Pi web application, or configure the node to pull the lat-lon from a GPS device.  If using GPS, then the device must be supported by the GPSD service.  I used the GlobalSat BU-353 receiver (Amazon) and it worked flawlessly; the receiver is priced reasonably at just $32 USD.  The HSMM-Pi node will read the lat-lon information at 1-minute intervals and transmit it throughout the mesh network.  This greatly simplifies the tracking of a mobile mesh node in case it’s carried on a vehicle or person.

The HSMM-Pi node will distribute the location info through the mesh network using the OLSRD nameservice plugin.  When viewing the status page of a node, you’ll see a globe icon adjacent to nodes for which location information exists.  Clicking on the globe will result in a map being displayed with the node location marked.  This could be very useful in deployments with a large number of nodes over a large geographic area.

 

Screenshots

Status page showing node location map links:

Node Location in Status

Map displayed for a given node:

Node Map

Location Settings with a fixed location:

Location-Fixed

Location Settings with a location pulled from a GPS receiver:

Location-GPS

Advertisements

6 thoughts on “Node Location Data in the Mesh

  1. Like the option of the GPS. I have a couple more pi’s on order as mine was stolen to run xbmc to store my son’s cartoon collection. I will get it installed and start testing it just as soon as they arrive! I am interested in the GPS addition, though, as I would also like to run Asterisk on the Pi, and after experimenting with it on the Mesh my biggest headache was the lack of RTC on the board. Asterisk will just plain refuse to start when the date and time are not set. Can you possibly pull the date and time from the GPS in the next revision to set them on the Pi? It would be a great addition to also host a time server for the mesh if that could be done!

    • Thanks for the feedback, Drew! I also think the GPS feature is pretty cool. It’s very easy to set the system time on the Pi from the GPS signal. The Pi runs a Linux daemon called ‘gpsd’ when configured to use a GPS device. There is a configuration option in gpsd to feed the ‘ntpd’ daemon with the time from the satellite signal. There is a small change required in the ntpd configuration to query gpsd for the time. But it’s all pretty simple configuration. You could configure the ntpd daemon on any other nodes in the mesh to set their time from the GPS-enabled node.

      I’ve got a 1 hour ferry boat trip ahead of me, so I might start work on it now 🙂

      • I’ve updated HSMM-Pi to set the system time from the GPS time signal when configured to pull the location from a GPS device. I’ll push the changes to the GitHub repository tonight and test with my Pi node. Thanks again for the suggestion and motivation!

  2. Wow, talk about quick service! Thanks for your hard work! I just checked my tracking info again and it looks like I might have to wait a couple more days to get my new ones. I can’t wait to get it installed and try it out. I will keep in touch!

  3. Just verified that my changes to HSMM-Pi to set the node system clock from the GPS signal are working. Looks good!

    pi@KK6DCI-3 ~ $ ntpq -p
         remote           refid      st t when poll reach   delay   offset  jitter
    ==============================================================================
    *SHM(0)          .GPS.            0 l   29   64    7    0.000  380.074 247.457
     SHM(1)          .GPS1.           0 l    -   64    0    0.000    0.000   0.000
     ccadmin.cycores 130.207.244.240  2 u   20   64    7  120.872    7.147   1.195
     clock1.albyny.i .CDMA.           1 u   24   64    7  104.608    6.690   0.775
     hades.wf-hostin 62.149.0.30      2 u   24   64    7  184.408    9.319   1.473
     watt.22pf.org   69.162.170.5     3 u   21   64    7  103.352    7.104   1.483
     europium.canoni 193.79.237.14    2 u   21   64    7  180.945    0.135   2.462
    

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s