Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to access the GPS data on a Nexus 4 phone with Ubuntu Touch on it. Does anyone know if there is /dev/ to read the raw NMEA data stream? I did several researches online but cannot get any info on that.

As far as I understand the gps chip is an Avago device, but I was not able to find the linux drivers (I was hoping to get some low level details reading the driver code)

share|improve this question

Best I have found so far is /usr/bin/test_gps which gives NMEA output. Other than that you could write a Python script to interface with dbus and get the location data. Good examples for GSM modem interface are in /usr/share/ofono/scripts/. This will give you a good start.

share|improve this answer
I ended up doing this: #!/bin/bash test_gps|grep nmea|awk '{print $3}'|grep GP >> /dev/gps – krisabsinthe42 Jul 27 '14 at 20:38
I have setup a git repo for making a xinetd nmea stream service. – krisabsinthe42 Jul 27 '14 at 23:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.