Kirjoittaja Aihe: Bluetooth GPS asetukset eivät pysy?  (Luettu 1816 kertaa)

fyndi

  • Käyttäjä
  • Viestejä: 84
    • Profiili
Bluetooth GPS asetukset eivät pysy?
« : 15.01.11 - klo:09.40 »
Tutustun parhaillaan OpenCPN navigointiohjelmaan ja käytän kannettavan kanssa Nokian Bluetooth GPS mokkulaa. OpenCPN ohjeissa kerrotaan hyvin ja selkeästi kuinka asetukset tehdään ja homma onnistuukin hienosti. Mutta ongelmana on se että asetukset eivät tallennu ja aina joudun uudestaan käynnistyksen yhteydessä kirjoittamaan terminaaliin komentoja.

Tässä on OpenCPN sivuilta ohjeet:
Lainaus
Bluetooth GPS Ubuntu.

If you have a bluetooth GPS  you will need to first configure it through the standard Ubuntu Bluetooth "set up new device " proceedure.

Once you have done that you will need to find what the address of the GPS is. To do that you run this command.

sudo hcitool scan

it will then start looking for the Bluetooth GPS and hopefully find your GPS. You should see something similar.

Scanning ...
    00:1C:88:10:D3:4D    iBT-GPS

In this case i have a IBT-GPS at address     00:1C:88:10:D3:4D   (Your GPS address will be different)

Next we have to bind the GPS address to a "virtual" device OpenCPN understands in this case rfcomm0

we do this with the following command.

sudo rfcomm bind /dev/rfcomm0 00:1C:88:10:D3:4D        Note put your GPS address in this line

It is my understanding you do not have to run these commands each time your linux is restarted as it will remeber your GPS address.

Now all you need to do is go into OpenCPN Toolbox and select GPS

Now in the NMEA Data Source options select from the pulldown menu

/dev/rfcomm0

Thats it you should now have a Bluetooth GPS Connected.


Näillä ohjeilla saan homman toimimaan, mutta joudun tekemään proseduurin aina uudestaan ja uudestaan. Miten saisin nuo ritirimpsut tallettumaan ja aukeamaan aina kun käynnistän OpenCPN ohjelman?
 

jekku

  • Käyttäjä
  • Viestejä: 2624
    • Profiili
Vs: Bluetooth GPS asetukset eivät pysy?
« Vastaus #1 : 15.01.11 - klo:10.33 »
Tutustun parhaillaan OpenCPN navigointiohjelmaan ja käytän kannettavan kanssa Nokian Bluetooth GPS mokkulaa. OpenCPN ohjeissa kerrotaan hyvin ja selkeästi kuinka asetukset tehdään ja homma onnistuukin hienosti. Mutta ongelmana on se että asetukset eivät tallennu ja aina joudun uudestaan käynnistyksen yhteydessä kirjoittamaan terminaaliin komentoja.

Tässä on OpenCPN sivuilta ohjeet:
Lainaus
Bluetooth GPS Ubuntu.

If you have a bluetooth GPS  you will need to first configure it through the standard Ubuntu Bluetooth "set up new device " proceedure.

Once you have done that you will need to find what the address of the GPS is. To do that you run this command.

sudo hcitool scan

it will then start looking for the Bluetooth GPS and hopefully find your GPS. You should see something similar.

Scanning ...
    00:1C:88:10:D3:4D    iBT-GPS

In this case i have a IBT-GPS at address     00:1C:88:10:D3:4D   (Your GPS address will be different)

Next we have to bind the GPS address to a "virtual" device OpenCPN understands in this case rfcomm0

we do this with the following command.

sudo rfcomm bind /dev/rfcomm0 00:1C:88:10:D3:4D        Note put your GPS address in this line

It is my understanding you do not have to run these commands each time your linux is restarted as it will remeber your GPS address.

Now all you need to do is go into OpenCPN Toolbox and select GPS

Now in the NMEA Data Source options select from the pulldown menu

/dev/rfcomm0

Thats it you should now have a Bluetooth GPS Connected.


Näillä ohjeilla saan homman toimimaan, mutta joudun tekemään proseduurin aina uudestaan ja uudestaan. Miten saisin nuo ritirimpsut tallettumaan ja aukeamaan aina kun käynnistän OpenCPN ohjelman?
 

Olisko mitään jos aloitat kirjoittamalla komennot skriptiin ja ajat sen seuraavalla kerralla.
Jos/kun toimii, niin sitten seuraavaksi kaivellaan sille skriptille paikka.

fyndi

  • Käyttäjä
  • Viestejä: 84
    • Profiili
Vs: Bluetooth GPS asetukset eivät pysy?
« Vastaus #2 : 16.01.11 - klo:08.34 »
En ole spesialisti skripteissä, eli täsmennätkö vähän - mitä ja minne? Tämä käsky pitäisi ajaa aina kun kone starttaa tai vaihtoehtoisesti kun OpenCPN starttaa:

Koodia: [Valitse]
sudo rfcomm bind /dev/rfcomm0 00:1C:88:10:D3:4D
Eli minne tuo pitäisi laittaa?
 

jekku

  • Käyttäjä
  • Viestejä: 2624
    • Profiili
Vs: Bluetooth GPS asetukset eivät pysy?
« Vastaus #3 : 16.01.11 - klo:19.43 »
En ole spesialisti skripteissä, eli täsmennätkö vähän - mitä ja minne? Tämä käsky pitäisi ajaa aina kun kone starttaa tai vaihtoehtoisesti kun OpenCPN starttaa:

Koodia: [Valitse]
sudo rfcomm bind /dev/rfcomm0 00:1C:88:10:D3:4D
Eli minne tuo pitäisi laittaa?
 

Kokeiles /etc/rc.local,
lähes opussa saattaa olla rivi:
# By default this script does nothing.
# tähän se oma loitsusi
rfcomm bind /dev/rfcomm0 00:1C:88:10:D3:4D
# tämän seuraavankin pitäisi olla jo valmiina
exit 0