Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: BD3161 on Nov 09, 2015, 09:49 am

Title: avrdude ser_drain: read error. handle is invalid
Post by: BD3161 on Nov 09, 2015, 09:49 am
hello, I am running windows ten with a mega 2560, just purchased in China.   2560 registers in com port 6.  It won't let me upload any sketches including blink and Marlin.  Have no idea what the problem is.  I contacted the seller and assured me it was the standard board(no Chinese chipset). any help would be appreciated
Title: Re: avrdude ser_drain: read error. handle is invalid
Post by: DrAzzy on Nov 09, 2015, 05:08 pm
What serial adapter do they use? Check the chip close to the USB connector - it'll be an atmega 16u2 (or 8u2), or a CH340G or FTDI FT232.

That sounds like driver problems.
Title: Re: avrdude ser_drain: read error. handle is invalid
Post by: prasanthkumar31 on Feb 20, 2016, 02:29 pm
 ..while doing project,repeately this error appear..i dono how to proceed fruther.


.avrdude :ser_drain():read error:The handle is invalid


help me
Title: Re: avrdude ser_drain: read error. handle is invalid
Post by: MikeLittle on Feb 21, 2016, 04:48 pm
I got the same message.

Won't upload Blink for a simple test
Title: Re: avrdude ser_drain: read error. handle is invalid
Post by: MikeLittle on Feb 21, 2016, 05:11 pm
I am running 1.6.7 on Win7.

Just bought Mega from SparkFun
when uploading, don't see LEDs flash

Here's the listing when it uploads.

WARNING: Category '' in library EEPROM is not valid. Setting to 'Uncategorized'
WARNING: Category '' in library SPI is not valid. Setting to 'Uncategorized'
WARNING: Category '' in library SoftwareSerial is not valid. Setting to 'Uncategorized'
WARNING: Category '' in library Wire is not valid. Setting to 'Uncategorized'
Warning: platform.txt from core 'Arduino AVR Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.

Sketch uses 1,560 bytes (0%) of program storage space. Maximum is 253,952 bytes.
Global variables use 11 bytes (0%) of dynamic memory, leaving 8,181 bytes for local variables. Maximum is 8,192 bytes.
avrdude: ser_open(): can't open device "\\.\COM6": The system cannot find the file specified.


avrdude: ser_drain(): read error: The handle is invalid.


Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

Title: Re: avrdude ser_drain: read error. handle is invalid
Post by: MikeLittle on Feb 21, 2016, 06:56 pm
Just got mine working this morning.

Reinstalled 1.6.5

Found a driver in thread and it seems to work. Hope this helps.

http://forum.arduino.cc/index.php?topic=144470.0


All the strange warnings and error messages are gone.