[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-users] how to send control string (command) to device with <CR
From: |
Stoner, Howard (US COM) |
Subject: |
Re: [gpsd-users] how to send control string (command) to device with <CR><NL> included in string |
Date: |
Mon, 12 Sep 2016 22:33:24 +0000 |
Hell Gary, Thanks for your reply!
...
>> I am trying to figure out how a local application (running linux on an
>> embedded SoC) can send a command to my GPS device
> Sadly gpsd does not do a good job of this. Most people that care usually
> patch the copy of gpsd to send their fave setup strings.
>> From reading the gpsd daemon documentation, it sounds like sending a
>> message via the Control Socket connection, of the form
>> "!/dev/ttyxx=$PMTK..." should do this.
> I've never tried, nor remember anyone else doing so. If you can grab git
> head we can work on this with you.
I can probably mod the '!' command within handle_control to remove the
'snarfline()' call for my purposes, since I know that whenever I use that
command I will be supplying exactly what the device needs in its command
string..
>> I also tried doing this with the 'gpsctl' client, which only works if
>> I have gpsd NOT connected to the device at the time.
> Well, that would be a bug. Sadly also a dark and dusty corner of the gpsd
> code. Some people have gotten that to work, but never fed back their
> procedure. But any reason not to send the string before starting gpsd?
My intent is to handle 'mode' changes in the gps device, particularly power
standby / restart commands, without stopping and restarting gpsd, but I may be
able to handle it with either a shutdown/restart of gpsd, or via the control
socket mod referred to above.
Thanks again,
Howard