Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#1179 closed defect/bug (fixed)

gpsd not usable on Maemo anymore

Reported by: klosels -2- Owned by: chollya
Priority: major Milestone: version 0.5.1
Component: port/maemo Version: git master
Severity: normal Keywords: gps, maemo, gpsd, n810
Cc: sleske, sebastian.leske@…

Description

As opposed to earlier builds, Navit doesn't work with the internal GPS on N810 (running Maemo Diablo) using gpsd as source. As a side effect the GPS on this device is also not enabled/disabled automatically anymore.

GPS source is configured as "gpsd://localhost", which always worked. Now Navit reports the following error:

invalid source 'gpsd://localhost': unknown type 'gpsd'

I'm quite sure that the reason is the fix for ticket #850 in rev.5642, which introduced dependency on libgps>=3.1, which probably isn't available on Maemo4.

rev. 5640: works rev. 5643: doesn't work (no other packages in between available)

I guess this just went unnoticed because the packages failed to install since a while longer. This was just fixed yesterday (see ticket #1120).

Change History (21)

comment:1 Changed 6 years ago by usul

Hi, thanks for your report :)

Where did you got the builds from?
There is also a Maemo GPS source, that works fine on my N900, do you like to give it a try? http://wiki.navit-project.org/index.php/Maemo

comment:2 Changed 6 years ago by usul

  • Component changed from core to port/maemo
  • Keywords maemo gpsd n810 added
  • Milestone set to version 0.5.1
  • Owner changed from KaZeR to chollya

comment:3 Changed 6 years ago by klosels -2-

Package is from http://download.navit-project.org/navit/n800/svn/ Latest package (rev. 5655) is installable again, see ticket #1120.

I tried source="maemo" and source="maemo://any" but it doesn't work on N810, similar error message "unknown type : maemo". Was source="maemo" ever intended to work on N8x0? I always understood this is only for N900.

comment:4 Changed 6 years ago by usul

Could you please try the linked bokomoko package if it's working on N8x0 as well?

Sadly I don't know much about the internal GPS driver pipeline :/

comment:5 follow-up: Changed 6 years ago by chr

There are two trials with the bokomoko repo under bug report #1120, comment 8 and 10, both fail in the same manner.

AFAIK:

  • n900 GPS source needs './maemo/vehicle_maemo.c'
    • The maemo/Fremantle way
      akashihi Add:vehicle/maemo:Added support for Maemo/Fremantle liblocation API.
      
    • vehicle_maemo is for 'new Maemo's liblocation API' only!
      ...
      /*
              Plugin for new Maemo's  liblocation API.
       
              <vehicle source="maemo://any" retry_interval="1"/>
         source cound be on of "any","cwp","acwp","gnss","agnss"
         retry_interval could be one of "1","2","5","10","20","30","60","120" measured in seconds
      */
      ...
      
  • n8x0 GPS source needs './gpsd/vehicle_gpsd.c'
  • Today I do not see a patch, that offers both GPS sources in one binary.

Usul, why do you expect the n8x0 devices to run a navit binary from an n900 repo?

  • According this bug report the problems start with the patches for rev. 5640 to rev. 5643. These patches do drop n8x0's GPS source.

Why does sleske drop the GPS source of n8x0 devices?

For verification I pulled the suspicious svn revisions plus rev. 5644 into an n810 scratchbox repeatedly running './autogen.sh --force' and './configure'. The GPS source 'maemo' never is available. Rev. 5643 is the one that drops the GPS source 'gpsd'. Here is the outcome from './configure':

svn-5640

Vehicle types:
  android:           no (default)
  demo:              yes (default)
  file:              yes (default)
  gpsd:              yes (default)
  gpsd_dbus:         yes (dbus binding present)
  gypsy:             no (package gypsy missing)
  maemo:             no (default)
  null:              no (default)
  wince:             no (default)
  iphone:            no (default)
  webos:             no (default)

svn-5641

Vehicle types:
  android:           no (default)
  demo:              yes (default)
  file:              yes (default)
  gpsd:              yes (default)
  gpsd_dbus:         yes (dbus binding present)
  gypsy:             no (package gypsy missing)
  maemo:             no (default)
  null:              no (default)
  wince:             no (default)
  iphone:            no (default)
  webos:             no (default)

svn-5642

Vehicle types:
  android:           no (default)
  demo:              yes (default)
  file:              yes (default)
  gpsd:              yes (default)
  gpsd_dbus:         yes (dbus binding present)
  gypsy:             no (package gypsy missing)
  maemo:             no (default)
  null:              no (default)
  wince:             no (default)
  iphone:            no (default)
  webos:             no (default)

svn-5643

Vehicle types:
  android:           no (default)
  demo:              yes (default)
  file:              yes (default)
  gpsd:              no (package libgps >=V3.1 missing)
  gpsd_dbus:         yes (dbus binding present)
  gypsy:             no (package gypsy missing)
  maemo:             no (default)
  null:              no (default)
  wince:             no (default)
  iphone:            no (default)
  webos:             no (default)

svn-5644

Vehicle types:
  android:           no (default)
  demo:              yes (default)
  file:              yes (default)
  gpsd:              no (package libgps >=V3.1 missing)
  gpsd_dbus:         yes (dbus binding present)
  gypsy:             no (package gypsy missing)
  maemo:             no (default)
  null:              no (default)
  wince:             no (default)
  iphone:            no (default)
  webos:             no (default)

comment:6 Changed 6 years ago by momcilo majic

Hi, confirmed for my n810 as well. I did not check the full source diff, but can you lower the minimum version for libgps? Regards, Moma

comment:7 in reply to: ↑ 5 Changed 6 years ago by klosels -2-

Replying to http://wiki.navit-project.org/index.php/user:chr:

Why does sleske drop the GPS source of n8x0 devices?

Maybe sleske could comment on this - that's why I added him to cc when submitting this ticket in the first place. The diff was quite obvious - @chr, thanks for verifying.

It would be a pity to neglect the N8x0 target platform without necessity.

comment:8 Changed 6 years ago by chr

In my scratchbox it is the test for 'gps.h' (in 'configure.in' before rev. 5643) that enables the GPS source 'vehicle_gpsd'. Here 'gps.h' is part of package 'osso-gpsd-dev 1.0-29'. On other devices it might be different. I am convinced the programmers of the gpsd vehicle did a good job. Please do not drop things due to a lack of knowledge. Navit is running fine on my N810 for years now.

comment:9 follow-up: Changed 6 years ago by odys next

This is the only difference between revisions:

--- 5642/configure.in	2013-10-28 19:15:37.840210948 +0100
+++ 5643/configure.in	2013-10-28 19:16:01.184326706 +0100
@@ -1059,12 +1059,7 @@
 AC_ARG_ENABLE(vehicle-gpsd, [  --disable-vehicle-gpsd              disable vehicle type gpsd], vehicle_gpsd=$enableval;vehicle_gpsd_reason="configure parameter")
 if test "x${vehicle_gpsd}" = xyes
 then
-	PKG_CHECK_MODULES([GPSD], [libgps], have_libgps="yes", have_libgps="no")
-	if test "x$have_libgps" = "xyes"; then
-		AC_DEFINE([HAVE_LIBGPS],[],Define to 1 if you have libgps.)
-	else
-		AC_CHECK_HEADER(gps.h, AC_DEFINE([HAVE_LIBGPS],[],Define to 1 if you have the <gps.h> header file.) GPSD_LIBS="-lgps", vehicle_gpsd=no; vehicle_gpsd_reason="no gps.h and no gpsd pkgconfig" )
-	fi
+	PKG_CHECK_MODULES([GPSD], [libgps >= 3.10], ,vehicle_gpsd="no";vehicle_gpsd_reason="package libgps >=V3.1 missing")
 fi
 AC_SUBST(GPSD_CFLAGS)
 AC_SUBST(GPSD_LIBS)
Last edited 6 years ago by odys next (previous) (diff)

comment:10 in reply to: ↑ 9 ; follow-up: Changed 6 years ago by klosels -2-

Replying to odys next:

This is the only difference between revisions: [...]

This is the only difference in rev 5643 - but: it just completes what has been done in rev 5642, which seems was removing all code for earlier gpsd versions, have a look at http://sourceforge.net/p/navit/code/5642/

All compatibility code dealing with the older gpsd protocol in the #else part of #if GPSD_API_MAJOR_VERSION >= 5 was removed, e.g. different signature of gps_open. See http://www.catb.org/gpsd/protocol-transition.html for an explanation of old vs new gpsd protocol.

While I understand that that sort of compatibility code was ugly, I wonder if it was clear to sleske that removing it cuts off all N8x0 users.

As I see it there are two options if the N8x0 was to be a supported platform in the future. Either the compatibility code has to be merged back in or someone must be found to create a newer gpsd version >= 3.0 for Maemo4 (Diablo).

comment:11 in reply to: ↑ 10 ; follow-up: Changed 6 years ago by sleske

Replying to klosels:

This is the only difference in rev 5643 - but: it just completes what has been done in rev 5642, which seems was removing all code for earlier gpsd versions, have a look at http://sourceforge.net/p/navit/code/5642/

[...]

While I understand that that sort of compatibility code was ugly, I wonder if it was clear to sleske that removing it cuts off all N8x0 users.

No, this was not clear to me. At the time of the changes, the N8x0 had been broken for a long time, so this was not obvious.

As I see it there are two options if the N8x0 was to be a supported platform in the future. Either the compatibility code has to be merged back in or someone must be found to create a newer gpsd version >= 3.0 for Maemo4 (Diablo).

Yes (actually it's gpsd >= V3.1). Of course it would be better if we could somehow find a gpsd >= V3.1 for Maemo4, but if that's not possible, we'll have to restore the compatibility code and correct the build so that is falls back to an old gpsd for Maemo only.

As far as I can see, building a recent gpsd for Maemo should not be too difficult, as gpsd has few (mandatory) external dependencies. I don't develop for Maemo, so I won't be able to try it; however, if someone steps up, I'll gladly help if there are compilation problems.

comment:12 Changed 6 years ago by sleske

  • Cc sebastian.leske@… added

comment:13 in reply to: ↑ 11 ; follow-up: Changed 6 years ago by chr

Replying to http://sleske.myopenid.com/:

... At the time of the changes, the N8x0 had been broken for a long time, so this was not obvious.

Please help me. I do not understand you. What do you mean by 'broken'? What is 'broken'? Navit's svn-versions always are doing fine on my N810 for years.

comment:14 in reply to: ↑ 13 ; follow-up: Changed 6 years ago by sleske

Replying to http://wiki.navit-project.org/index.php/user:chr:

Replying to http://sleske.myopenid.com/:

... At the time of the changes, the N8x0 had been broken for a long time, so this was not obvious.

Please help me. I do not understand you. What do you mean by 'broken'? What is 'broken'? Navit's svn-versions always are doing fine on my N810 for years.

Sorry, I mixed up things. I simply did not know that N810 relied on the old version of gpsd.

comment:15 in reply to: ↑ 14 ; follow-up: Changed 6 years ago by chr

Replying to http://sleske.myopenid.com/:

Sorry, I mixed up things. I simply did not know that N810 relied on the old version of gpsd.

Ok, so we simply get the code back that was dropped with rev. 5641 to 5643, right?

comment:16 in reply to: ↑ 15 ; follow-up: Changed 6 years ago by sleske

Replying to http://wiki.navit-project.org/index.php/user:chr:

Ok, so we simply get the code back that was dropped with rev. 5641 to 5643, right?

Unfortunately it's not that easy. As you can see in #850, the code was dropped because old versions of libgps had a bug that caused problems when LC_ALL was set. We'd have to figure out a different solution for that bug if we go back to old versions of gpsd.

So it would be simpler if we could use the latest gpsd. N810 seems to be the only Navit platform that has a problem with that. Is there no way to upgrade gpsd on the N810?

comment:17 in reply to: ↑ 16 Changed 6 years ago by chr

Replying to http://sleske.myopenid.com/:

Replying to http://wiki.navit-project.org/index.php/user:chr:

Ok, so we simply get the code back that was dropped with rev. 5641 to 5643, right?

Unfortunately it's not that easy. As you can see in #850, the code was dropped because old versions of libgps had a bug that caused problems when LC_ALL was set. We'd have to figure out a different solution for that bug if we go back to old versions of gpsd.

I am with you, navit cannot solve the LC_ALL bug of gpsd before v3.1. And I think, navit should not open a door for further complains here. After doing a lot more reading I still think that the N8x0 is not affected, because LC_ALL is unset. I am willing to verify the bug on my N810. Which svn revision do I need. Are there special compiler options to be used?

So it would be simpler if we could use the latest gpsd. N810 seems to be the only Navit platform that has a problem with that. Is there no way to upgrade gpsd on the N810?

I do not see a way here. 'osso-gpsd' daemon is part of the OS. The gps indicator as well as all other gps related software e.g. maemo-mapper and GPSJinni relies on it. Almost all maemo development moved from diablo (maemo 4, n8x0) to fremantle (maemo 5, n9xx). There is nearly no activity on diablo since 2011. At the moment of writing I suggest a separate vehicle for 'osso-gpsd'.

comment:18 Changed 6 years ago by sleske

It's a pity N810 cannot upgrade gpsd :-/. Then we'll have to figure out a way to support the old gpsd just for N810.

A separate vehicle would be one idea; or we get back the compat code, but only activate it for the N810. I'll think about this. First I'll re-install the old version of libgps, so I can test the fix..

comment:19 Changed 6 years ago by chr

Gpsd is back and doing fine with my N810! I tested rev. 5720. Thank you very much!!!

comment:20 Changed 6 years ago by sleske

  • Resolution set to fixed
  • Status changed from new to closed

Yes, the changes from rev.5642 were (mostly) reverted, to make gpsd work on the N810. There is still a warning if you use an old libgps (only with CMake), but you can still compile.

comment:21 Changed 6 years ago by klosels

Also tested rev. 5720 on my N810. Finally working again - thank you so much!

Note: See TracTickets for help on using tickets.