Anybody know how to take ASCII data in from a USB port using the Linuxcommand line? I have a USB
GPS receiver probably putting out NEMA 0183 ASCII data every one second.
-------------------------------
When I do "dmesg" I get this among other things.
[337219.194564] usb 2-5: USB disconnect, address 10 [353725.772224] usb 8-1: new full speed USB
device using uhci_hcd and address 2 [353725.976107] usb 8-1: configuration #1 chosen from 1 choice
[353726.141383] usbcore: registered new interface driver usbserial [353726.141398] USB Serial
support registered for generic [353726.141423] usbcore: registered new interface driver
usbserial_generic [353726.141425] usbserial: USB Serial Driver core [353726.155861] USB Serial
support registered for DeLorme Earthmate USB [353726.155874] USB Serial support registered for
HID-COM RS232 Adapter [353726.155886] USB Serial support registered for Nokia CA-42 V2 Adapter
[353726.155906] cypress 8-1:1.0: DeLorme Earthmate USB converter detected
[353726.157262] usb 8-1: DeLorme Earthmate USB converter now attached to
ttyUSB0
[353726.157280] usbcore: registered new interface driver cypress [353726.157282] cypress_m8:
v1.09:Cypress USB to Serial Driver [353726.177064] usbcore: registered new interface driver hiddev
[353726.177081] usbcore: registered new interface driver usbhid [353726.177083] usbhid: v2.6:USB
HID core driver
What do I do now?
Paul Lamar
Paul,
Try installing cutecom with your package manager. If you use yum:
yum install cutecom
CuteCom is a graphical serial terminal, like minicom or Hyperterminal on Windows. It is aimed
mainly at hardware developers or other people who need a terminal to talk to their devices.
Mark LaPierre
root@paul-desktop:~# yum install cutecom The program 'yum' is currently not installed. You can
install it by typing:
apt-get install yum
bash: yum: command not found
root@paul-desktop:~#
Then I did.
root@paul-desktop:~# yum install cutecom The program 'yum' is currently not installed. You can
install it by typing:
apt-get install yum
bash: yum: command not found
root@paul-desktop:~#
root@paul-desktop:~#
root@paul-desktop:~#
root@paul-desktop:~#
root@paul-desktop:~# apt-get install cutecom Reading package lists... Done Building dependency
tree Reading state information... Done The following packages were automatically installed and are
no longer
required:
vim-gui-common vim-runtime
Use 'apt-get autoremove' to remove them.
Suggested packages:
lrzsz
The following NEW packages will be installed:
cutecom
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 50.1kB of archives.
After this operation, 184kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
cutecom
Install these packages without verification [y/N]? y Err
http://us.archive.ubuntu.com
jaunty/universe cutecom 0.20.0-1
404 Not Found [IP: 91.189.92.171 80]
Failed to fetch
http://us.archive.ubuntu.com/ubuntu/pool/universe/c/cutecom/cutecom_0.20.0-1_i386.deb
404 Not Found [IP: 91.189.92.171 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
root@paul-desktop:~#
Then this happened.
SNIP<<<<
E: Some index files failed to download, they have been ignored, or old ones used instead.
root@paul-desktop:~#
Paul Lamar
It appears that the package server was off line. Ã?? It failed to find the cutecom package as
well as all the other issues that I SNIPed out.
Try looking for a terminal program using your software installation utility. Ã?? I use Fedora so
my example is based on Fedora with the Gnome desktop. Ã?? Ubuntu uses the same Gnome desktop so
this might be good.
Go to: System|Administration|Add/Remove Software
In the search box provided type in "terminal" without the quotes.
Select the terminal you want to try and then install it from there.
It is possible that your repository files on your desktop are out or date. Ã?? How old is your
current Ubuntu installation? Ã?? Have you run an upgrade froma previous version to the current
version at some time in the past?
Mark LaPierre
I searched high and low for Unbuntu but maybe I need to switch back tored hat.
My current Ubuntu is a couple of years old.
Paul Lamar
Paul,
Since you are using Ubuntu, I would suggest using gtkterm. You should be
able to get it via synaptic package management.
Sent from Henry Nee
I have read the whole thread.... minicom is the standard text based terminal for communications.
It used to be part of the minimal install of fedora back in the modem days. Now you have to add it.
Blake
--
Blake C. Lewis
If I send the GPS to you can you get it to work?
Paul Lamar
What kind of GPS?
Blake C. Lewis
Some kind of USB connected GPS Delorme ships
with their moving map software for windows.
It is a ASCII NEMA 0183 protocol. Once a second.
S-Ident Z Time à uSEC à à Latitude à Longit à à Speed à Hdg D-M-Yr à Checksum
$GPRMC,144051.023550,A,3352.269,N,11823.157,W,0000.4,190,120593,,,*27
$GPGGA,084940.918483,3352.261,N,11823.168,W,1,4,001,,M,-00038,M,,,
$GPGLL,3352.26,N,11823.16,W,084940.918483
$GPRMC,084941.918482,A,3352.261,N,11823.168,W,0000.6,010,130993,,,*2F
$GPRMB,V,,,,,,,,,,,,*30
$GPGGA,084942.918481,3352.261,N,11823.168,W,1,4,001,,M,-00036,M,,,
$GPGLL,3352.26,N,11823.16,W,084942.918481
$GPRMC,084943.918480,A,3352.261,N,11823.167,W,0000.9,355,130993,,,*2D
$GPRMB,V,,,,,,,,,,,,*30
$GPGGA,084944.918478,3352.261,N,11823.166,W,1,4,001,,M,-00034,M,,,
$GPGLL,3352.26,N,11823.16,W,084944.918478
$GPRMC,084945.918477,A,3352.261,N,11823.165,W,0001.1,352,130993,,,*2F
$GPRMB,V,,,,,,,,,,,,*30
$GPGGA,084946.918476,3352.261,N,11823.165,W,1,4,001,,M,-00032,M,,,
$GPGLL,3352.26,N,11823.16,W,084946.918476
$GPRMC,084947.918475,A,3352.261,N,11823.164,W,0000.5,013,130993,,,*2D
$GPRMB,V,,,,,,,,,,,,*30
$GPGGA,084948.918474,3352.261,N,11823.163,W,1,4,001,,M,-00031,M,,,
$GPGLL,3352.26,N,11823.16,W,084948.918474
$GPRMC,084949.918473,A,3352.261,N,11823.163,W,0000.7,008,130993,,,*2A
$GPRMB,V,,,,,,,,,,,,*30
$GPGGA,084950.918472,3352.260,N,11823.163,W,1,4,001,,M,-00029,M,,,
$GPGLL,3352.26,N,11823.16,W,084950.918472
$GPRMC,084951.918471,A,3352.260,N,11823.163,W,0001.0,350,130993,,,*28
$GPRMB,V,,,,,,,,,,,,*30
$GPGGA,084952.918470,3352.259,N,11823.162,W,1,4,001,,M,-00027,M,,,
$GPGLL,3352.25,N,11823.16,W,084952.918470
$GPRMC,084953.918468,A,3352.259,N,11823.162,W,0000.9,358,130993,,,*29
$GPRMB,V,,,,,,,,,,,,*30
$GPGGA,084954.918467,3352.259,N,11823.161,W,1,4,001,,M,-00026,M,,,
$GPGLL,3352.25,N,11823.16,W,084954.918467
This will allow a remote mount of the antenna for a moving map
program in an Android tablet running Honeycomb. XWing for example.
Paul Lamar
Paul,
Try 'tail -f /dev/ttyUSB0'
I will play with mine tonight.
Blake
Wow! Something happened. With the GPS unplugged it comes back with no errors.
With it into the USB connector plugged in it comes back with a blinking cursor at the same one
second rate as the blinking led on the GPS.
paul@paul-desktop:~$ tail -f /dev/ttyUSB0
tail: cannot open `/dev/ttyUSB0' for reading: No such file or directory
tail: no files remaining
paul@paul-desktop:~$ tail -f /dev/ttyUSB0 blinking cursor
You are getting warmer.
Paul Lamar
--
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site.
http://www.rotaryeng.net Youtube key word PaulLamar2 Copyright 1998-2011 All world
wide rights reserved.
Paul,
I am sure your Google Foo is as good as it gets but maybe this will help. I found the following
for serial to USB on Ubuntu assuming that you just want the output and not some application actually
do something with the data.
-------------------------------------------------------------------------
First plug in the USB-Serial Port adaptor to one of your USB port. Wait for a couple of second, then
run dmesg. You should see these message at the end of dmesg output.
usb 1-1: new full speed USB device using uhci_and address 2
usb 1-1: configuration #1 chosen from 1 choice
After that, unplug the device and type lsusb. You will see a list of output similar to this.
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 007: ID 03f0:4f11 Hewlett-Packard
Bus 002 Device 006: ID 05e3:1205 Genesys Logic, Inc. Afilias Optical Mouse H3003
Bus 002 Device 004: ID 15d9:0a33
Plug in the USB-Serial Port converter back, and run lsusb again, and you shall see an additional
line, like this.
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 007: ID 03f0:4f11 Hewlett-Packard
Bus 001 Device 002: ID 4348:5523 --- --- --- (notice the additional line!)
Bus 002 Device 006: ID 05e3:1205 Genesys Logic, Inc. Afilias Optical Mouse H3003
Bus 002 Device 004: ID 15d9:0a33
Now we know the vendor id and the product id of the USB-Serial Port converter, this will enable us
to load the linux kernel module usbserial to activate the device, like this :
sudo modprobe usbserial vendor=0x4348 product=0x5523
Run dmesg again and you shall see lines similar like this :
usbserial_generic 1-1:1.0: generic converter detected
usb 1-1: generic converter now attached to ttyUSB0
usbcore: registered new interface driver usbserial_generic
As you can see, the new serial port device is mapped to /dev/ttyUSB0. Youcan instruct Ubuntu to
load this module automatically by include the line : usbserial vendor=0Ã4348 product=0Ã5523â³
inside /etc/modules file.
Then you may be able to use tail -f /dev/ttyUSB0 to read the output.
--------------------------------------------------------------------------------------------
David
David and all,
Please send everything in plain text in the future. html screws everything up.
Paul Lamar
--
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site.
http://www.rotaryeng.net
Youtube key word PaulLamar2
Copyright 1998-2011 All world wide rights reserved.