Serial : trouble when reading GPS answer

24 views
Skip to first unread message

br1ngJ0y

unread,
Feb 13, 2017, 7:23:12 PM2/13/17
to Pi4J
Hello everyone, i dunno if someone else already experience my problem (i hope so ^^)

i'm using a GPS with a raspberry pi (b model) by the serial.
My trouble is when i reading the gps , it's like the sentence are cut, first i thought the GPS was the source of trouble and then i read directly the GPS respond by linux and everything was fine, everyline was complete and not cut.
So i don't know if i'am doing something wrong or if there is a trouble in the code with pi4j serial.



this is when i read it directly on the pi (except no signal from gps, every line is complete):

$GPGGA,001714.087,,,,,0,00,,,M,,M,,*74
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPRMC,001714.087,V,,,,,0.00,0.00,140217,,,N*40
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,001715.087,,,,,0,00,,,M,,M,,*75
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,02,07,,,26,21,,,24*7D
$GPRMC,001715.087,V,,,,,0.00,0.00,140217,,,N*41
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,001716.087,,,,,0,00,,,M,,M,,*76
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPRMC,001716.087,V,,,,,0.00,0.00,140217,,,N*42
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,001717.087,,,,,0,00,,,M,,M,,*77
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPRMC,001717.087,V,,,,,0.00,0.00,140217,,,N*43
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32


and now this what i read when i'm using pi4j :

$GPVTG,0.00,T,,
M,0.00,N,0.00,K,N*32
$GPGGA,000107.799,,,,,0,00,,,M,,M,,*79
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPRMC,000107.799,V,,,,,0.00,0.00,
060180,,,N*43
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,000108.799,,,,,0,00,,,M,,M,,*76
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPRMC,000108.799,V,,,,,0.00,0.00,
060180,,,N*4C
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,000109.799,,,,,0,00,,,M,,M,,*77
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPRMC,000109.799,V,,,,,0.00,0.00,
060180,,,N*4D
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32

as you can see some sentence are cut.
What can cause that ?
Reply all
Reply to author
Forward
0 new messages