Making the Globalsat BC-307 Compact Flash GPS device work with Sharp Zaurus SL-6000L using default Sharp ROM version 1.12 and 2.4.18-rmk7-pxa3-embedix
I read here at oesf.org/forums that the Globalsat BC-307 CF GPS worked with the Sharp Zaurus SL-6000L, so I bought one off eBay. When it arrived I expectantly inserted it and......nothing happened!! So off I went to the forums to find out how to make this thing work. That was not as easy as it could have been. Determinedly, I Googled til my fingers bled and compiled the following howto from numerous scattered sources. It is not my intention to take credit for someone else's work, but many of the webpages do not really give much info about whose ideas were there. The following is just a collection of things from user forums, sourceforge.net, this forum, and other places. If I have not given credit where it is due, please let me know and I will edit the info to give proper credit.
1) Software that will help you:
qkonsole (version 0.9.3-20040205) (got it at http://www.zaurususergroup.org/feed/
qpegps (version 0.9.2.3) (also at http://www.zaurususergroup.org/feed/
treeexplorer (version 1.7.0-2) (also at http://www.zaurususergroup.org/feed/
2) First you need to download the serial_cs.o.gz module. I found it at: http://www.iral.com/~albertr/linux/misc
For those of you who are more talented than me, I would suppose that you can find the source code and compile it yourself. I will also check to see if I can upload this module to the http://www.elsix.org
, but I'm not sure if that is a problem with the guy (presumably albert r) who precompiled this and made it available at the above site.
3) I use qkonsole and su to root and cd to folder where you downloaded the module, and type:
4) Create "char" folder in /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers :
5) Create "pcmcia" folder inside the "char" folder:
6) Copy this module to the appropriate Zaurus drivers folder with this command:
cp serial_cs.o /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/char/pcmcia
7) OR, you can do this much easier with treeexplorer by navigating to the above-mentioned drivers folder and highlighting it and selecting File > New > Folder and naming the folder ("char" and "pcmcia" inside the "char" folder). You can then highlight the folder or files and change ownership and permissions using File > Properties > Security tab. Make the owner "root", and group "root". Give "read" and "execute" permissions to everyone and "write" permission only to "owner".
If you want to do things the old-fashioned way, then cd to the above-mentioned drivers folder and type (as root):
chown root:root /char
chown root:root /char/pcmcia
chown root:root /char/pcmcia/serial_cs.o
chmod 775 /char
chmod 775 /char/pcmcia
chmod 775 /char/pcmcia/serial_cs.o
8) Now restart your Zaurus
9) In qkonsole, su to root and type:
(or use insmod if modprobe doesn't work)
If someone knows how to add this to some file to make it start automatically, let me know and I will edit this howto to show that info.
10) Start qpegps *without* inserting the CF GPS device.
11) It will complain that it "Cannot connect to GPS". This is because it is trying to connect to the wrong serial port. (Also because it is not yet plugged in). Click the "Ignore" button. Insert the BC-307 card into the CF slot. On the GPS tab change the device to /dev/ttyS3 then either hit the return key on keyboard or the chrome "OK" button on the front of the Zarus. If you have ejected a CF memory card since restarting the Z, then you may have to start qkonsole, without closing qpegps, and issue the command:
The red light on the BC-307 should come on and blink.
12) Now close qkonsole, and hit the chrome "OK" button and wait for a bit. It may take 20 or 30 seconds to work. You can hit the "OK" button again if necessary, repeat until you see latitude and longitude for your location on the GPS tab. But wait a little between hitting the "OK" button, as the GPS takes a little time to start working. These results are reproducible for me.
If you eject the GPS card, then reinsert it, it will *not* just work. You may have to do the following as root:
Then start qpegps *without* inserting GPS card, hit "IGNORE" button. Open qkonsole (again without closing qpegps) and type:
Then close qkonsole and hit the chrome "OK" button again. If worse comes to worse, just restart the Zaurus and go back to step 9
If anyone knows a way to avoid these gotchas when removing and reinserting the card, or how to make this easier, just let me know, and I will include
that info also.
Helpful info: You can download maps from Expedia.com within the qpegps program. Make sure that you download the maps to an SD card, as maps can overfill your internal storage quickly. I created a "maps" folder on my SD card and pointed the download folder to that.
Just start your wifi connection and on the "info" tab, click on "download" at the bottom of page. Select "Download few maps cover area from expedia" and you can set the program to get maps of various resolutions, scales, and diferent sized areas from the latitude and logitude that you input. Or just let the GPS load the latitude and logitude of your current location. This may take quite a while depending on the size and resolution of the maps you are downloading. It may appear that the Zaurus is locked up, but it is just slowly downloading maps. You may want to start with small area maps at first just to play with it and get used to how it works.
Added the following to get serial_cs module to automatically load on reboot:
I wrote a script (seems wrong to call a two-liner a script) as follows:
I saved it at /etc/rc.d/rc5.d naming the file S49serial_cs
I believe the scripts in this directory are only executed if they begin with an "S" and some number. I presume that the number determines the order in which the scripts are executed, so I gave it a number higher than the rest. (After all it has been previously loaded after the zaurus boots completely.) Also don't forget to make the owner and group of the file root and make it executable, with these commands:
chown root /etc/rc.d/rc5.d/S49serial_cs
chgrp root /etc/rc.d/rc5.d/S49serial_cs
chmod 755 /etc/rc.d/rc5.d/S49serial_cs
Or easier yet, use TreeExplorer File>Properties>Security to change all that stuff.