The Following User Says Thank You to ledimies For This Useful Post: | ||
|
2008-06-12
, 15:49
|
Posts: 18 |
Thanked: 6 times |
Joined on Dec 2007
@ Warsaw, Poland
|
#2
|
|
2008-06-13
, 05:29
|
Posts: 6 |
Thanked: 2 times |
Joined on Jun 2008
|
#3
|
|
2008-06-14
, 23:32
|
|
Posts: 880 |
Thanked: 264 times |
Joined on Feb 2007
@ Cambridge, UK
|
#4
|
$ cat > gps_to_rfcomm #!/bin/bash cat /dev/gps > /dev/rfcomm0 ^D $ chmod ugo+x gps_to_rfcomm $ rfcomm listen 0 gps_to_rfcomm
The Following User Says Thank You to speculatrix For This Useful Post: | ||
|
2008-06-16
, 19:44
|
Posts: 78 |
Thanked: 32 times |
Joined on May 2008
|
#5
|
|
2008-06-16
, 20:03
|
|
Posts: 159 |
Thanked: 341 times |
Joined on Dec 2007
@ Helsinki, Finland
|
#6
|
I would guess that you need to do the following (I don't have an n810 or anything similar)
basically, make a script that "listens" to rfcomm on the tablet and then reads from /dev/gps writing to the bluetooth virtual serial device.. something like this
rfcomm listen 0 "cat /dev/gps > /dev/rfcomm0"
you might need to put the "cat" command into a shell script, e.g.
Code:$ cat > gps_to_rfcomm #!/bin/bash cat /dev/gps > /dev/rfcomm0 ^D $ chmod ugo+x gps_to_rfcomm $ rfcomm listen 0 gps_to_rfcomm
|
2008-06-18
, 15:54
|
|
Posts: 716 |
Thanked: 236 times |
Joined on Dec 2007
|
#7
|
static void sendnokgps(char *cmd) { int n, len; struct sockaddr_un igps; n = socket(AF_UNIX, SOCK_STREAM, 0); if (n >= 0) { igps.sun_family = AF_UNIX; strcpy(igps.sun_path, "/var/lib/gps/gps_driver_ctrl"); len = strlen(igps.sun_path) + sizeof(igps.sun_family); if (connect(n, (struct sockaddr *) &igps, len) != -1) { char buf[4]; if (!fork()) { // this can take a while write(n, cmd, strlen(cmd)); read(n, buf, 4); close(n); exit(0); } close(n); } } }
|
2008-06-18
, 17:10
|
|
Posts: 716 |
Thanked: 236 times |
Joined on Dec 2007
|
#8
|
|
2008-06-18
, 17:47
|
|
Posts: 716 |
Thanked: 236 times |
Joined on Dec 2007
|
#9
|
|
2008-06-18
, 19:22
|
|
Posts: 716 |
Thanked: 236 times |
Joined on Dec 2007
|
#10
|
#!/bin/sh exec /usr/libexec/navicore-gpsd-helper >$1
sdptool add SP
rfcomm -i hci0 listen 2 1 ./gpson {}
I was wondering if it is possible to use the n810 as a bluetooth gps module. I just bought Nokia E51 phone and it has some interesting apllications that would benefit from gps connection (such as sports tracker). I would like to use n810's gps so I wouldn't have to buy a separate bluetooth gps module. Does anyone know if this is possible and, if it is, how?