Really? It worked really well, so lets break it!

P

Polorboy

Guest
So, who was the supper dupper uber smarty pants who decided to replace ttyUSB* with tty[1-some random number]? I used to be able to do:

dmesg | grep ttyUSB*

and get:
.... ttyUSB0 ......


Now I have to run lsub, and get:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 003 Device 016: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 8087:07dc Intel Corp.
Bus 003 Device 004: ID 04f2:b39a Chicony Electronics Co., Ltd


and then, somehow from that useless information be able to devise which tty connection the device I am looking for is mapped to, yet in order to do that I need to now write a program that is going to check each:

ls -l /dev/tty*
crw-rw-rw-. 1 root tty 5, 0 Mar 8 11:32 /dev/tty
crw--w----. 1 root tty 4, 0 Mar 8 08:21 /dev/tty0
crw--w----. 1 root tty 4, 1 Mar 8 08:21 /dev/tty1
crw--w----. 1 root tty 4, 10 Mar 8 08:21 /dev/tty10
crw--w----. 1 root tty 4, 11 Mar 8 08:21 /dev/tty11
crw--w----. 1 root tty 4, 12 Mar 8 08:21 /dev/tty12
crw--w----. 1 root tty 4, 13 Mar 8 08:21 /dev/tty13
crw--w----. 1 root tty 4, 14 Mar 8 08:21 /dev/tty14
crw--w----. 1 root tty 4, 15 Mar 8 08:21 /dev/tty15
crw--w----. 1 root tty 4, 16 Mar 8 08:21 /dev/tty16
crw--w----. 1 root tty 4, 17 Mar 8 08:21 /dev/tty17
crw--w----. 1 root tty 4, 18 Mar 8 08:21 /dev/tty18
crw--w----. 1 root tty 4, 19 Mar 8 08:21 /dev/tty19
crw-------. 1 root root 4, 2 Mar 8 08:22 /dev/tty2
crw--w----. 1 root tty 4, 20 Mar 8 08:21 /dev/tty20
crw--w----. 1 root tty 4, 21 Mar 8 08:21 /dev/tty21
crw--w----. 1 root tty 4, 22 Mar 8 08:21 /dev/tty22
crw--w----. 1 root tty 4, 23 Mar 8 08:21 /dev/tty23
crw--w----. 1 root tty 4, 24 Mar 8 08:21 /dev/tty24
crw--w----. 1 root tty 4, 25 Mar 8 08:21 /dev/tty25
crw--w----. 1 root tty 4, 26 Mar 8 08:21 /dev/tty26
crw--w----. 1 root tty 4, 27 Mar 8 08:21 /dev/tty27
crw--w----. 1 root tty 4, 28 Mar 8 08:21 /dev/tty28
crw--w----. 1 root tty 4, 29 Mar 8 08:21 /dev/tty29
crw-------. 1 root root 4, 3 Mar 8 08:22 /dev/tty3
crw--w----. 1 root tty 4, 30 Mar 8 08:21 /dev/tty30
crw--w----. 1 root tty 4, 31 Mar 8 08:21 /dev/tty31
crw--w----. 1 root tty 4, 32 Mar 8 08:21 /dev/tty32
crw--w----. 1 root tty 4, 33 Mar 8 08:21 /dev/tty33
crw--w----. 1 root tty 4, 34 Mar 8 08:21 /dev/tty34
crw--w----. 1 root tty 4, 35 Mar 8 08:21 /dev/tty35
crw--w----. 1 root tty 4, 36 Mar 8 08:21 /dev/tty36
crw--w----. 1 root tty 4, 37 Mar 8 08:21 /dev/tty37
crw--w----. 1 root tty 4, 38 Mar 8 08:21 /dev/tty38
crw--w----. 1 root tty 4, 39 Mar 8 08:21 /dev/tty39
crw-------. 1 root root 4, 4 Mar 8 08:22 /dev/tty4
crw--w----. 1 root tty 4, 40 Mar 8 08:21 /dev/tty40
crw--w----. 1 root tty 4, 41 Mar 8 08:21 /dev/tty41
crw--w----. 1 root tty 4, 42 Mar 8 08:21 /dev/tty42
crw--w----. 1 root tty 4, 43 Mar 8 08:21 /dev/tty43
crw--w----. 1 root tty 4, 44 Mar 8 08:21 /dev/tty44
crw--w----. 1 root tty 4, 45 Mar 8 08:21 /dev/tty45
crw--w----. 1 root tty 4, 46 Mar 8 08:21 /dev/tty46
crw--w----. 1 root tty 4, 47 Mar 8 08:21 /dev/tty47
crw--w----. 1 root tty 4, 48 Mar 8 08:21 /dev/tty48
crw--w----. 1 root tty 4, 49 Mar 8 08:21 /dev/tty49
crw-------. 1 root root 4, 5 Mar 8 08:22 /dev/tty5
crw--w----. 1 root tty 4, 50 Mar 8 08:21 /dev/tty50
crw--w----. 1 root tty 4, 51 Mar 8 08:21 /dev/tty51
crw--w----. 1 root tty 4, 52 Mar 8 08:21 /dev/tty52
crw--w----. 1 root tty 4, 53 Mar 8 08:21 /dev/tty53
crw--w----. 1 root tty 4, 54 Mar 8 08:21 /dev/tty54
crw--w----. 1 root tty 4, 55 Mar 8 08:21 /dev/tty55
crw--w----. 1 root tty 4, 56 Mar 8 08:21 /dev/tty56
crw--w----. 1 root tty 4, 57 Mar 8 08:21 /dev/tty57
crw--w----. 1 root tty 4, 58 Mar 8 08:21 /dev/tty58
crw--w----. 1 root tty 4, 59 Mar 8 08:21 /dev/tty59
crw-------. 1 root root 4, 6 Mar 8 08:22 /dev/tty6
crw--w----. 1 root tty 4, 60 Mar 8 08:21 /dev/tty60
crw--w----. 1 root tty 4, 61 Mar 8 08:21 /dev/tty61
crw--w----. 1 root tty 4, 62 Mar 8 08:21 /dev/tty62
crw--w----. 1 root tty 4, 63 Mar 8 08:21 /dev/tty63
crw--w----. 1 root tty 4, 7 Mar 8 08:21 /dev/tty7
crw--w----. 1 root tty 4, 8 Mar 8 08:21 /dev/tty8
crw--w----. 1 root tty 4, 9 Mar 8 08:21 /dev/tty9
crw-rw-rw-. 1 root dialout 4, 64 Mar 8 11:50 /dev/ttyS0
crw-rw-rw-. 1 root dialout 4, 65 Mar 8 03:21 /dev/ttyS1
crw-rw-rw-. 1 root dialout 4, 66 Mar 8 03:21 /dev/ttyS2
crw-rw-rw-. 1 root dialout 4, 67 Mar 8 03:21 /dev/ttyS3

Because, in their infinite wisdom, some genious decided to do away with ttyUSB*, now we just have tty followed by some number... because that is sooooooo much easier to understand.... Before it was human readable and made sense, now it is machine readable and makes no sense... congratulations, you have managed to take something that worked and make it overly complex.
 


P

Polorboy

Guest
I am going to add, in Windows, I plug it in, a message pops up, it installs drivers, and lets me know which COM port it was assigned to.. thats it, it works, done, took 2 seconds, Linux, about 30 minutes to an hour to find it and even then it is just a guessing game. To me, that's backwards.
 
A

atanere

Guest
So, who was the supper dupper uber smarty pants who decided to replace ttyUSB* with tty[1-some random number]? I used to be able to do:

dmesg | grep ttyUSB*

and get:
.... ttyUSB0 ......
So, I plugged in my USB-to-serial converter cable and entered:

Code:
dmesg | grep ttyUSB*
And I got:

Code:
[12035.833002] usb 3-2: pl2303 converter now attached to ttyUSB0
Not sure why you are not. What distro are you using? What kind of serial device?
 
P

Polorboy

Guest
So, yesterday nothing worked, today, of course, it worked like it was supposed to. I am using a highly customized distro provided by my employer, but it is a modified RHEL 6.8. So, technically, the "core" mechanics should be the same. This is not the first time though that they "fixed" something in our specific build which actually broke everything else. They also push out updates whenever they feel like it and if it takes down your system.. oh well, your just "sol" until it comes back up. I can't even use Webex in Linux anymore, I have to run a Windows VM just so I can join Webex meetings. And forget about trying to get tech support, they are on the other side of the planet and don't know a computer from a hole in the wall.
 
A

atanere

Guest
Ah, okay. Glad that it isn't a generic Linux or distro issue, but sorry that you have such poor support for your customized version. And being an intermittent problem doesn't help matters either. If you have extra hard drive space, running another distro in a VM (or a live DVD/USB) might help you out when things aren't going right.... unless the whole point is to use a custom application for your serial device.

Welcome to the forums, and maybe we can be more help next time. Good luck!
 


Staff online

Members online


Top