NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » Ubuntu: /dev/ttyUSB0 No such file or directory

February 19, 2011
by awkwardsaw
awkwardsaw's Avatar

Hey guys, I just recently got NerdKits, and I'm getting this error when compiling code: avrdude: ser_open(): can't open device "/dev/ttyUSB0": No such file or directory

I've also tried /dev/bus/usb/001-7

Sorry if this gets posted a lot, but I couldn't find anything in the search :\

February 20, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi awkwardsaw,

That is pretty strange, it really should come up as /dev/ttyUSB0. It is possible your cable isn't being recognized at all. Have you tried doing an 'ls /dev/' to see if the ttyUSB0 device is there at all? Try plugging in your cable and then run dmesg. There should be a couple of lines at the end that say things about a prolific device being plugged in, see if you are getting any errors there.

Humberto

February 20, 2011
by awkwardsaw
awkwardsaw's Avatar

thanks for the reply :)

Before I posted the thread, I did indeed check if ttyUSB0 was there, and it wasn't(also according to dmesg) although now that I tried it again, the usb did connect, and recognized.

But now I'm getting this error: avrdude: avr910_recv(): programmer is not responding make: *** [initialload-upload] Error 1

Along with my LCD having black lines on the first and third row. Perhaps the data got erased when I tried to compile it before, and it messed up?

I have the switch set up on MCU pin 14, with the middle connected to ground, and there is power going to the regulator, and MCU

I would post a picture of the board, but I don't have access to a camera

February 20, 2011
by awkwardsaw
awkwardsaw's Avatar

alright, I messed up on the red wire for the USB cord. it now gives me this error:

daniel@daniel-NV53:~/Downloads/NerdKits/Code/initialload$ make
avrdude -c avr910 -p m168 -b 115200 -P /dev/ttyUSB0 -U flash:w:initialload.hex:a

Found programmer: Id = ""; type = 
    Software Version = .; Hardware Version = .

Programmer supports the following devices:

avrdude: error: selected device is not supported by programmer: m168
make: *** [initialload-upload] Error 1
February 20, 2011
by awkwardsaw
awkwardsaw's Avatar

can't edit; what I mean is, before I put the red wire on the +5v rail, where now it's on an empty node

February 21, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi awkwardsaw,

It is possible you damaged your cable, but it is unlikely. The more likely explanation is that your chip is not in programming mode, or there is a loose wire somewhere. If you include a picture of your setup we might be able to spot something.

Humberto

February 22, 2011
by bpenglase
bpenglase's Avatar

Do you see the device in lsusb, or see the system detecting it when you plug it in with dmesg? both are commands for the terminal, if you weren't aware of them.

February 26, 2011
by awkwardsaw
awkwardsaw's Avatar

Sorry for the bad quality, but best I can do.

I still get the same error has above.

also, just pretend I have to battery plugged in. The red in node 28, black is in ground

top nodes

bottom nodes

February 27, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi awkwardsaw,

I don't see the LCD on your setup, without it is tough for you to know if you are in programming mode or in run mode, or if your chip is on at all. The error message you are getting is pretty generic and can be caused by any number of things. If you plugged the red wire into the wrong place there is some chance you damaged the chip, or the cable. I'd say set the LCD back up again to see if you get the chip to come on. If it does then the problem is probably the cable.

Humberto

September 21, 2011
by saholman
saholman's Avatar

Im having the exact problem. I have two black lines and every time i type "Make" all i get is "No such file or directory." I don't know if the chip can't be programmed or what. BTW i never plugged the cable into the wrong node.

September 21, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi saholman,

"No such file or directory" means that you have not quite navigated to the right place on the command line (this is not the same problem discussed in this thread). You are not in the same folder where your Makefile is. Take a read through this Library tutorial about the command line, I think it will get you going in the right direction.

Humberto

September 21, 2011
by saholman
saholman's Avatar

It won't let me! I can get to the code folder but when I type cd initialload it says "The system cannot find the path specified.". The folder is in the code folder though. I have gone through the entire programming steps on a mac and windows computers multiple times and nothing has actually been able to program the MCU.

September 22, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi saholman,

Well there is probably some little detail you are overlooking, or something just isn't in the right place. I'm sure we will find the issue though its just a matter of slowly debugging things until we find the cause. Right now, the fact that you can't cd into your initialload folder is definitely a problem. Can you cd your way into your Code folder, then list all the files (dir on windows, ls on mac/linux). Then try to cd into initialload. Then take a screenshot of the error for me. This will help me (and other helpful folks on our forums) figure out what is going on so we can help you.

Humberto

September 22, 2011
by saholman
saholman's Avatar

I got it working. It was a problem with the "Code" folder itself. I found the code folder stored elsewhere and it worked fine. Btw no I couldn't bring up the dr of the code folder I just got an error. I could cd to the code folder though. Thanks for the help and glad I got it working. Still no idea what was wrong but that's ok.

Post a Reply

Please log in to post a reply.

Did you know that NerdKits also has extra parts available for its customers? Learn more...