psun03
Posts: 24
Joined: Sat Feb 09, 2013 5:53 pm

TTYUSB0 - directory not found

Tue Jun 25, 2013 3:19 am

when it comes to linux, i have no real clue on how it all works... i am making a home automation with heyu and a some x10 stuff. I have a CM17A connected to a usb serial adapter to my rasp pi. I need to access the dev/ttyUSB0 directory (?). When I try to check for the ttyUSB0 by typing in
'ls - l /dev/ttyUSB0'

I get cannot access director: No directory exists.

I am not sure how to solve this problem or even know why it doesn't work. I am using a clean install of the lastest wheezy - rasbian.

Anyone can help me in the right direction?

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5104
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: TTYUSB0 - directory not found

Tue Jun 25, 2013 8:09 am

It's been some time since I tried out a USB-serial adapter (FWIW some notes are at http://www.cpmspectrepi.webspace.virgin ... apter.html) and, for me, it "just worked", "hardware-wise", IIRC the main issue I had was finding & installing "GtkTerm" to test it (others have used "minicom"). Since you don't seem to have the "/dev...." entry I suspect you may have an "unrecognised" adapter or it's not "installing" properly.
Can you tell us the make/model etc. (and/or provide a web-link). What does "lsusb" report?
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, A+ and a B2) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: TTYUSB0 - directory not found

Tue Jun 25, 2013 11:35 am

You can't use ls on /dev/ttyUSB0 even if it is there, because it isn't a directory - its a device which masquerades as a file.

you could 'ls' the /dev folder which should show the /dev/ttyUSB0 device if it is present.

I'd install and use minicom to access the device.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

User avatar
rpdom
Posts: 15353
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: TTYUSB0 - directory not found

Tue Jun 25, 2013 11:56 am

pluggy wrote:You can't use ls on /dev/ttyUSB0 even if it is there, because it isn't a directory - its a device which masquerades as a file.
Of course you can. It'll just display the name of the file.

Code: Select all

pi@raspi:~$ ls /dev/ttyUSB0 
/dev/ttyUSB0
pi@raspi:~$

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: TTYUSB0 - directory not found

Tue Jun 25, 2013 12:02 pm

OK, I had a typo when I tried it on my Pi with an old Arduino connected. :mrgreen:

It will only be there if you have certain types of serial adaptors. My newer Arduinos show as /dev/ttyACMx
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: TTYUSB0 - directory not found

Tue Jun 25, 2013 12:52 pm

I'd install and use minicom to access the device.
No, you wouldn't. Minicom sucks. Quite seriously, the only time and the only way that minicom can ever qualify as the best solution is when it is the only solution.

I can't believe people keep giving this crappy advice.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

psun03
Posts: 24
Joined: Sat Feb 09, 2013 5:53 pm

Re: TTYUSB0 - directory not found

Tue Jun 25, 2013 1:21 pm

Ok now I get what TTYUSB0 is...
could it be a bad usb cable?

psun03
Posts: 24
Joined: Sat Feb 09, 2013 5:53 pm

Re: TTYUSB0 - directory not found

Tue Jun 25, 2013 1:26 pm

bad usb cable :/ thanks all

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: TTYUSB0 - directory not found

Tue Jun 25, 2013 1:39 pm

Joe Schmoe wrote:
I'd install and use minicom to access the device.
No, you wouldn't. Minicom sucks. Quite seriously, the only time and the only way that minicom can ever qualify as the best solution is when it is the only solution.

I can't believe people keep giving this crappy advice.
Its what I'm currently using since my preferred 'tail' ing the device in bash wouldn't play.

What would you use ?
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

Return to “Troubleshooting”