maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Maemo Mapper - no GPS info and satellite details (https://talk.maemo.org/showthread.php?t=23384)

XmaX 2008-09-04 17:46

Maemo Mapper - no GPS info and satellite details
 
Hi, I recently bought a Motorola T805 bluetooth GPS receiver, and it works perfectly. However, everything in GPS information is blank, so I can't see the altitude, speed, etc. In "Satellites details" it just says "Satellites in view: 0; in use: 0".
Can anybody help?

Hedgecore 2008-09-04 17:50

Re: Maemo Mapper - no GPS info and satellite details
 
I assume you're running a version of the Maemo that comes bundled with the Mapper application; does this return anything?

Barring that, does the control panel GPS app return any information?

sgosnell 2008-09-04 19:01

Re: Maemo Mapper - no GPS info and satellite details
 
Well, it's not working perfectly. If it can't see any satellites, it can't give you any information. Have you tried using it in another location?

XmaX 2008-09-04 19:07

Re: Maemo Mapper - no GPS info and satellite details
 
Quote:

Originally Posted by sgosnell (Post 220927)
Well, it's not working perfectly. If it can't see any satellites, it can't give you any information. Have you tried using it in another location?

But it does give me information. It shows my location as I drive or walk, and even the velocity vector changes accordingly. It just doesn's show anything in "GPS Info" thingy on the left (apart from the compass) and everything in "Details..." is 0, none, or nofix.

I use Nokia 770 with OS2006.

brendan 2008-09-04 19:14

Re: Maemo Mapper - no GPS info and satellite details
 
you may want to check that the GPS you are using adheres to the proper protocol (NMEA sentence structure and what not).

there is a hack to find the data being given by the GPS, but i dont know what it is. maybe someone can shed some light.

lardman 2008-09-04 20:58

Re: Maemo Mapper - no GPS info and satellite details
 
Check to see which NMEA sentences it outputs, there are specific ones which detail the satellite staus, you may be missing these.

XmaX 2008-09-04 22:26

Re: Maemo Mapper - no GPS info and satellite details
 
It gives me this:
Code:

$GPGGA,222324.060,,,,,0,00,,,M,0.0,M,,0000*57
$GPRMC,222324.060,V,,,,,,,040908,0,N*55

On one hand, it does seem quite limited, but then GPS software on my computer shows me the speed and altitude without any problems.

lardman 2008-09-04 22:52

Re: Maemo Mapper - no GPS info and satellite details
 
Yep, don't worry to much about it, you have the nav data, it just doesn't output the satellite health data (which is what the apps use to tell you which satellites are in use). You may find you can enable the output of more NMEA sentances through some utility that came with the GPS/from the manuf's website, etc.

XmaX 2008-09-04 23:23

Re: Maemo Mapper - no GPS info and satellite details
 
Quote:

Originally Posted by lardman (Post 221018)
Yep, don't worry to much about it, you have the nav data, it just doesn't output the satellite health data (which is what the apps use to tell you which satellites are in use). You may find you can enable the output of more NMEA sentances through some utility that came with the GPS/from the manuf's website, etc.

I'm afraid Motorola doesn't supply any GPS utility. I don't really care about the satellites health, but it would be useful to see the speed and altitude on my 770...

gnuite 2008-09-05 03:20

Re: Maemo Mapper - no GPS info and satellite details
 
Some GPS devices support both NMEA and a proprietary "binary" format that can be accessed only via their software. And for some of those kinds of devices, the amount of data available via NMEA is less than the amount of data available via their binary format. It sucks, but unfortunately it's a fact of life. :/

lardman 2008-09-05 08:52

Re: Maemo Mapper - no GPS info and satellite details
 
Quote:

I'm afraid Motorola doesn't supply any GPS utility. I don't really care about the satellites health, but it would be useful to see the speed and altitude on my 770...
Well RMC should provide the recommended minimum nav data (http://www.gpsinformation.org/dale/nmea.htm#RMC). This contains lat, lon, speed and track. GGA (http://www.gpsinformation.org/dale/nmea.htm#GGA) also provides you with altitude data, etc..

It may be that Maemo-mapper uses a different NMEA sentances to extract the speed/track data and therefore ignores your outputs?

XmaX 2008-09-05 10:33

Re: Maemo Mapper - no GPS info and satellite details
 
Quote:

Originally Posted by gnuite (Post 221073)
Some GPS devices support both NMEA and a proprietary "binary" format that can be accessed only via their software. And for some of those kinds of devices, the amount of data available via NMEA is less than the amount of data available via their binary format. It sucks, but unfortunately it's a fact of life. :/

Yeah, but my device seems to show standard NMEA, and both altitude and speed are given.

That's what my GPS gives at the moment:
Code:

$GPGGA,102551.000,5029.1071,N,01718.6271,E,1,07,1.3,218.1,M,42.9,M,,0000*5A
$GPRMC,102551.000,A,5029.1071,N,01718.6271,E,0.00,,050908,0,A*6E

That looks pretty standard to me, according to this site, it should look like this:
[CODE]$GPGGA,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x ,M,x.x,M,x.x,xxxx*hh
$GPRMC,hhmmss.ss,A,llll.ll,a,yyyyy.yy,a,x.x,x.x,dd mmyy,x.x,a*hh[/
CODE]
According to this, my altitude is 218 m, and my speed is 0 knots.

lardman 2008-09-05 11:39

Re: Maemo Mapper - no GPS info and satellite details
 
I've just had a look at the maemo-mapper source code, and it uses the RMC and GGA data for nav info and the GSA and GSV for satellite info. The RMC data is the only one which looks to be strictly necessary (as this is parsed to check as to whether the GPS has a fix), the others are parsed if available.

Therefore, it ought to work. Assuming the RMC & GGA data are parsed correctly (and your GPS formats them correctly), you might want to look at the display routi nes of maemo-mapper to see if there's some dependence on the satellite info which is stopping the location, etc., from being displayed.

lardman 2008-09-05 11:43

Re: Maemo Mapper - no GPS info and satellite details
 
In "gboolean gps_display_details(void)", the line "if(_gps.fix < 2)" is where I'd start.

This probably takes its data from GSV/GSA rather than using the GGA fix quality flag. But you'll need to check that supposition on my part.

sgosnell 2008-09-05 14:57

Re: Maemo Mapper - no GPS info and satellite details
 
On my N800 with OS2008, the GPS info shows everything - speed, altitude, satellite information, etc. It's not Maemo Mapper, it's either your GPS receiver or your OS.

lardman 2008-09-05 16:55

Re: Maemo Mapper - no GPS info and satellite details
 
Quote:

On my N800 with OS2008, the GPS info shows everything - speed, altitude, satellite information, etc. It's not Maemo Mapper, it's either your GPS receiver or your OS.
I think we've narrowed it down to the GPS receiver, however looking at the maemo-mapper source code, it should provide enough info, therefore there may be some interaction in maemo-mapper (as I pointed out above) which prevents the salient info from being displayed for some reason.

XmaX 2008-09-25 08:42

Re: Maemo Mapper - no GPS info and satellite details
 
Ok, now I am also pretty sure that it has nearly nothing to do with my GPS device. I checked the GPX file and it lists altitude and speed for all the waypoints. It means that Maemo Mapper reads the altitude and velocity, it just doesn't display it in the GPS info box. As lardman suggested before, it seems that Maemo Mapper assumes that there is no fix if it doesn't get any info on satellites. I'm not good enough in programming to fix it myself, but can anyone be kind enough to repair this bug in the next release?

lardman 2008-09-25 17:23

Re: Maemo Mapper - no GPS info and satellite details
 
Make sure you submit a bug to the Garage project and link to this thread

yurihua 2009-09-15 10:27

Re: Maemo Mapper - no GPS info and satellite details
 
After tests with SiRFdemo.exe and check the setting of the moto T805, I found the root cause of the problem. Well, it really sucks, but anyway it does work with lots of other GPS software.
Well, the root cause of the problem is that the moto T805 does not output GSA, GSV, GLL and VTG by default but only the GGA and RMC data. Some other GPS software will configure the T805 to send those information on every initial connection of the GPS module but Maemo Mapper does not.
So the most proper "fix" to this problem should be to send the initial configuration instructions from the Maemo Mapper software to the GPS module to request for those "missing parameters" once it gets connected with the GPS module.
To verify this, you would need the SiRFdemo.exe software on your PC.

see this link for details about the SiRFdemo.exe software:
http://www.sirf.com/SiRFDemo_User_Guide.pdf


I found a document about how to configure the moto T805 via software:
http://www.sparkfun.com/datasheets/G...%20Manual1.pdf
In this document it said:
--------
Note – NMEA input messages 100 to 106 are SiRF proprietary NMEA messages. The MSK NMEA string is as defined by the NMEA 0183 standard.
--------
NMEA input messages 100 through 106 are used to configure the output of NMEA parameters, but they are 'proprietary'.
So ... this might be the reason why maemo did not implement those inital configuration commands.

I have implemented a simple fix (not a good one, though) for this problem. see below posts for details.

yurihua 2009-09-16 16:18

Re: Maemo Mapper - no GPS info and satellite details
 
1 Attachment(s)
A simple fix to this problem is to set this manualy with a small program, since I don't have the maemo sdk installed (that's a big guy).:D

Below is a piece of C source code to set the GPS parameters, maybe somebody could refine and integrate it into the maemo mapper?:rolleyes:

Code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>

void set_gps(int fd, int msg_type, int mode, int rate, char *buf, int buf_len);

int
main()
{
  char buf[64];
  int fd=open("/dev/rfcomm0", O_RDWR);
  set_gps(fd, 1, 0, 1, buf, 64); /* GLL @ 1 Hz */
  set_gps(fd, 2, 0, 5, buf, 64); /* GSA @ 0.2 Hz */
  set_gps(fd, 3, 0, 1, buf, 64); /* GSV @ 1 Hz*/
  set_gps(fd, 5, 0, 1, buf, 64); /* VTG @ 1 Hz */
}

/*
 * fd: the file to write
 * msg_type: NMEA Query/Rate control msg type: 1-9
 * See above post for details in 'NMEA Reference Manual', Chapter
 * 2, '103-Query/Rate Control'.
 * mode: query or setRate: 0=setRate, 1=Query
 * rate: off=0, max=255, unit: second
 * buf: output buffer
 * buf_len: output buffer len
 */
void set_gps(int fd, int msg_type, int mode, int rate, char *buf, int buf_len)
{
  char *sptr=0;
  char *ptail=0;
  int csum=0;
  int buf_tmp_size=0;

  memset(buf, 0, buf_len);
  snprintf(buf, buf_len, "%s,0%d,0%d,0%d,01*", "$PSRF103", msg_type, mode, rate);

  /* calculate the check sum ... */
  sptr=buf+1; /*skip the $*/
  buf_tmp_size=strlen(buf);
  ptail=buf+buf_tmp_size;

  while(*sptr && *sptr != '*')
    csum ^= *sptr++;

  snprintf(ptail, buf_len-buf_tmp_size, "%x\r\n", csum);
  printf("%s", buf);
  write(fd, buf, strlen(buf));
}

Try this binary (for Nokia N800 running OS2008 Version5.2008-43.7) here....
Attachment 4095

or you can compile it your self with gcc ...

yurihua 2009-09-16 17:50

Re: Maemo Mapper - no GPS info and satellite details
 
2 Attachment(s)
:cool:

A more crazy one:

Code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>

void set_gps(int fd, int msg_type, int mode, int rate, char *buf, int buf_len);

int
main(int argc, char **argv)
{
 
  char cmdbuf[1024]={0};
  char buf[64];
  char *real_gpsd = "/usr/sbin/gpsd_real ";
  int i;

  //the real gpsd executable:
  snprintf(cmdbuf, 1024, "%s", "/usr/sbin/gpsd_real ");

  for ( i=1; i<argc; i++)
  {
      strncat(cmdbuf, argv[i], 1024);
      strncat(cmdbuf, " ", 1);
  }
  strncat(cmdbuf, "&", 1);
  printf("Executing: %s\n", cmdbuf);
  system(cmdbuf);

  //poll for the bluetooh to be ready
  while (system ("ls /dev/rfcomm0 >> /dev/null") != 0)
  {
      sleep(2);
  }
 
 
  while (1)
  {
      int fd=open("/dev/rfcomm0", O_RDWR);
      set_gps(fd, 1, 0, 1, buf, 64);
      set_gps(fd, 2, 0, 5, buf, 64);
      set_gps(fd, 3, 0, 1, buf, 64);
      set_gps(fd, 5, 0, 1, buf, 64);

      //quit if the gps module has gone
      if (system ("ls /dev/rfcomm0 >> /dev/null") != 0)
      {
        system("killall gpsd_real");
        return 0;
      }

      sleep(60);
  }
}

/*
 * fd: the file to write
 * msg_type: NMEA msg type: 1-9
 * mode: query or setRate: 0=setRate, 1=Query
 * rate: off=0, max=255, unit: second
 * buf: output buffer
 * buf_len: output buffer len
 */
void set_gps(int fd, int msg_type, int mode, int rate, char *buf, int buf_len)
{
  char *sptr=0;
  char *ptail=0;
  int csum=0;
  int buf_tmp_size=0;

  memset(buf, 0, buf_len);
  snprintf(buf, buf_len, "%s,0%d,0%d,0%d,01*", "$PSRF103", msg_type, mode, rate);

  sptr=buf+1; /*skip the $*/
  buf_tmp_size=strlen(buf);
  ptail=buf+buf_tmp_size;

  while(*sptr && *sptr != '*')
    csum ^= *sptr++;

  snprintf(ptail, buf_len-buf_tmp_size, "%x\r\n", csum);
  printf("%s", buf);
  write(fd, buf, strlen(buf));
}

save it as gps_set.c and compile it:
Code:

gcc -o gpsd gps_set.c
and then copy the real gpsd in /usr/sbin to /usr/sbin/gpsd_real:
Code:

cp /usr/sbin/gpsd /usr/sbin/gpsd_real
and place the gpsd we just compiled above to /usr/sbin
Code:

cp gpsd /usr/sbin
now start maemo mapper and connect to your T805 (The T805 really sucks, this took me a whole day to fix this problem....) and now you should see all the details .......

:cool: Crazy enough?

One thing I should repeat here:
I do not remommend doing this but this is just an alternative. I recommend to fix this in maemo mapper itself or the official gpsd source codes.

source file and binary are attached.
source file: Attachment 4096
binary: Attachment 4097

well, I don't guarantee this will work for you, but just make it a reference of possible fix.


All times are GMT. The time now is 11:46.

vBulletin® Version 3.8.8