Haicom HI-204E USB GPS on Ubuntu Linux
HI-204E is a small and cheap GPS receiver for laptops. It is connected to USB port, which provides both power and communication with computer. HI-204E does not have any display or user interface apart from a USB connection to a computer. In the end of 2005, HI-204E cost 79 EUR in Helsinki.
This article is a work in progress and only documents my initial impressions, the procedure could be made much more simple. After filing a bug upstream, it should eventually work out of the box some day.
© 2005 Tero Karvinen www.iki.fi/karvinen
Quick Howto
$ sudo apt-get install gpsd gpsd-clients
Connect HI-204E USB to computer.
$ sudo killall gpsd $ sudo mknod /dev/ttyUSB0 c 188 0 $ sudo gpsd -N -n -D 2 /dev/ttyUSB0 & $ xgps &
The above probably worked. If you just need a GPS, that’s it. If you want to know why it worked, read more.
Explained Procedure
Install the required software:
$ sudo apt-get install gpsd gpsd-clients
If you want to see log events
$ sudo tail -f /var/log/messages &
Plug HI-204E to a USB port. Log prints:
usb 3-5: new high speed USB device using ehci_hcd and address 90 pl2303 2-3:1.0: PL-2303 converter detected usb 2-3: PL-2303 converter now attached to ttyUSB0 pl2303: already loaded gpsd.hotplug: loaded successfully
Some unnecessary log is cleaned up above. For you, it should say it loaded PL-2303 on first connect. Note that the correct USB-serial device is mentioned above (ttyUSB0 here).
It should work now with xpgs, but it does not “could not connect to device” or something like that.
Stop gpsd that was automatically started when HI-204E was connected to USB:
$ killall gpsd
Let’s create the missing device
$ sudo mknod /dev/ttyUSB0 c 188 0
Finally, start GPS daemon to listen to the correct device:
$ sudo gpsd -N -n -D 2 /dev/ttyUSB0
It should print a lot of data, including GPS data received:
gpsd: listening on port gpsd gpsd: successfully connected to the DBUS system bus gpsd: running with effective group ID gpsd: running with effective user ID 0 gpsd: opening GPS data source at '/dev/ttyUSB0' gpsd: speed 9600, 8N1 gpsd: gpsd_activate: opened GPS (5) gpsd: speed 4800, 8N1 gpsd: => GPS: $PFEC,GPint,GSA01,DTM00,ZDA01,RMC01,GLL00,VTG00,GSV05*3B gpsd: => GPS: $PMOTG,ZDA,1*2F gpsd: => GPS: $PGRM0,GSA,1*5C gpsd: => GPS: $PSRF105,1*3E gpsd: <= GPS: $GPGGA,070941.00,2328.2329,N,12056.9328,E,0,00,0.0,,M,,M,,*57 gpsd: <= GPS: $GPGSA,A,1,,,,,,,,,,,,,,,*1E 2665: arguments to dbus_message_iter_append_basic() were incorrect, assertion "real->iter_type == DBUS_MESSAGE_ITER_TYPE_WRITER" failed in file dbus-message.c line 2125. [..] gpsd: <= GPS: $GPGSV,3,1,12,24,67,300,,20,51,082,,17,38,325,40,04,31,248,*75 gpsd: <= GPS: $GPGSV,3,2,12,07,30,315,37,08,26,216,,11,26,043,,27,12,191,*79 gpsd: <= GPS:
Above the daemon is run as root (bad), should fix it.
To see your data in a more sensible form, use
$ xgps
It really should not be this hard to make the device work. It is probably a bug in Ubuntu or gpsd that it does not work out of the box.
It works. Tested with Ubuntu 5.10 Breezy Badger, gpsd 2.28, xgps 2.28 by Tero on 2005-12-17.
Comments
Adrea Gangemi got this working with an older Haicom HL303s: “I tried your instruction with an old HL303s and it works.”
See also
Martin 2005-07-11: Silva Atlas GPS pinouts (this page had the mknod script that was used in the fix above) http://www.stud.ntnu.no/~gronslet/blog/2005/07/11/silva-atlas-gps-pinouts/