Τρίτη, 3 Ιουνίου 2008

Destinator GPS usb on linux tutorial BU-303

I bought a BU-303 GPS Receiver [http://gpsd.berlios.de/bu_303b.html] with USB with the idea to connect it to my Asus EEE with Debian. It has an internal serial to usb adapter.
After plugging it in, a did a "dmesg" a got this result:

usb 3-1: new full speed USB device using uhci_hcd and address 2
usb 3-1: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
pl2303 3-1:1.0: pl2303 converter detected
usb 3-1: pl2303 converter now attached to ttyUSB0
usbcore: registered new interface driver pl2303
drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver



So the device was fully recognized by the 2.6.24-1 kernel I use.
As stated by the kernel, the device was now attached and usable from ttyUSB0.
ttyUSB0 is at the /dev directory, so the full path to the device is /dev/ttyUSB0.

The second step I had to take was to install GPSd.

sudo aptitude install gpsd


GPSd is a interface daemon for GPS receivers. I started it using

sudo gpsd -n /dev/ttyUSB0

.

This step is unnecessary but it is really interesting.
try installing gpsd-clients and do

gpspipe -s /dev/ttyUSB0 -r


This will show you all the raw data the gps sends back.
[Check this page ( http://www.gpsinformation.org/dale/nmea.htm ) to get an explanation of what the codes mean]

Now all you have to do is install wine

sudo aptitude install wine

.
Wine is a program that emulating Window's dlls, accomplishes to run Windows programs on Linux.

Install Destinator just by clicking the .exe (I used Destinator 7 for Windows edition) through wine. [ok, make your own research on how to get Destinator].

Now all we have to do is to make wine see the serial port for communicating with the GPS.
Wine reads the name of a file representing a serial's port name and links it with a "true" serial port. For example: com2 -> /dev/ttyS1 links the wine's port com2 with our pc's serial port ttyS1.

To do this, go to the ~/.wine/dosdevices folder and create a symboling link between com13 and /dev/ttyUSB0

cd ~/.wine/dosdevices
ln -s /dev/ttyUSB0 com13

.

Now start the Destinator and choose to search automatically for a GPS at a com port. Choose Sirf as protocol.

When the Destinator find the port you are ready to navigate!
Have a nice trip!

I will post a photo soon!

Δεν υπάρχουν σχόλια: