Hello,
I noted with perl Net::GPSD3 that it's not allways connecting correctly to even with gpsd 3.9. It's just hanging up in place where it's waiting response. So I digged little bit futher and noted that it sends too fast commands '?DEVICES;' and '?POLL;'. First one is handled by gpsd right but another one it treated as error. That is not correct! It can be tested with netcat line:
echo -e "?POLL;?DEVICES;\n" | netcat 127.0.0.1 2947
So I figured out little patch that can handle this line
echo -e "\r\n ?POLL; \r\r\n\n ?DEVICES; \n?VERSION;?DEVICE;" | netcat 127.0.0.1 2947
It's not pretty string to send but clients can send what ever they like.. After patch this line is handled as it should. Patch only adds handling '?' char and seek for first '?' char in buffer. Patch didn't break cgps or xgps because they seems to use JSON.