0

Pi 3 and Ultimate GPS HAT - External Antenna
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

Pi 3 and Ultimate GPS HAT - External Antenna

by dustyerz on Tue Dec 05, 2017 6:07 pm

Why am i unable to get the 'view antenna type' command to work?
On a fresh Pi3 with a GPS hat - the unit works fine, but when i issue the command $PGCMD,33,1*6C it doesn't have an effect on the output?

pi@raspberrypi:~ $ stty -F /dev/serial0 raw 9600 cs8 clocal -cstopb
pi@raspberrypi:~ $ cat /dev/ttyS0

$GPZDA,215747.000,05,12,2017,,*56
$GPGGA,215748.000,****.0296,N,*****.6952,W,1,10,0.87,32.8,M,48.4,M,,*49
$GPGSA,A,3,25,24,19,14,06,12,31,32,29,02,,,1.57,0.87,1.31*0E
$GPRMC,215748.000,A,****.0296,N,*****.6952,W,0.45,7.54,051217,,,A*73
$GPZDA,215748.000,05,12,2017,,*59
^C

pi@raspberrypi:~ $ echo '$PGCMD,33,1*6C' > /dev/ttyS0
pi@raspberrypi:~ $ cat /dev/ttyS0

$GPGGA,215816.000,****.0327,N,*****.6933,W,1,09,0.98,35.7,M,48.4,M,,*4F
$GPGSA,A,3,25,24,14,06,12,31,32,29,02,,,,1.67,0.98,1.35*0F
$GPRMC,215816.000,A,****.0327,N,*****.6933,W,0.54,12.80,051217,,,A*46
$GPZDA,215816.000,05,12,2017,,*5D
$GPGGA,215817.000,****.0329,N,*****.6932,W,1,09,0.98,35.8,M,48.4,M,,*4E
$GPGSA,A,3,25,24,14,06,12,31,32,29,02,,,,1.67,0.98,1.35*0F
$GPRMC,215817.000,A,****.0329,N,*****.6932,W,0.56,12.98,051217,,,A*43
$GPZDA,215817.000,05,12,2017,,*5C
$GPGGA,215818.000,****.0330,N,*****.6932,W,1,09,0.98,35.9,M,48.4,M,,*48
$GPGSA,A,3,25,24,14,06,12,31,32,29,02,,,,1.67,0.98,1.36*0C
$GPRMC,215818.000,A,****.0330,N,*****.6932,W,0.50,10.45,051217,,,A*40
$GPZDA,215818.000,05,12,2017,,*53

I've tried variations such as echo "$PGCMD,33,1*6C" /dev/ttyS0 echo "$PGCMD,33,1*6C\r\n" > /dev/ttyS0 echo "$PGCMD,33,1*6C" /dev/serial0 but I don't seem to be able to get the GPS HAT to respond to the serial command.

Any help appreciated.

dustyerz
 
Posts: 2
Joined: Tue Nov 28, 2017 8:36 am

Re: Pi 3 and Ultimate GPS HAT - External Antenna

by adafruit_support_mike on Mon Dec 11, 2017 4:49 am

The settings for the Serial interface might be clipping out the "\r" character before it's sent to the GPS module.

Try using a terminal emulator program that can set parameters for things like line terminators when it opens the connection.

adafruit_support_mike
 
Posts: 49284
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.