cloudy cloudy

Author Topic: Ports / tty / USB in Linux Mint  (Read 1621 times)

0 Members and 1 Guest are viewing this topic.

Offline cavman35

  • Posts: 22
  • OS/Browser:
  • (Linux Mint)
  • Firefox 61.0
Ports / tty / USB in Linux Mint
« on: September 11, 2018, 12:12:10 AM »
 I have used my Lacrosse 2310 for years on Windows XP. It's running in a stand alone desktop. I want to run your Weatherdisplay but each try and I get various file errors and it is in SP 3 and fully updated. Now I have two more desktops that both have 3 hard drives that are SATA selectable with Win XP , Win 7 and Linux Mint 18.3. I got burnt by the POS Windows 10 not working at all on both of those computers but worked on the other OS so I have a laptop that gets condemned to the SCOD Spinning Circle of Death doing updates.
 So that  is the background. I decided just to switch the Win XP standalone to Linux Mint but testing first on my other desktops. I downloaded the windows version on both to test and they work. I also connected a Prolific rs 232 to USB to make it easier to work with, Once the "only" right driver is installed in windows 7 and updates to it are blocked it works great. Both computers gave me USB port 6 via SYSTEM Device manager.  It uploaded all data packets  info the program perfectly so I know all hardware functions properly. Now rebooting into my SATA drive that has Linux Mint 18.3 and I installed the latest 64 bit 10.37 build 296 and after a few hits and fat finger misses it is installed and up and running but I find my prolific rs 232 to USB unit
[email protected] ~ $ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 My trouble is your configuration default to a TTY port and not a com port but it was a com port in windows and your configuration screen in windows takes that. In testing and watching the terminal window I can see errors but no data recorded by the Weather Display as I tried to call it a USB port. I've tried hunting for finding out in Linux how to determine it but every explanation goes off in a wild ass direction which makes me just go WTF. Is it a USB port , TTY port or something else and how you determine that?

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 28,246
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
  • OS/Browser:
  • (Linux Mint)
  • Chrome 49.0.2623.108
Re: Ports / tty / USB in Linux Mint
« Reply #1 on: September 11, 2018, 12:31:19 AM »
"dmesg | grep tty" is the command you want. This is from a Mint PC with two hardware serial ports and two USB/Serial adaptors:


Code: [Select]
[email protected] ~ $ dmesg | grep tty
[    0.000000] console [tty0] enabled
[    2.032937] 00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    2.053739] 00:07: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[   22.516272] usb 3-1: cp210x converter now attached to ttyUSB0
[1577866.668566] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB1

[email protected] ~ $

Offline cavman35

  • Posts: 22
  • OS/Browser:
  • (Linux Mint)
  • Firefox 61.0
Re: Ports / tty / USB in Linux Mint
« Reply #2 on: September 14, 2018, 11:51:17 PM »
 I tried the command and using lsusb and that command I get the following.
[email protected] ~ $ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 04a9:177e Canon, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[email protected] ~ $ dmesg | grep tty
[    0.000000] console [tty0] enabled
[    0.861333] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.933203] tty tty26: hash matches
[  166.561944] usb 6-2: pl2303 converter now attached to ttyUSB0
[email protected] ~ $
 My trouble is I have tried inputting the info with zero luck. I keep getting

ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
ser_read error Bad file descriptor
 Is there a format that is different than /dev/tty/ttyUSB0

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 28,246
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 69.0.3497.92
Re: Ports / tty / USB in Linux Mint
« Reply #3 on: September 15, 2018, 12:00:26 AM »
I don't fully understand your question, are you asking how to enter the port in WD?

(For sure your station is on  ttyUSB0 "pl2303 converter now attached to ttyUSB0")

Offline jloflin

  • Posts: 74
  • El Paso, Texas, USA
  • OS/Browser:
  • (Linux Mint)
  • Firefox 62.0
Re: Ports / tty / USB in Linux Mint
« Reply #4 on: September 15, 2018, 01:56:14 PM »
  Is there a format that is different than /dev/tty/ttyUSB0

If you are using Linux Mint, it should be /dev/ttyUSB0, not dev/tty/ttyUSB0

Randy

Offline cavman35

  • Posts: 22
  • OS/Browser:
  • (Linux Mint)
  • Firefox 62.0
Re: Ports / tty / USB in Linux Mint
« Reply #5 on: September 16, 2018, 02:27:07 AM »
 I messed up on the print out.  Note that this computer has SATA select able hard drives. The Weather-display program works fine in Windows 7 and it shows as Com port 6. The only thing I'm doing different is rebooting with a different SATA hard drive running Linux Mint 18.3. so all hardware functions fine.
[email protected] ~ $ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
don[email protected] ~ $ dmesg | grep tty
[    0.000000] console [tty0] enabled
[    0.866232] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 3395.069734] usb 6-2: pl2303 converter now attached to ttyUSB0
[email protected] ~ $

 Now I run the Linux version and go to Control panel and COMM /IP port and set it to dev/ttyUSB0 and then do OPEN and I get

The serial device dev/ttyUSB0 does not exist or is not s tty

 So is lsusb reporting wrong info. remember in Windows 7 the connector reported as Com port 6 . Note the lsusb shows the Prolific adapter as Bus 6 device 2 wheras I would think that a USB0 would have been on Bus 1 device 1.

Offline jloflin

  • Posts: 74
  • El Paso, Texas, USA
  • OS/Browser:
  • (Linux Mint)
  • Firefox 62.0
Re: Ports / tty / USB in Linux Mint
« Reply #6 on: September 16, 2018, 03:45:47 PM »
How do you start WeatherDisplay in Linux Mint? Are you using "sudo ./weatherdisplay"?

Randy

Offline Weather Display

  • Posts: 87,430
  • Davis VP2
  • New Zealand
  • OS/Browser:
  • Win NT 10.0
  • Chrome 68.0.3440.106
    • Weather Display
Re: Ports / tty / USB in Linux Mint
« Reply #7 on: September 16, 2018, 08:03:03 PM »
what is the weather station type you are wanting to use
?

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 28,246
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 69.0.3497.92
Re: Ports / tty / USB in Linux Mint
« Reply #8 on: September 16, 2018, 08:49:32 PM »
Post says Lacrosse 2310 - is that a non standard serial one?

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 28,246
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 69.0.3497.92
Re: Ports / tty / USB in Linux Mint
« Reply #9 on: September 16, 2018, 11:51:23 PM »
Just remembering the same issue with a Python script and mint/usb. Can you do:

ls -l /dev/ttyUSB0

That should show what group owns ttyUSB0, it's probably the dialout group

crw-rw---T 1 root dialout 188, 0 Feb 12 12:01 /dev/ttyUSB0

and your user needs to be added:

sudo adduser <the user you want to add> dialout
sudo reboot


But if you are running WD as root as Randy asks then the above shouldn't apply.

How do you start WeatherDisplay in Linux Mint? Are you using "sudo ./weatherdisplay"?

Randy

« Last Edit: September 16, 2018, 11:55:59 PM by niko »

Offline cavman35

  • Posts: 22
  • OS/Browser:
  • (Linux Mint)
  • Firefox 62.0
Re: Ports / tty / USB in Linux Mint
« Reply #10 on: September 17, 2018, 01:33:44 AM »
Yes I'm using sudo  ./weatherdisplay  I've tried from USB0 to USB10 and still get the same answer. I'm using a Lacrosse 2310 with the Prolific adapter to convert to USB. As I also noted it is the same computer only using SATA selectable hard drives with different OS. In Win 7 it works fine and it is running on Com Port 6. Rebooting into the Linux Mint 18.3 hard drive and I keep getting the errors with the USB feed not being correct. Researching out on Linux Mint about TTY and USB ports and they state that it is zero based rather than one based so a Com Port one in Windows would be USB0. Going by that info it should be Com port 5 or USB5 but lsusb shows it as USB0. Also is that info case sensitive?

Offline Weather Display

  • Posts: 87,430
  • Davis VP2
  • New Zealand
  • OS/Browser:
  • Win NT 10.0
  • Chrome 68.0.3440.106
    • Weather Display
Re: Ports / tty / USB in Linux Mint
« Reply #11 on: September 17, 2018, 03:02:41 AM »
WD uses the separate program, fetch2300 program,to get data from that station type
where you set the com port in its config file separatly

Offline cavman35

  • Posts: 22
  • OS/Browser:
  • (Linux Mint)
  • Firefox 62.0
Re: Ports / tty / USB in Linux Mint
« Reply #12 on: September 18, 2018, 02:31:57 AM »
My latest test with no luck.
[email protected] ~ $ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[email protected] ~ $ dmesg | grep tty
[    0.000000] console [tty0] enabled
[    0.866147] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[   86.979168] usb 6-2: pl2303 converter now attached to ttyUSB0
[email protected] ~ $ tty
/dev/pts/0
 
 I'm using the newest version of Weatherdisplay which is the 64 bit version. Are we saying that the linux configure port portion of system configuration is ineffective for a 2310 lacrosse weather station with an rs 232 to USB converter since the windows version works fine?  How do I do the fetch 2300 or is that another program that needs to be downloaded.

Offline Weather Display

  • Posts: 87,430
  • Davis VP2
  • New Zealand
  • OS/Browser:
  • Win NT 10.0
  • Chrome 68.0.3440.106
    • Weather Display
Re: Ports / tty / USB in Linux Mint
« Reply #13 on: September 18, 2018, 03:10:01 AM »
the fetch2300 is a 3rd party program that WD linux uses
I am not even sure if there is a 64 bit version (that will be a hurdle)
with the 2310 type station , WD linux uses the fetch2300 program
via the run2300.bat file
which uses the 2300 config file