Re: [Gpsbabel-misc] Another miniHomer question, accessing data
Brought to you by:
robertl
From: Robert L. <rob...@gp...> - 2012-04-04 18:17:23
|
You've shown two different problems. One is the open of ttyUSB0 hanging and that's totally a device driver/device issue. The other is the read error. Which are you chasing? RJL On Wed, Apr 4, 2012 at 1:08 PM, Josep Delmonte <ly...@ym...> wrote: > Hello, > > I just thought I would ping this topic again to see if anyone had an idea. > Any clues from my last strace output below? Is the device just defective > maybe? > > Thanks for any additional help, > Josep > > ------------------------------ > *From:* Josep Delmonte <ly...@ym...> > *To:* Josef Reisinger <dat...@ao...> > *Cc:* "gps...@li..." < > gps...@li...>; "rol...@gm..." < > rol...@gm...> > *Sent:* Wednesday, March 28, 2012 1:13 PM > > *Subject:* Re: [Gpsbabel-misc] Another miniHomer question, accessing data > > Josef, > > Thank you for the suggestions. The -i skytraq and -i,minihomer,initbaud=0 > both produce the same error as before. > strace gives the following output before it hangs: > > # stty -F /dev/ttyUSB0 sane clocal -crtscts > # strace cat /dev/ttyUSB0 > execve("/bin/cat", ["cat", "/dev/ttyUSB0"], [/* 88 vars */]) = 0 > brk(0) = 0x60c000 > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = > 0x7fd281c67000 > access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or > directory) > open("/etc/ld.so.cache", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=132633, ...}) = 0 > mmap(NULL, 132633, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd281c46000 > close(3) = 0 > open("/lib64/libc.so.6", O_RDONLY) = 3 > read(3, > "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\355\1\0\0\0\0\0"..., > 832) = 832 > fstat(3, {st_mode=S_IFREG|0755, st_size=1725484, ...}) = 0 > mmap(NULL, 3591144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) > = 0x7fd2816de000 > fadvise64(3, 0, 3591144, POSIX_FADV_WILLNEED) = 0 > mprotect(0x7fd281842000, 2093056, PROT_NONE) = 0 > mmap(0x7fd281a41000, 20480, PROT_READ|PROT_WRITE, > MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x163000) = 0x7fd281a41000 > mmap(0x7fd281a46000, 19432, PROT_READ|PROT_WRITE, > MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fd281a46000 > close(3) = 0 > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = > 0x7fd281c45000 > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = > 0x7fd281c44000 > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = > 0x7fd281c43000 > arch_prctl(ARCH_SET_FS, 0x7fd281c44700) = 0 > mprotect(0x7fd281a41000, 16384, PROT_READ) = 0 > mprotect(0x60a000, 4096, PROT_READ) = 0 > mprotect(0x7fd281c68000, 4096, PROT_READ) = 0 > munmap(0x7fd281c46000, 132633) = 0 > brk(0) = 0x60c000 > brk(0x62d000) = 0x62d000 > open("/usr/lib/locale/locale-archive", O_RDONLY) = -1 ENOENT (No such file > or directory) > open("/usr/share/locale/locale.alias", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=2512, ...}) = 0 > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = > 0x7fd281c66000 > read(3, "# Locale name alias data base.\n#"..., 4096) = 2512 > read(3, "", 4096) = 0 > close(3) = 0 > munmap(0x7fd281c66000, 4096) = 0 > open("/usr/lib/locale/en_US.UTF-8/LC_IDENTIFICATION", O_RDONLY) = -1 > ENOENT (No such file or directory) > open("/usr/lib/locale/en_US.utf8/LC_IDENTIFICATION", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=373, ...}) = 0 > mmap(NULL, 373, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd281c66000 > close(3) = 0 > open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=26050, ...}) = 0 > mmap(NULL, 26050, PROT_READ, MAP_SHARED, 3, 0) = 0x7fd281c5f000 > close(3) = 0 > open("/usr/lib/locale/en_US.UTF-8/LC_MEASUREMENT", O_RDONLY) = -1 ENOENT > (No such file or directory) > open("/usr/lib/locale/en_US.utf8/LC_MEASUREMENT", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=23, ...}) = 0 > mmap(NULL, 23, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd281c5e000 > close(3) = 0 > open("/usr/lib/locale/en_US.UTF-8/LC_TELEPHONE", O_RDONLY) = -1 ENOENT (No > such file or directory) > open("/usr/lib/locale/en_US.utf8/LC_TELEPHONE", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=59, ...}) = 0 > mmap(NULL, 59, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd281c5d000 > close(3) = 0 > open("/usr/lib/locale/en_US.UTF-8/LC_ADDRESS", O_RDONLY) = -1 ENOENT (No > such file or directory) > open("/usr/lib/locale/en_US.utf8/LC_ADDRESS", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=155, ...}) = 0 > mmap(NULL, 155, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd281c5c000 > close(3) = 0 > open("/usr/lib/locale/en_US.UTF-8/LC_NAME", O_RDONLY) = -1 ENOENT (No such > file or directory) > open("/usr/lib/locale/en_US.utf8/LC_NAME", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=77, ...}) = 0 > mmap(NULL, 77, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd281c5b000 > close(3) = 0 > open("/usr/lib/locale/en_US.UTF-8/LC_PAPER", O_RDONLY) = -1 ENOENT (No > such file or directory) > open("/usr/lib/locale/en_US.utf8/LC_PAPER", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=34, ...}) = 0 > mmap(NULL, 34, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd281c5a000 > close(3) = 0 > open("/usr/lib/locale/en_US.UTF-8/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No > such file or directory) > open("/usr/lib/locale/en_US.utf8/LC_MESSAGES", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 > close(3) = 0 > open("/usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY) = > 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=57, ...}) = 0 > mmap(NULL, 57, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd281c59000 > close(3) = 0 > open("/usr/lib/locale/en_US.UTF-8/LC_MONETARY", O_RDONLY) = -1 ENOENT (No > such file or directory) > open("/usr/lib/locale/en_US.utf8/LC_MONETARY", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=286, ...}) = 0 > mmap(NULL, 286, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd281c58000 > close(3) = 0 > open("/usr/lib/locale/en_US.UTF-8/LC_COLLATE", O_RDONLY) = -1 ENOENT (No > such file or directory) > open("/usr/lib/locale/en_US.utf8/LC_COLLATE", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=1163682, ...}) = 0 > mmap(NULL, 1163682, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd281b26000 > close(3) = 0 > open("/usr/lib/locale/en_US.UTF-8/LC_TIME", O_RDONLY) = -1 ENOENT (No such > file or directory) > open("/usr/lib/locale/en_US.utf8/LC_TIME", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=2454, ...}) = 0 > mmap(NULL, 2454, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd281c57000 > close(3) = 0 > open("/usr/lib/locale/en_US.UTF-8/LC_NUMERIC", O_RDONLY) = -1 ENOENT (No > such file or directory) > open("/usr/lib/locale/en_US.utf8/LC_NUMERIC", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=54, ...}) = 0 > mmap(NULL, 54, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd281c56000 > close(3) = 0 > open("/usr/lib/locale/en_US.UTF-8/LC_CTYPE", O_RDONLY) = -1 ENOENT (No > such file or directory) > open("/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFREG|0644, st_size=256324, ...}) = 0 > mmap(NULL, 256324, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd281ae7000 > close(3) = 0 > fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0 > open("/dev/ttyUSB0", O_RDONLY) = 3 > fstat(3, {st_mode=S_IFCHR|0660, st_rdev=makedev(188, 0), ...}) = 0 > fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0 > read(3, ^C <unfinished ...> > > ------------------------------ > *From:* Josef Reisinger <dat...@ao...> > *To:* Josep Delmonte <ly...@ym...> > *Cc:* "gps...@li..." < > gps...@li...>; "rol...@gm..." < > rol...@gm...> > *Sent:* Wednesday, March 28, 2012 12:48 PM > *Subject:* Re: [Gpsbabel-misc] Another miniHomer question, accessing data > > Josep > > if you want to download the tracks only, you may use "-i skytraq" as the > source - miniHomer uses the SkyTraq GPS chip with some additional features; > These features are supported with "-i miniHomer". > > I added these features as the "minihomer" module on top of the existing > track download code from skytraq module. I also set the baud rate to be > fixed 38400 to save initial time vs. autodected. Maybe that does not work > in practice as expected :-( > > So you may try two variants (after stty -F /dev/ttyUSB0 sane clocal > -crtcts) > > gpsbabel -D2 -i skytraq -f /dev/ttyUSB0 ... > gpsbabel -D2 -i minihomer,initbaud=0 -f /dev/ttyUSB0 ... (initbaud=0 means > autodetect, useful if the minihomer is on a different speed from a previous > try) > > If it doesn't work and the "cat" command hangs, try a "strace cat > /dev/ttyUSB0" - I assume it hangs in the call to 'open("/dev/ttyUSB0", > ...)'; > > I hope that helps > > Josef > > On 28.03.2012 18:24, Josep Delmonte wrote: > > Thanks for the quick replies, Roland and Josef! I set baud=38400 and > tried > sudo stty -F /dev/ttyUSB0 sane clocal -crtscts (the option -clocal > caused it to hang). > It looks to be communicating now, except I get the error: "skytraq: Too > many read errors on serial port". I tried to follow a suggestion from the > archives here: > > http://sourceforge.net/mailarchive/forum.php?thread_name=4DD3A008.7020301%40aol.com&forum_name=gpsbabel-misc > However, this still didn't produce any output for me. > > > sudo /usr/sbin/gpsd /dev/ttyUSB0 > > sudo stty -F /dev/ttyUSB0 sane clocal -crtscts > > sudo gpsbabel -D 5 -i miniHomer,baud=38400 -f /dev/ttyUSB0 -o gpx -F > out.gpx > GPSBabel Version: 1.4.3 > options: module/option=value: miniHomer/baud="38400" > options: module/option=value: miniHomer/erase="0" (=default) > options: module/option=value: miniHomer/first-sector="0" (=default) > options: module/option=value: miniHomer/initbaud="38400" (=default) > options: module/option=value: miniHomer/last-sector="-1" (=default) > options: module/option=value: miniHomer/no-output="0" (=default) > options: module/option=value: miniHomer/read-at-once="255" (=default) > gbser_init("/dev/ttyUSB0") > skytraq: Probing SkyTraq Venus at 38400baud... > Sending: a0 '.' > Sending: a1 '.' > Sending: 00 '.' > Sending: 02 '.' > Sending: 02 '.' > Sending: 01 '.' > Sending: 03 '.' > Sending: 0d '.' > Sending: 0a '.' > skytraq: rd_char(): Got error: -1 > skytraq: rd_char(): Got error: -1 > skytraq: rd_char(): Got error: -1 > skytraq: rd_char(): Got error: -1 > skytraq: rd_char(): Got error: -1 > skytraq: Too many read errors on serial port > > ^C > > sudo stty -F /dev/ttyUSB0 115200 sane clocal -crtscts > > sudo cat /dev/ttyUSB0 > ^C > > sudo stty -F /dev/ttyUSB0 57600 sane clocal -crtscts > > sudo cat /dev/ttyUSB0 > ^C > > sudo stty -F /dev/ttyUSB0 38400 sane clocal -crtscts > > sudo cat /dev/ttyUSB0 > ^C > > sudo stty -F /dev/ttyUSB0 9600 sane clocal -crtscts > > sudo cat /dev/ttyUSB0 > ^C > > sudo stty -F /dev/ttyUSB0 19200 sane clocal -crtscts > > sudo cat /dev/ttyUSB0 > ^C > > sudo stty -F /dev/ttyUSB0 230400 sane clocal -crtscts > > sudo cat /dev/ttyUSB0 > ^C > > Additionally, in case there was gpsd interference, I tried: > # killall gpsd > # /usr/sbin/gpsd /dev/ttyUSB0 > # stty -F /dev/ttyUSB0 38400 sane clocal -crtscts > # gpsbabel -D 5 -i miniHomer,baud=38400 -f /dev/ttyUSB0 -o gpx -F out.gpx > ... (same as before) > skytraq: Too many read errors on serial port > > I tried using different usb ports, and can track down another cable if > this seems a potential issue. The miniHomer is brand new, so I wanted to > make sure it was functional in the period I could still return it. > > > ------------------------------ > *From:* Josef Reisinger <dat...@ao...> <dat...@ao...> > *To:* gps...@li...; ly...@ym...; > rol...@gm... > *Sent:* Wednesday, March 28, 2012 2:13 AM > *Subject:* Re: [Gpsbabel-misc] Another miniHomer question, accessing data > > The pl2303 driver on Linux sometimes behaves very "peculiar" ... > > I a client program cannot open /dev/ttyUSB[0-9], I usually issue a 'stty > -F /dev/ttyUSB0 sane clocal -crtscts' which most of the time sorts the > things our for me. Sometimes I even switch between > 'stty -F /dev/ttyUSB0 sane -clocal -crtscts' and 'stty -F /dev/ttyUSB0 > sane clocal -crtscts' (the difference is the '-' before clocal!). > > The might be interference with a running gpsd - or issues with the USB > port and/or cable. Sounds all not very logical, I know, but experience has > shown it helps to look after all these items. > > Hope that helps. > > Roland, you mentioned there are other miniHomer posts - I just returned > from vacation (where I logged ~4 weeks of tracks on the miniHomer with a > 97% fill level) and I did not follow the list. If it does not create too > much effort, could you point me to these entries or sketch what time of > issue where mentioned ? > > Kind regards > > Josef Reisinger > > On 28.03.2012 07:48, Roland Wirth wrote: > > Hi, > > I think you have to use baud=38400, > > baudrate 115200 is a wrong default! > > > > Roland > > > > Am 28.03.2012 02:53, schrieb roidemai: > >> Hi, > >> > >> I saw a couple of other miniHomer posts, but I didn't seem to get as > far as > >> those users. Using gpsbabel 1.4.3, I'm unable to access the gps logs, > and it > >> just hangs whenever I try. Here's some more info and the things I > attempted: > >> > >>> uname -a > >> Linux linux-8nxi.site 2.6.37.6-0.7-desktop #1 SMP PREEMPT 2011-07-21 > >> 02:17:24 +0200 x86_64 x86_64 x86_64 GNU/Linux > >> > >>> dmesg > >> [32651.277608] usb 2-1.1: new full speed USB device using ehci_hcd and > >> address 3 > >> [32651.363135] usb 2-1.1: New USB device found, idVendor=067b, > >> idProduct=2303 > >> [32651.363138] usb 2-1.1: New USB device strings: Mfr=1, Product=2, > >> SerialNumber=0 > >> [32651.363141] usb 2-1.1: Product: USB-Serial Controller D > >> [32651.363143] usb 2-1.1: Manufacturer: Prolific Technology Inc. > >> [32651.530552] usbcore: registered new interface driver usbserial > >> [32651.530565] USB Serial support registered for generic > >> [32651.530597] usbcore: registered new interface driver > usbserial_generic > >> [32651.530599] usbserial: USB Serial Driver core > >> [32651.540700] USB Serial support registered for pl2303 > >> [32651.540734] pl2303 2-1.1:1.0: pl2303 converter detected > >> [32651.542331] usb 2-1.1: pl2303 converter now attached to ttyUSB0 > >> [32651.542351] usbcore: registered new interface driver pl2303 > >> [32651.542353] pl2303: Prolific PL2303 USB to serial adaptor driver > >>> sudo /usr/sbin/gpsd /dev/ttyUSB0 > >>> sudo gpsbabel -D 5 -i miniHomer,erase -f /dev/ttyUSB0 -o gpx -F out.gpx > >> root's password: > >> GPSBabel Version: 1.4.3 > >> options: module/option=value: miniHomer/baud="115200" (=default) > >> options: module/option=value: miniHomer/erase="1" > >> options: module/option=value: miniHomer/first-sector="0" (=default) > >> options: module/option=value: miniHomer/initbaud="38400" (=default) > >> options: module/option=value: miniHomer/last-sector="-1" (=default) > >> options: module/option=value: miniHomer/no-output="0" (=default) > >> options: module/option=value: miniHomer/read-at-once="255" (=default) > >> gbser_init("/dev/ttyUSB0") > >> ^C > >> > >> # rmmod pl2303 usbserial > >> # modprobe pl2303 > >> # stty -F /dev/ttyUSB0 38400 > >> # cat /dev/ttyUSB0 > >> ^C > >> > >> Any ideas as to what is happening or what I'm doing incorrectly? Thanks > in > >> advance. > >> > > > ------------------------------------------------------------------------------ > > This SF email is sponsosred by: > > Try Windows Azure free for 90 days Click Here > > http://p.sf.net/sfu/sfd2d-msazure > > _______________________________________________ > > Gpsbabel-misc mailing list http://www.gpsbabel.org > > Gps...@li... > > To unsubscribe, change list options, or see archives, visit: > > https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc > > > > > > > > > > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev > _______________________________________________ > Gpsbabel-misc mailing list http://www.gpsbabel.org > Gps...@li... > To unsubscribe, change list options, or see archives, visit: > https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc > > |