gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-users] how to send control string (command) to device with <CR><NL


From: Stoner, Howard (US COM)
Subject: [gpsd-users] how to send control string (command) to device with <CR><NL> included in string
Date: Fri, 9 Sep 2016 15:02:06 +0000

I apologize if this msg was sent twice, but not sure if I was a group member when I tried to send it yesterday, so it may not have gone through...

 

I'm new to this list, and didn't find anywhere else to ask this question and get a response, so I'm asking here.

 

I am trying to figure out how a local application (running linux on an embedded SoC) can send a command to my GPS device (e.g. an embedded Quectel L76-M33 receiver, using a proprietary device text command to switch in/out of 'STANDBY' mode, of the form "$PMTK..."), while gpsd is running.

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 tried implementing this, and created the string containing my device command, including a "<CR><NL>" at the end of the message, which the device requires.

 

But it looks like the gpsd control handler is stripping the <CR><NL> from the end of the message, and not sending it to the device... I think this is making the device ignore the message.   From looking at the gpsd source, it looks like the handle_control() function is calling 'snarfline()', which is stripping off any whitespace including the <CR><NL> from the message.

 

How can I send the control string WITH the <CR><NL> included via the control socket? 

I also tried doing this with the 'gpsctl' client, which only works if I have gpsd NOT connected to the device at the time.

 

Thank you,

 

-Howard

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]