Jump to content

Kismet and Gpsd serial


r6uur6nr6u5ur56
 Share

Recommended Posts

For the life of me I can't figure this out, at the moment I have my phone sharing the GPS over bluetooth using the app (Share GPS)

I have the phone paired and using "rfcomm connect rfcomm0 xx:xx:xx:xx..." to create a serial rfcomm0 connection

When I use "cat /dev/rfcomm0" I see all the nmea output constantly flowing

but when check the status of gpsd (systemctl status gpsd)

I get the following output

 

● gpsd.service - GPS (Global Positioning System) Daemon
   Loaded: loaded (/lib/systemd/system/gpsd.service; static)
   Active: active (running) since Fri 2017-12-01 12:12:03 CET; 23min ago
 Main PID: 9645 (gpsd)
   CGroup: /system.slice/gpsd.service
           └─9645 /usr/sbin/gpsd -N /dev/rfcomm0 /dev/rfcomm0

Dec 01 12:35:10 raspi gpsd[9645]: gpsd:ERROR: /dev/rfcomm0: device activation failed.
Dec 01 12:35:10 raspi gpsd[9645]: gpsd:ERROR: device open failed: Device or resource busy - retrying read-only
Dec 01 12:35:10 raspi gpsd[9645]: gpsd:ERROR: read-only device open failed: Device or resource busy
Dec 01 12:35:10 raspi gpsd[9645]: gpsd:ERROR: /dev/rfcomm0: device activation failed.
Dec 01 12:35:10 raspi gpsd[9645]: gpsd:ERROR: device open failed: Device or resource busy - retrying read-only
Dec 01 12:35:10 raspi gpsd[9645]: gpsd:ERROR: read-only device open failed: Device or resource busy
Dec 01 12:35:10 raspi gpsd[9645]: gpsd:ERROR: /dev/rfcomm0: device activation failed.
Dec 01 12:35:10 raspi gpsd[9645]: gpsd:ERROR: device open failed: Device or resource busy - retrying read-only
Dec 01 12:35:10 raspi gpsd[9645]: gpsd:ERROR: read-only device open failed: Device or resource busy
Dec 01 12:35:10 raspi gpsd[9645]: gpsd:ERROR: /dev/rfcomm0: device activation failed.

 

but (cat \dev\rfcomm0) works fine, when I look in kismet I get the following message

ERROR: No update from GPSD in 15 seconds or more, attempting to reconnect
INFO: Connected to a JSON-enabled GPSD version 3.11, turning on JSON mode

 

Link to comment
Share on other sites

Have you run the following?

gpsd /dev/rfcomm0

(to ask gpsd to use the data from /dev/rfcomm0)

 

*edit* I'm guessing so, based on 'ERROR: /dev/rfcomm0: device activation failed.'

Hmm... you can tell which device/resource is using rfcomm0 by running;

sudo lsof | grep rfcomm0

and then kill it off? Can't test at the moment as I'm on a Windows machine :unsure:

Edited by haze1434
Link to comment
Share on other sites

9 minutes ago, haze1434 said:

Try sudo lsof | grep rfcomm0

Let us know the output if no luck.

rfcomm     9730            root    5r      CHR      216,0      0t0      49166 /dev/rfcomm0

I should note that I'm using a raspberry pi 3, don't know if it makes a difference

I'm guessing the "rfcomm" from above is the rfcomm process it self hosting the /dev/rfcomm0

Edited by r6uur6nr6u5ur56
Link to comment
Share on other sites

When looking through dmesg I notice this

not sure if the "not supported" is the problem because I can open "cat /dev/rfcomm0" just fine, not sure how gpsd thinks about it

[   70.176926] Bluetooth: RFCOMM TTY layer initialized
[   70.176966] Bluetooth: RFCOMM socket layer initialized
[   70.176987] Bluetooth: RFCOMM ver 1.11
[   77.927678] Bluetooth: TIOCGSERIAL is not supported
[   87.020196] Bluetooth: TIOCGSERIAL is not supported
[   87.021156] Bluetooth: TIOCGSERIAL is not supported
[   93.020151] Bluetooth: TIOCGSERIAL is not supported
[  401.665876] Bluetooth: TIOCGSERIAL is not supported
[  401.670516] Bluetooth: TIOCGSERIAL is not supported
[  411.021010] Bluetooth: TIOCGSERIAL is not supported
[  411.021251] Bluetooth: TIOCGSERIAL is not supported
[  411.022220] Bluetooth: TIOCGSERIAL is not supported
[  411.022454] Bluetooth: TIOCGSERIAL is not supported
[  417.020636] Bluetooth: TIOCGSERIAL is not supported
[  417.020832] Bluetooth: TIOCGSERIAL is not supported
[

 

Link to comment
Share on other sites

1 hour ago, r6uur6nr6u5ur56 said:

When looking through dmesg I notice this

not sure if the "not supported" is the problem because I can open "cat /dev/rfcomm0" just fine, not sure how gpsd thinks about it


[   70.176926] Bluetooth: RFCOMM TTY layer initialized
[   70.176966] Bluetooth: RFCOMM socket layer initialized
[   70.176987] Bluetooth: RFCOMM ver 1.11
[   77.927678] Bluetooth: TIOCGSERIAL is not supported
[   87.020196] Bluetooth: TIOCGSERIAL is not supported
[   87.021156] Bluetooth: TIOCGSERIAL is not supported
[   93.020151] Bluetooth: TIOCGSERIAL is not supported
[  401.665876] Bluetooth: TIOCGSERIAL is not supported
[  401.670516] Bluetooth: TIOCGSERIAL is not supported
[  411.021010] Bluetooth: TIOCGSERIAL is not supported
[  411.021251] Bluetooth: TIOCGSERIAL is not supported
[  411.022220] Bluetooth: TIOCGSERIAL is not supported
[  411.022454] Bluetooth: TIOCGSERIAL is not supported
[  417.020636] Bluetooth: TIOCGSERIAL is not supported
[  417.020832] Bluetooth: TIOCGSERIAL is not supported
[

 

Haven't heard of it before. Found this though;

TIOCGSERIAL: called to get a bunch of serial line information from your device all at once. A pointer to a struct serial_struct is passed to this call, which your driver should fill up with the proper values. Some programs (like setserial and dip) call this function to make sure that the baud rate was set properly and to get general information on what type of device your tty is. (http://www.linuxjournal.com/article/6226)

Doesn't mean much to me, apart from the 'get general information on what type of device your tty is', which may be your issue (not finding the correct type for your phone as a tty, or vice versa). Someone else here may be able to advise.

Edited by haze1434
Link to comment
Share on other sites

I used a USB gps for kismet and had a lot of problems trying to figure out how to get kismet to pick it up.  I had to edit gpsd config file and enter my device manually in the config before I would ever get it to read or stop throwing errors.  I dont know if this will help and I dont remember much as I did this over a year ago.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...