{"id":614,"date":"2014-06-12T02:27:19","date_gmt":"2014-06-12T00:27:19","guid":{"rendered":"http:\/\/sven-seeberg.de\/wp\/?p=614"},"modified":"2014-08-02T18:59:17","modified_gmt":"2014-08-02T16:59:17","slug":"using-gps-of-ericsson-f5521gw-in-ubuntu-with-gpsd","status":"publish","type":"post","link":"https:\/\/sven-seeberg.de\/wp\/?p=614","title":{"rendered":"Using GPS of Ericsson F5521gw in Ubuntu with gpsd"},"content":{"rendered":"<p>I already tried to use the GPS of my Ericsson F5521gw in my Lenovo L520 a couple of month ago with Ubuntu 12.04 (precise), however it didn&#8217;t work out of the box. As the release of 14.04 (trusty) was close, I decided to wait.<\/p>\n<p>However it didn&#8217;t work with trusty either. Therefore I decided to dig into the problem. I came up with the following dirty workaround:<\/p>\n<p>First run<\/p>\n<p style=\"padding-left: 30px;\">$ sudo apt-get install gpsd gpsd-clients wvdial<\/p>\n<p>Edit the \/etc\/wvdial.conf to look like this:<\/p>\n<p style=\"padding-left: 30px;\">[Dialer Defaults]<br \/>\nNew PPPD = yes<br \/>\nStupid Mode = 1<br \/>\nModem Type = USB Modem<\/p>\n<p style=\"padding-left: 30px;\">[Dialer gps]<br \/>\nModem = \/dev\/ttyACM2<br \/>\nInit1 = AT*E2GPSCTL=1,5,1<br \/>\nInit2 = AT*E2GPSNPD<\/p>\n<p>Now we can begin to start gpsd. First establish a connection to your mobile provider with the network manager (upper right corner in Unity).<\/p>\n<p>Then create a pipe somewhere and use wvdial to setup the GPS:<\/p>\n<p style=\"padding-left: 30px;\">$ mkfifo \/root\/gps_pipe<\/p>\n<p style=\"padding-left: 30px;\">$ wvdial gps<\/p>\n<p>The GPS should now transmit data on \/dev\/ttyACM2. You can have a look at it with &#8220;$ cat \/dev\/ttyACM2&#8221;. Stuff the output into the pipe and start gpsd in read only mode:<\/p>\n<p style=\"padding-left: 30px;\">$ cat \/dev\/ttyACM2 &gt; \/root\/gps_pipe<\/p>\n<p style=\"padding-left: 30px;\">$ gpsd -n -N -D4 -b \/root\/gps_pipe<\/p>\n<p>If cat stops, just restart cat. If gpsd throws an error, restart it as well. It should work after a couple of attempts. If there is any better solution, you&#8217;re welcome to contact me.<\/p>\n<p>[Update] Fix for the cat error: run gpsd with a user that has no write rights on the pipe. I created a pipe in tmp as root<\/p>\n<p style=\"padding-left: 30px;\">$ mkfifo \/tmp\/gps_pipe<\/p>\n<p>The pipe should have only read rights for others. Then I can execute gpsd as a normal user and cat does not stop:<\/p>\n<p style=\"padding-left: 30px;\">$ gpsd -n -N -D4 -b \/root\/gps_pipe<\/p>\n<p>I used the following ressources:<\/p>\n<p>[1] <a title=\"http:\/\/www.thinkwiki.org\/wiki\/Ericsson_F3507g_Mobile_Broadband_Module\" href=\"http:\/\/www.thinkwiki.org\/wiki\/Ericsson_F3507g_Mobile_Broadband_Module\">http:\/\/www.thinkwiki.org\/wiki\/Ericsson_F3507g_Mobile_Broadband_Module<\/a><\/p>\n<p>[2] <a title=\"http:\/\/forum.ubuntuusers.de\/topic\/gps-mit-ericsson-mbm-f3705g-einrichten\/\" href=\"http:\/\/forum.ubuntuusers.de\/topic\/gps-mit-ericsson-mbm-f3705g-einrichten\/\">http:\/\/forum.ubuntuusers.de\/topic\/gps-mit-ericsson-mbm-f3705g-einrichten\/<\/a><\/p>\n<p>[3] <a title=\"http:\/\/sourceforge.net\/apps\/mediawiki\/mbm\/index.php?title=MBM#GPS_Control_.28mbm-gpsd.29\" href=\"http:\/\/sourceforge.net\/apps\/mediawiki\/mbm\/index.php?title=MBM#GPS_Control_.28mbm-gpsd.29\">http:\/\/sourceforge.net\/apps\/mediawiki\/mbm\/index.php?title=MBM#GPS_Control_.28mbm-gpsd.29<\/a><\/p>\n<p>[4] <a title=\"http:\/\/www.tjansson.dk\/2009\/01\/using-the-builtin-gps-in-a-thinkpad-x200-under-linux\/\" href=\"http:\/\/www.tjansson.dk\/2009\/01\/using-the-builtin-gps-in-a-thinkpad-x200-under-linux\/\">http:\/\/www.tjansson.dk\/2009\/01\/using-the-builtin-gps-in-a-thinkpad-x200-under-linux\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I already tried to use the GPS of my Ericsson F5521gw in my Lenovo L520 a couple of month ago with Ubuntu 12.04 (precise), however it didn&#8217;t work out of the box. As the release of 14.04 (trusty) was close, &hellip; <a href=\"https:\/\/sven-seeberg.de\/wp\/?p=614\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,13],"tags":[],"class_list":["post-614","post","type-post","status-publish","format-standard","hentry","category-software","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=\/wp\/v2\/posts\/614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=614"}],"version-history":[{"count":8,"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=\/wp\/v2\/posts\/614\/revisions"}],"predecessor-version":[{"id":704,"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=\/wp\/v2\/posts\/614\/revisions\/704"}],"wp:attachment":[{"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}