Opened 7 years ago

Closed 7 years ago

#1089 closed defect/bug (fixed)

source="file:/dev/ttyS0" does allow navit to navigate (even though there is a fix) / how to debug?

Reported by: ah be Owned by: KaZeR
Priority: major Milestone:
Component: core Version: git master
Severity: Keywords:
Cc:

Description

Hi,

according to the wiki getting gps from the serial port should work directly

source="file:/dev/ttyS0" - serial GPS connected to the first serial port reading

so I set up my navit.xml as follows:

root@neo:/opt/qtmoko/bin# cat /usr/share/navit/navit.xml | grep tty <vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="file:/dev/ttySAC1" follow="1" >

before starting navit this is what I get from my gps cat /dev/ttySAC1 $GPVTG,101.87,TM,0.273,N,0.506,K,A*37 $GPGGA,082418.00,5041.78716,N,00708.20304,E,1,05,3.80,60.2,M,47.7,M*60 $GPGSA,A,3,22,18,16,21,304.50,3.80,2.41*01 $GPGSV,4,1,13,06,81,13703,77,277,17,22,53,140,29,18,48,076,31*7D $GPGSV,4,2,13,19,53,294,14,16,45,199,32,08,12,32921,26,069,26*70 $GPGSV,4,3,13,30,16,181,33,07,13,295,23,11,12,261,15,15,11,038,17*71 $GPGSV,4,4,13,26,01,004,*4A $GPGLL,5041.78716,N,00708.20304,E,082418.00,A,A*6B $GPZDA,082418.00,26,12,2012,00,00*67 $GPRMC,082419.00C

so I have a fix. Now, if I start navit it shows me no fix (= no routing possible). If I then do cat /dev/ttySAC1 again I only get binary garbage (which sometimes is explained by two processes trying to access at the same time, but I don't know for sure).

cat /dev/ttySAC1

$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !�����b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !���ĥƦ�%b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !���ĥƦ�b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !���ĥƦ�b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !���ĥƦ�b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !���ĥƦ�%b$ B������b$�ƆĄ�F�$ "������f�E��������b$ ���Ą�����ƇF�!�������������������b$ !���ĥƦ�b$ B������b$�ƆĄ�F�C

So if anyone has an idea where my gps signal gets lost from /dev/ttySAC1 to navit and how I can debug this, please let me know. the great thing getting this working would be not to rely on gpsd anymore.

best regards

robin

PS: device is a neo freerunner armv4t

Change History (6)

comment:1 Changed 7 years ago by tryagain

Hi!

Looks like navit has set serial interface to wrong speed.

Try

<vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="file:/dev/ttySAC1" follow="1" baudrate="9600">

If it won't help, try different values for baudrate: 19200, 38400, 57600, 115200.

I'm unsure if it's a fairy behavior to change port speed if it's not specified in the attribute. Also it seems to be undocumented that "file:" vehicle type supports the baudrate attribute. BTW default value is 4800.

tryagain

comment:2 Changed 7 years ago by ah be

thanks for your quick answer.

how did you come to the conclusion that the serial speed is the problem? a) because I dont get a fix even there is one or b) because I get binary output when I query /dev/ttySAC1 again?

if it was b) going through all the baudrates would make debugging quicker for me even though I have the feeling I really have to switch the phone off before trying the next rate.

best regards

robin

comment:3 Changed 7 years ago by ah be

I just tried cat /dev/ttySAC1 after having started gps, started navit and set the baudrate to 9600. now I get

$GPGGA,211715.00,0,00,99.99*67 $GPGSA,A,1,99.99,99.99,99.99*30 $GPGSV,3,1,12,26,68,13115,67,28709,49,26824,29,263,*7B $GPGSV,3,2,12,18,21,31419,-1,00821,00,28728,54,069,*61 $GPGSV,3,3,12,08,23,07105,19,19518,21,31417,15,124,*7C $GPGLL,211715.00,V,N*4B $GPZDA,211715.00,27,12,2012,00,00*60

which looks very promising.

do you know if it makes sense to try higher baudrates as well (in case 9600 should already work)? or putting it in differnt words do higher baudrates correspond to higher sampling frequencies of the gps receiver = the higher the baudrate the better the position estimate in navit?

br

robin

comment:4 Changed 7 years ago by tryagain

Hi!

Binary output usually means you have wrong baudrate or wrong protocol. Before running navit you had perfect NMEA, so I concluded most probably navit has changed the baudrate to incorrect value.

There are two ends of a serial RS-232 link, one is "computer" (or phone), another is GPS receiver. Both ends should have same baudrate, or you'll get a binary garbage.

By setting baudrate in navit config, you actually change baudrate on the "computer" end of the link. To change it on the GPS receiver end, you should use some other means. Usually it's done by sending to GPS a propertiary NMEA control command.

9600 kbit should be enough to get one fix per second. 4800 is reported to be sufficient for one fix per 2 second interval only.

For more info on changing baudrate on the GPS end and its possible consequences, you may have look at http://www.gpsinformation.org/dale/nmea.htm

tryagain

comment:5 Changed 7 years ago by ah be


for you vehicle on the GTA02 freerunner use:

<vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="file:/dev/ttySAC1" follow="1" baudrate="9600">

so you can uninstall gpsd now.

I tried the following other higher baudrates but none of them worked:

baudrate: 19200, cat /dev/ttySAC1 -> binary garbage

baudrate: 38400, cat /dev/ttySAC1 -> binary garbage

baudrate: 57600, cat /dev/ttySAC1 -> binary garbage

baudrate: 115200, cat /dev/ttySAC1 -> no output????

many thanks to tryagain for solving this!

robin

comment:6 Changed 7 years ago by ah be

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.