Active Topics

 


Reply
Thread Tools
Guest | Posts: n/a | Thanked: 0 times | Joined on
#31
I've stumbled on this thread many times in my searches for a simple way to let my N810 act as a GPS module. Specifically I want my Nokia E51 phone to use the GPS over bluetooh. I find that most of the solutions available seem overly convoluted, but at last I've found a method that is pretty easy and seems to work well.

First you have to shut down obexsrv:

/etc/init.d/obexsrv stop

I believe obexsrv is a program for sharing files over bluetooth, but I never do that anyway. The problem is that obexsrv insists on listening on channel 1, and my E51 insists on connecting to channel 1 to obtain GPS data. There seems to be no way to configure either of them to use a different channel.

With that taken care of, we can start announing that we have a serial port profile on channel one:

sdptool add --channel=1 SP

And now the magic moment, connect gpspipe to the bluetooth channel:

rfcomm watch 0 1 sh -c "gpspipe -r > /dev/rfcomm0"

Some of the convoluted examples given elsewhere are probably because the rfcomm watch command is fairly new and people had to find other ways of achieving this behaviour.

Now you should see something like "Waiting for connection on channel 1". If you get "Can't bind RFCOMM socket: Address already in use", that means something else is already listening on channel 1. Did you remember to shut down obexsrv?

You need to make sure the GPS keeps running. I tend to use GPSJinni for this if I don't have any other need for the GPS, but MaemoMapper, GPXView or practically any other GPS program would work as well. Does anyone know a way to keep the GPS running without having a foreground application open?

With that done, you should now be able to connect to the channel. You can test this from another Linux system like this:

rfcomm bind /dev/rfcomm0 <bluetooth-address-of-your-n810> 1
cat /dev/rfcomm0

You should now see the line "GPSD,R=1" appear, followed by loads of GPS data. On the n810 side, you should see "Connection from xx:xx:xx:xx:xx:xx to /dev/rfcomm0".

You can find the bluetooth MAC address by typing hciconfig.

The commands sdptool, hciconfig and rfcomm are available in the package bluez-utils-test. Don't ask me where I got the package from, but I think it was in one of the official Maemo repositories.
 

The Following User Says Thank You to For This Useful Post:
Posts: 3 | Thanked: 0 times | Joined on Feb 2009
#32
I felt the need to update this. There is an application that has been around for at least a few months called minigpsd. You have to start it manually every time you want to use it but I know that it can stream gps info over http and tcpip not sure about bluetooth but it does seem that you can. I ve had great success using it as a gps receiver for my laptop using ubuntu, blueman, and minigpsd over a created adhoc network.
 
Posts: 47 | Thanked: 6 times | Joined on Aug 2009
#33
^^ please explain now that wayfinder doesnt work how can i use the n810 gps data on an ipod touch where many gps programs are available but no gps chip
 
Posts: 17 | Thanked: 1 time | Joined on Jul 2009
#34
Originally Posted by iankellogg View Post
I felt the need to update this. There is an application that has been around for at least a few months called minigpsd. You have to start it manually every time you want to use it but I know that it can stream gps info over http and tcpip not sure about bluetooth but it does seem that you can. I ve had great success using it as a gps receiver for my laptop using ubuntu, blueman, and minigpsd over a created adhoc network.
Could you please elaborate your setup?
I would like to try using my N810 GPS on my PC for Google Earth.
 
Posts: 47 | Thanked: 6 times | Joined on Aug 2009
#35
please x2 !!!
 
Posts: 47 | Thanked: 6 times | Joined on Aug 2009
#36
wow.. nobody?
 
Posts: 60 | Thanked: 33 times | Joined on Apr 2010
#37
Originally Posted by tz1 View Post
Code:
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);
        }
    }
}
if the other end supports RFCOMM and for a certain reason doesnt reply, will the read(n, buf, 4); make the system freeze?
or u recommend me to use just BLUEZ rfcomm API to communicate (on RS232) to a bluetooth module from maemo ?

Thanks
__________________
HOWinUK.co.uk - The Real Student Guide in the UK

Last edited by raedbenz; 2010-07-17 at 20:38.
 
Posts: 47 | Thanked: 6 times | Joined on Aug 2009
#38
Anyone want to help me?? please since wayfinder stopped working on m810 i just want to use its gps as a bluetooth module and connect it to my jailbroken ipod touch (there is an app by which you can use an external bluetooth gps module and the ipod will recognise the data).. Please instruct.. this is the only hope
 
Posts: 47 | Thanked: 6 times | Joined on Aug 2009
#39
wow.. no body has any idea how to do that?
 
Posts: 47 | Thanked: 6 times | Joined on Aug 2009
#40
anybody yet?
 
Reply


 
Forum Jump


All times are GMT. The time now is 18:29.