bugAVR Downloader/UploaDEr - Bugs: bug #48767, ser_drain() for TCP on Windows...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #48767: ser_drain() for TCP on Windows doesn't work

Submitter:  None
Submitted:  Fri 12 Aug 2016 08:10:44 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name:  fibroin
Originator Email:  -email is unavailable- Open/Closed:  Open
Release:  None Programmer hardware: 
Device type: 

Jump to the original submission

Wed 26 Apr 2017 09:03:04 PM UTC, comment #6: 

Adriano, thanks for testing my patch!  I'm glad to hear that it is working well for you. 

It is odd that you had problems using the "avrdude-build-script" project, as I used the same to build and test my patch.  When I made the patch, I didn't find any other patches that affected the same file so its not like there should be a conflict.  Maybe another patch was added since I did my work that is affecting you.  I'm not sure.

-- Chris

Christopher Cooper <ccooper21>
Sat 22 Apr 2017 11:03:28 PM UTC, comment #5: 

Sorry, the problem was arduino patch. I suggest to you, please don't add arduino patch when you compile the avrdude, I based my project on: https://github.com/arduino/avrdude-build-script
and these project add arduino patch, and these not works !!!


Your fix is perfect !!!

thank you so much

Adriano Costanzo <vashcode>
Sat 22 Apr 2017 10:38:46 PM UTC, comment #4: 

Hi ccooper21, I tried your patch but it's not working.

The avrdude is blocked, and this is the log:

avrdude: Version 6.3, compiled on Apr 22 2017 at 23:54:11
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\vasht\Desktop\arduino-1.8.2\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : net:192.168.1.109:328
         Using Programmer              : arduino
An error occurred while uploading the sketch




I use Windows 10; the same avrdude works on Linux but in Windows I have the same problem that it discussed on this issue and if I use your patch you can see above the problem.

Adriano Costanzo <vashcode>
Thu 13 Apr 2017 11:37:36 PM UTC, comment #3: 

UPDATED LINKS:  See patch #9304 for a solution.  I've also committed the patch to my GitHub repository.

Christopher Cooper <ccooper21>
Thu 30 Mar 2017 01:34:23 AM UTC, comment #2: 

See patch #9304 for a solution.  I've also committed the patch to my GitHub repository.

Christopher Cooper <ccooper21>
Sat 24 Sep 2016 02:16:41 AM UTC, comment #1: 

There is an avrdude issue that is a possible bug on socket send/receive methods for win32.


I have run avrdude on verbose mode and I realize that after the first pack of bytes that have been sent "0x30 0x20" the avrdude does not wait for an answer (the bytes came after due to some OS delay). Basically, the income stream gets filled with 0x14 0x10 0x14 0x10 that will be used for the next commands (that of course cause the programming to fail). Do you have an idea how simply solve it ? I'm using the last version 3.6.

avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: ser_drain(): read error: The parameter is incorrect.

avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: ser_drain(): read error: The parameter is incorrect.

avrdude.exe: Send: 0 [30]   [20]
avrdude.exe: Recv: . [14]
avrdude.exe: Recv: . [10]

André Pedro <apedro>
Fri 12 Aug 2016 08:10:44 PM UTC, original submission:  

I have an Arduino Micro with Optiboot-Bootloader and I can upload sketches with AVRDude over TCP on Linux.

I tried to use AVRDude 6.3 on Windows but AVRDude does not correctly drain the read buffer and so AVRDude gets confused.

In ser_win32.c there is a special version of ser_recv() for TCP-connections, but ser_drain() uses the version for serial connections. But it doesn't work.

I get the output as attached.
The read buffer isn't drained so avrdude recives the incoming data from the initial getsync later.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #38191:  avrdude fehler.txt added by None (3KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by vashcode (Posted a comment)
  • -email is unavailable- added by ccooper21 (Posted a comment)
  • -email is unavailable- added by apedro (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-12 None Attached File- Added avrdude fehler.txt, #38191

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code