View Single Post
tz1's Avatar
Posts: 716 | Thanked: 236 times | Joined on Dec 2007
#67
l2ping doesn't seem to interfere with much of anything. rfcomm does.

That is part of the complication. l2ping needs sudo, and it is easier (and safer, and near-zero CPU) to add that one line to sudoers. I check for the device using l2ping (it may only ping once and just hear a turn-on announcement), and only when I see it do I do rfcomm. If the device disconnects, I go back to l2ping.

That was the only way I could manage to connect, break, and restore connections to my BT gps without interfering with everything else. If I lose the BT GPS (GPS lock or connection - think driving to a park, then walking around the park) I switch to the Nokia internal as the default device. (I still log the internal GPS stream to the KML file when the BT device is on and have a post processed comparison kml somewhere).

I should also add a root check on minigpsd and complain if someone tries to run it as root (as I've done myself mistakenly).