DeLORME Earthmate GPS LT-20 (USBid:1163:0200) doesn't work in Feisty

Bug #111694 reported by Peter Rhone
14
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

The GPS LT-20 (USB-id 1163:0200 DeLorme Publishing, Inc.) sends standard NMEA commands over the USB. After connecting the device, a node is created as expected:

dmesg:

[34527.963000] usb 1-1: new full speed USB device using uhci_hcd and address 6
[34528.124000] usb 1-1: configuration #1 chosen from 1 choice
[34528.130000] cypress 1-1:1.0: DeLorme Earthmate USB converter detected
[34528.131000] usb 1-1: DeLorme Earthmate USB converter now attached to ttyUSB0

Output from: cat /proc/bus/usb/devices:

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 6 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=1163 ProdID=0200 Rev= 0.01
S: Manufacturer=DeLorme Publishing
S: Product=DeLorme USB Earthmate
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=00 Prot=00 Driver=cypress
E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl=6ms
E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=6ms

but then
cat /dev/ttyUSB0
just moves the cursor to the next line and waits until I press Ctrl-C without producing any output.

In Edgy Eft, the same command produces output similar to:
$GPRMC,035545.000,A,3036.096,N,09619.512,W,0.0,0.0 ,080806,4.3,E*71
$GPGGA,035545.000,3036.09648,N,09619.51249,W,2,06, 1.3,095.99,M,-23.3,M,,*51
$GPVTG,0.0,T,4.3,M,0.0,N,0.0,K*49
etc...

Because of this communication bug, neither gpsd nor gpsdrive can communicate with the Earthmate.

for some futher discussion see:
http://<email address hidden>/6383872.html

Revision history for this message
Oleksij Rempel (olerem) wrote :

please take a look at this bug https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/85488
it can the same issue.

Revision history for this message
Knix (knixtech) wrote :

I am having the same issue with the USB version of the LT-20. Has this been solved or even looked at yet?

Revision history for this message
Peter Rhone (prhone-gmail) wrote : Re: [Bug 111694] Re: DeLORME Earthmate GPS LT-20 (USBid:1163:0200) doesn't work in Feisty

YES i just solved it not 5 mins ago, i'll put the solution on the bug
report page.

On Thu, 2007-07-26 at 16:08 +0000, STORMCHAS3R wrote:
> I am having the same issue with the USB version of the LT-20. Has this
> been solved or even looked at yet?
>

Revision history for this message
Peter Rhone (prhone-gmail) wrote :

The solution involves recompiling the module, which stopped working for the LT-20 after a patch introduced into the 2.6.19 tree. The patch I'm assuming fixed some issue with other devices which use the same driver, so be careful.

To get it to work I did the following:

1)installed the linux source tree:
sudo apt-get install linux-source-2.6.XX <- replace XX with your running kernel version, for me: 20.
cd /usr/src
tar -xvf linux-source-2.6.XX.bz2

2)Copied the files cypress_m8.h and cypress_m8.c from /usr/src/linux-source-2.6.XX/drivers/usb/serial/
to /usr/src/modules/

3)Changed dirs to /usr/src/modules,
created /usr/src/Makefile with the standard module creation 2.6 stuff:

obj-m := cypress_m8.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

4) Commented out line 408 from cypress_m8.c, which should read:
   cypress_set_dead(port);
(anyway, if it isn't line 408 for you, it should be in the following if statement in function cypress_serial_control, which, after being commented out should look like this:
if (retval != 5) {
                err("%s - failed to retrieve serial line settings - %d", __FUNCTION__, retval);
                /*cypress_set_dead(port); // fix for LT-20*/
                return retval;
            } else ...

5) ran make

6) finally installed the new modules:
install -m 644 cypress_m8.ko /lib/modules/`uname -r`/kernel/drivers/cypress_m8.ko
depmod -a

7) tested with
cat /dev/ttyUSB0
all good -> lots out NMEA output.

Hope I didn't forget anything important, Good luck.

Revision history for this message
Peter Rhone (prhone-gmail) wrote :

by the way, same bug, same fix in gutsy at least up to tribe 3 (that's all i've been able to test so far)

Revision history for this message
schlafly (gbenlien7) wrote :

I am a new to linux SqRt7744. I don't understand step 3 "Changed dirs to /usr/src/modules,
created /usr/src/Makefile with the standard module creation 2.6 stuff:

obj-m := cypress_m8.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules"

can you please give more detail?
Thank you in advance.

Revision history for this message
Peter Rhone (prhone-gmail) wrote :

hello schlafly,
to change to the directory, type:
cd /usr/src/modules
then, to create the file, type
sudo gedit Makefile
and enter into the file the 5 lines you quoted above beginning with the "obj-m...." stuff. Save the file and exit, then type
make
and it should work!

Revision history for this message
schlafly (gbenlien7) wrote :

thank you for the reply. I have done what you said but I get "make: Nothing to be done for `default'." I don't know where I am going wrong. Do you have ideal?

Revision history for this message
schlafly (gbenlien7) wrote :

If I make the last line "default:= $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules" I get an error make: *** No targets. Stop.

Revision history for this message
schlafly (gbenlien7) wrote :

I was making this way harder than it was. I am sorry for wasting your time. I now got it to work. Thank you so much for your time and patience.

Revision history for this message
Peter Rhone (prhone-gmail) wrote : Re: [Bug 111694] Re: DeLORME Earthmate GPS LT-20 (USBid:1163:0200) doesn't work in Feisty

how did you do it?

On 8/25/07, schlafly <email address hidden> wrote:
>
> I was making this way harder than it was. I am sorry for wasting your
> time. I now got it to work. Thank you so much for your time and
> patience.
>
> --
> DeLORME Earthmate GPS LT-20 (USBid:1163:0200) doesn't work in Feisty
> https://bugs.launchpad.net/bugs/111694
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Peter Rhone, Dipl. Phys.
Merseburgerstr. 29
04177 Leipzig
Tel: +49 (0) 1782059108

Revision history for this message
webdr (webdr) wrote :

install -m 644 cypress_m8.ko /lib/modules/`uname -r`/kernel/drivers/cypress_m8.ko

should be...

install -m 644 cypress_m8.ko /lib/modules/`uname -r`/kernel/drivers/usb/serial/cypress_m8.ko

atleast, if you want it to work.

Other than that, this fix seems to work just fine. One other caveat. make sure you are NOT using gedit for
tweeking the cypress_m8.c file, use Gvim or vi or geany or some other real editor.

Thanks goes out to SqRt7744 for posting this, it saved me time.
-Mark Williams
webdr<nospamthx>.@ats.bz
 http://www.markw.net

Anyone who is interested, I am posting the .ko to my site w/ md5 and making it available, just send an e requesting the link.

Revision history for this message
Peter Rhone (prhone-gmail) wrote :

The device doesn't work in Gutsy (7.10) final either.

Revision history for this message
k4ny334st (sk8rboi11590-gmail) wrote :

I'm something of a noob to Ubuntu and am having the same problem(?) that schlafly was having. When I run make, I get "make: Nothing to be done for 'default'" can someone please help me out??

Revision history for this message
Greg Grossmeier (greg.grossmeier) wrote :

SqRt7744: Does this device (DeLORME LT-20) still not work in Hardy?

You can test this in the live environment of the Desktop CD for Hardy. It would help us greatly if you could test with it so we can work on getting it fixed in the actively developed release. You can find out more about the development release at http://www.ubuntu.com/testing/

Thanks!

Revision history for this message
Peter Rhone (prhone-gmail) wrote :
  • unnamed Edit (2.2 KiB, text/html; charset=ISO-8859-1)
  • dmesg.out Edit (34.2 KiB, application/octet-stream; name=dmesg.out)

I just tested it with hardy beta + all updates, still doesn't work.
uname -a
Linux studioblaster 2.6.24-16-rt #1 SMP PREEMPT RT Thu Apr 10 15:15:40 UTC
2008 i686 GNU/Linux

cat /dev/ttyUSB0 doesn't return any output, with sudo it gives Input/output
error.

dmesg attached. The last few lines are interesting:
[ 147.314893]
/build/buildd/linux-2.6.24/debian/build/custom-source-rt/drivers/usb/serial/cypress_m8.c:
Cypress USB to Serial Driver v1.09
[ 170.517359]
/build/buildd/linux-2.6.24/debian/build/custom-source-rt/drivers/usb/serial/cypress_m8.c:
cypress_serial_control - failed to retrieve serial line settings - -32
[ 170.517374]
/build/buildd/linux-2.6.24/debian/build/custom-source-rt/drivers/usb/serial/cypress_m8.c:
cypress_m8 suspending failing port 0 - interval might be too short

On Sat, Apr 12, 2008 at 3:57 AM, Greg Grossmeier <email address hidden>
wrote:

> SqRt7744: Does this device (DeLORME LT-20) still not work in Hardy?
>
> You can test this in the live environment of the Desktop CD for Hardy.
> It would help us greatly if you could test with it so we can work on
> getting it fixed in the actively developed release. You can find out
> more about the development release at http://www.ubuntu.com/testing/
>
> Thanks!
>
> ** Changed in: linux (Ubuntu)
> Sourcepackagename: None => linux
> Importance: Undecided => Low
> Status: New => Triaged
>
> --
> DeLORME Earthmate GPS LT-20 (USBid:1163:0200) doesn't work in Feisty
> https://bugs.launchpad.net/bugs/111694
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Peter Rhone, Dipl. Phys.
Merseburgerstr. 29
04177 Leipzig
Tel: +49 (0) 1782059108

Revision history for this message
Dan Taylor (slash) wrote :

For those who are having problems with the instructions for the "Makefile", saying "nothing to make for default", do the following:

At the bottom of the Makefile file, on the last line:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules"

Delete the indentations made with spaces, and replace them with a tab.
What happened was is when you the copied the Makefile text, your browser changed the tab indentation into spaces, thus causing the problem.
There *must* be a tab before the $(MAKE) part.
After I did this I had no issues with the instructions.

Revision history for this message
Dan Taylor (slash) wrote :

After all that, it turns out commenting out the line did nothing for me.
Running Hardy 8.04, after running gpsd I get the same output in dmesg as Sqrt7744 reported:

[ 1004.303559] cypress 1-1:1.0: DeLorme Earthmate USB converter detected
[ 1004.305191] usb 1-1: DeLorme Earthmate USB converter now attached to ttyUSB0
[ 1015.047140] /build/buildd/linux-2.6.24/drivers/usb/serial/cypress_m8.c: cypress_serial_control - failed to retrieve serial line settings - -32
[ 1015.047158] /build/buildd/linux-2.6.24/drivers/usb/serial/cypress_m8.c: cypress_m8 suspending failing port 0 - interval might be too short

Revision history for this message
Harry Rockefeller (harry-rockefeller) wrote :

With a recent Ubuntu update things got good enough to work. I went through the process of getting the new cypress_m8.c from 2.6.24-generic source package. I did the usual change commenting out the "cypress_set_dead(port);" line recompiled and using that module the LT-20 GPS began talking. I had a problem with gpsdrive though. For some reason it wasn't initializing correctly and trying to set preferences caused it to die with segmentation fault. I eventually found manually editing my gpsdriverc file to give a full path for way.txt allowed me to select preferences and get gpsdrive out of simulation mode! Well, it was either that or the other thing I did which was to remove gpsdrive and reinstall it. So, at least I'm back to the "workaround" which had worked in earlier Ubuntus. It would be nice if cypress_m8 were fixed though.

Revision history for this message
JWZ (marr9999) wrote :
Download full text (6.3 KiB)

Good news, everyone! :^)

The DeLorme Earthmate LT-20 (and LT-40) GPS receivers now work again under Linux! The new 2.6.26 kernel incorporates a series of patches by Mike Isely which fix the problems with the supporting driver.

The full story is a bit more involved, so for anyone interested, please read on....

As near as I've been able to discern, DeLorme has had at least 4 USB-based GPS receivers which all go by the "Earthmate" name. There is the original USB-based "Earthmate", 2 variants (details below) of the "Earthmate LT-20", and the recent "Earthmate LT-40". (It appears that there may have even been an older RS-232 "Earthmate" as well, but I'm ignoring any such device here since it is irrelevant to this discussion.

The 'cypress_m8' Linux kernel module initially (until the 2.6.19 kernel came out) worked fine with the original USB Earthmate and the 1st (older) variant of the Earthmate LT-20.

A patch to the 'cypress_m8' driver by Mike Isely went into what became the Linux 2.6.19 kernel. For me, it caused my previously-working LT-20 to stop working. I discovered this (way back in Mar 2007) and, after some testing, posted about it, including a "quick 'n' dirty" 1-line fix that made my LT-20 start working again:

   http://<email address hidden>/msg52237.html

Shortly thereafter, I got an email from Mike Isely. He explained that his patch that got included in creating the Linux 2.6.19 kernel made his original USB Earthmate GPS receiver work more reliably, preventing some situation in which the driver was monopolizing his CPU, sometimes even forcing a reboot.

We began an email exchange/discussion (which eventually drifted off the 'linux-usb-devel' mailing list) about fixing the driver properly, to support both the original Earthmate and the LT-20 version. At that time, the LT-40 didn't exist.

We both got distracted for several months doing other things. In that time, Mike had conveniently purchased an Earthmate LT-20 to do some testing. We finally got around to resuming the discussion and testing. Up until late January 2008, neither of us realized that there was such a thing as a "new" LT-20 variant. Mike came up with a patch to the 'cypress_m8' driver that worked with his original Earthmate and with his (new) LT-20. When I tested it, it didn't work with my (old) LT-20, though.

We quickly realized that DeLorme had put out a newer version of the LT-20 but with the same USB 'Product ID' (PID).

As it turns out, both of the Earthmate LT-20 receivers I own are the older variant. Mike owns both the old original Earthmate (non-"LT-20") and the newer variant of the LT-20.

Once we realized this and reported our respective LT-20 device capabilities to each other, Mike quickly came up with another patch which worked perfectly on my older LT-20 devices. Since DeLorme didn't change the PID between the old and new LT-20 receivers, Mike was forced to use the device's report of the 'maximum packet size' (32 bytes on the old LT-20 devices but only 8 bytes on the new LT-20 devices) to discern the proper way to process the datastream.

In fact, for anyone interested in the really gory details, here's the...

Read more...

Revision history for this message
Dan Taylor (slash) wrote :
Download full text (6.9 KiB)

I've tested this and can confirm my LT-20 now works again flawlessly.
This really made my day!
Ubuntu 8.04 users like myself who want a hassle-free install can get the
latest 2.6.26 kernel package from intrepid (
http://packages.ubuntu.com/intrepid/base/ ) and install the deb, and
you'll be good to go!

Dan Taylor

JWZ wrote:
> Good news, everyone! :^)
>
> The DeLorme Earthmate LT-20 (and LT-40) GPS receivers now work again
> under Linux! The new 2.6.26 kernel incorporates a series of patches by
> Mike Isely which fix the problems with the supporting driver.
>
> The full story is a bit more involved, so for anyone interested, please
> read on....
>
> As near as I've been able to discern, DeLorme has had at least 4 USB-
> based GPS receivers which all go by the "Earthmate" name. There is the
> original USB-based "Earthmate", 2 variants (details below) of the
> "Earthmate LT-20", and the recent "Earthmate LT-40". (It appears that
> there may have even been an older RS-232 "Earthmate" as well, but I'm
> ignoring any such device here since it is irrelevant to this discussion.
>
> The 'cypress_m8' Linux kernel module initially (until the 2.6.19 kernel
> came out) worked fine with the original USB Earthmate and the 1st
> (older) variant of the Earthmate LT-20.
>
> A patch to the 'cypress_m8' driver by Mike Isely went into what became
> the Linux 2.6.19 kernel. For me, it caused my previously-working LT-20
> to stop working. I discovered this (way back in Mar 2007) and, after
> some testing, posted about it, including a "quick 'n' dirty" 1-line fix
> that made my LT-20 start working again:
>
> http://www.mail-archive.com/linux-usb-
> <email address hidden>/msg52237.html
>
> Shortly thereafter, I got an email from Mike Isely. He explained that
> his patch that got included in creating the Linux 2.6.19 kernel made his
> original USB Earthmate GPS receiver work more reliably, preventing some
> situation in which the driver was monopolizing his CPU, sometimes even
> forcing a reboot.
>
> We began an email exchange/discussion (which eventually drifted off the
> 'linux-usb-devel' mailing list) about fixing the driver properly, to
> support both the original Earthmate and the LT-20 version. At that
> time, the LT-40 didn't exist.
>
> We both got distracted for several months doing other things. In that
> time, Mike had conveniently purchased an Earthmate LT-20 to do some
> testing. We finally got around to resuming the discussion and testing.
> Up until late January 2008, neither of us realized that there was such a
> thing as a "new" LT-20 variant. Mike came up with a patch to the
> 'cypress_m8' driver that worked with his original Earthmate and with his
> (new) LT-20. When I tested it, it didn't work with my (old) LT-20,
> though.
>
> We quickly realized that DeLorme had put out a newer version of the
> LT-20 but with the same USB 'Product ID' (PID).
>
> As it turns out, both of the Earthmate LT-20 receivers I own are the
> older variant. Mike owns both the old original Earthmate (non-"LT-20")
> and the newer variant of the LT-20.
>
> Once we realized this and reported our respective LT-20 device
> capabilities to each other, Mi...

Read more...

Revision history for this message
Greg Grossmeier (greg.grossmeier) wrote :

Marking as Fix Released as the fix is actively available in Intrepid.

Thanks!

Changed in linux:
status: Triaged → Fix Released
Revision history for this message
davidrachlin (davidrachlin) wrote :

Dan...

When i click on your link (http://packages.ubuntu.com/intrepid/base/) it takes me to the download page.

I don't know where to go from there.
I'm very new to linux, and I'd really like to know what I should do. Do I download the entire deb? Or is there a way to just pull the updated cypress_m8 files out of that kernel and install them on my computer in the right folder.

If there is a way to do that... how?

i'd really appreciate your help.

Thanks

Dave Rachlin

Revision history for this message
ABW (abw) wrote :

Hello, so it's Feb 2009 now and I'm just getting into Ubuntu. A friend of mine gave me a LT-20 Model 9838 and I plugged it in and installed some GPS soft from the repository. It did not work. That is the extent of what I know. I am running Ubuntu 9.10. Can anyone guide me to make it work? Thanks.. (Very new at this, and I follow instructions very well ! ) Vancouver BC

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.