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 » avrdude: ser_open(): can't open device "/dev/ttyUSB0

August 03, 2009
by nerd_zone
nerd_zone's Avatar

I'm using a Macbook with up to date software.

I've installed the software as delivered on the CD and worked my way through the manual. Built the initial project without too much difficulty and then tried to program it.

I think the error is coming from the instruction on page 10b (194-919) where it talks about checking /dev for a device like /dev/cu.PL203xxxxx etc. I could not find the /dev directory.

I've changed the permissions on the Nerdkits folder and contents to read/write.

Thanks mike

make -C ../libnerdkits avr-gcc -g -Os -Wall -mmcu=atmega168 -o delay.o -c delay.c avr-gcc -g -Os -Wall -mmcu=atmega168 -o lcd.o -c lcd.c avr-gcc -g -Os -Wall -mmcu=atmega168 -o uart.o -c uart.c avr-gcc -g -Os -Wall -mmcu=atmega168 -Wl,-u,vfprintf -lprintf_flt -Wl,-u,vfscanf -lscanf_flt -lm -o initialload.o initialload.c ../libnerdkits/delay.o ../libnerdkits/lcd.o ../libnerdkits/uart.o avr-objcopy -j .text -O ihex initialload.o initialload.hex avrdude -c avr109 -p m168 -b 115200 -P /dev/ttyUSB0 -U flash:w:initialload.hex:a avrdude: ser_open(): can't open device "/dev/ttyUSB0": No such file or directory make: *** [initialload-upload] Error 1

August 03, 2009
by pedroh96
pedroh96's Avatar

Hi Mike,

Type this in your Terminal:

ls /dev/ | grep 'cu.PL'

Get the name that appears on the screen and replace it in the Makefile of the project you are trying to compile (remove the /dev/ttyUSB0 and put the thing that appears when you typed the command, after typing /dev/, so, you should have something like: /dev/cu.PLXXXXXXXXXXXXXXXXXX).

I guess this will help you.

August 03, 2009
by nerd_zone
nerd_zone's Avatar

Thanks

I tried it and it did not give anything back, either than when I was in the Root or in the Initialload directory.

I cut and paste the command to get it exact!

I would guess that I've missed a step in the install from the CD, perhaps?

Mike

August 03, 2009
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Mike,

Did you install the cable drivers for Mac as instructed on p35 of the NerdKits Guide? Was the USB-Ser converter plugged into your computer when you plugged in the cable. After you plug in the cable, you should be able to type the line Mike gave you and find a line like /dev/cu.PLXXXXXXXXXXX. Send us an email, if it still doesn't work, we will figure out why.

Humberto

September 23, 2011
by nerdgirl
nerdgirl's Avatar

Hello,

In my Windows Vista, I am receiving the error avrdude: ser_open(): can't open device /dev/ttyCOM2: The system cannot find the path. I even tried to run the command prompt at the Administrators level and it still did not work. My "Make" file which I edited in Programmers notepad to /dev/ttyCOM2 I'm not sure if that's correct. Could someone shed some light on this for me? Thanks

September 23, 2011
by Ralphxyz
Ralphxyz's Avatar

Hi nerdgirl, try /dev/COM2 without the tty.

Ralph

September 23, 2011
by nerdgirl
nerdgirl's Avatar

Hey Ralphxyz,

Thank you very much. However, I am still getting the same error. According to my Windows Vista machine, it states that the device is working properly. This is what I've done so far. I have the "switch" in the "UP" position, and the power source plugged in. My hardware (breadboard) is working properly also. I've run the command prompt in the Administrators mode, and it still gives me the avrdude error: ser_open(): can't open device "/dev/COM2: The system cannot find the path specified.

I would sure appreciate it if you could help me get past this point. Smiles. Thanks

September 23, 2011
by TomMcGinnis47
TomMcGinnis47's Avatar

Close, try removing "/dev/" so that the only thing remaining is your "COM2".

September 23, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi NerdGirl,

We have had a few emails back and forth about this same issue, but I think it would be best to continue the conversation here, so that others can learn from debugging (and others can help you too). On Windows you need to remove the entire '/dev/ttyUSB0' and replace it with just 'COM2' or COMX where X is the number that windows assigned to your port.

I am still a little concerned that your COM port keeps jumping around so much. In earlier communications you had it on port 15, I would still like to see a screencap of your Device Manager so I can double check everything in there looks good.

Humberto

September 23, 2011
by nerdgirl
nerdgirl's Avatar

Hi Humberto,

Nice to meet you. I've assigned the Prolific cable to COM2 because I read somewhere that the cable itself shouldn't be assigned anything higher than COM5. So now my device manager states that the Prolific cable is working properly on COM2. I also edited the "Makefile" in Programmers notepad accessing it through WinAVR-20090313. Do I really need to send you a screen shot of device manager?

September 23, 2011
by nerdgirl
nerdgirl's Avatar

Hi Tom,

Thank you for your input. I tried using just the COM2 however, it is still giving me an upload error 1. If you have any other suggestions, I'd certainly appreciate it.

September 23, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi nerdgirl,

You certainly don't have to send me any screen shots, but it would be helpful just in case I can spot something that you might have missed.

"Upload error 1" is not very descriptive of the problem. Could you copy paste the full error message that you get when you use only COM2.

Humberto

September 24, 2011
by nerdgirl
nerdgirl's Avatar

Hi Humberto,

I sent a screen shot of the DOS error message when trying to use the "make" command. Let me know if you've had the chance to review it. It's still not connecting to programmer. :-(

September 24, 2011
by Ralphxyz
Ralphxyz's Avatar

nerdgirl, you should post the screen shot here so we all can have a look.

Ralph

September 25, 2011
by nerdgirl
nerdgirl's Avatar

Hi Ralph,

I'll have to read up on learning how to post a screen shot. May take a few days. But thanks for mentioning it.

September 25, 2011
by Ralphxyz
Ralphxyz's Avatar

Nerdgirl just read the instructions!

Supported Markup

Images: will include that image in your post. See our How To on embedding images in a post.

Just "look" at the bottom of this screen to learn how to post images!

Ralph

September 27, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Nerdgirl,

I received a screenshot from you showing one of the errors you are getting. It is a bit cryptic, but it does give me some information. I saw that you are getting some form of "Huh? Go" in you error, albeit a bit jumbled. This tells me that your chip is not in programming mode (at least it wasn't that time). If you can post up some good close up pictures of your setup here, as well as that screenshot of your device manager. It will help us get you up and running.

I noticed you created some other threads on the forms for this issue, if you keep all your questions on this thread it will much much easier for all of us to help you.

Humberto

December 07, 2011
by Affarram
Affarram's Avatar

Hello,

I am having the same problem as Nerd_Zone. I am running up to date software on a Macbook. I installed all the drivers that were on the download page. When I check the /dev folder there is nothing resembling cu.PL203xxxxx. I opened up Console to see what is happening when I plug in the USB wire and this message appears instantly:

"12/7/11 11:18:19.000 PM kernel: 0 0 AppleUSBCDC: start - initDevice failed"

So I am assuming for some reason my computer is not recognizing the device that is connected. Any suggestions?

Thank you, Sean.

December 07, 2011
by Affarram
Affarram's Avatar

For anyone else that is having the same problem as I was, google PL2303 USB-serial drivers and download up to date drivers. The ones on the download page were not up to date and thats why my make book was un able to communicate with the chip.

Post a Reply

Please log in to post a reply.

Did you know that a NerdKit can be used to build an iPhone-controlled R/C car? Learn more...