Frequent 'broken pipe' errors while uploading sketches

Hi, guys!

Don’t know how about you, but my experience with programming Midiboy through USBasp is quite poor rn. The sketch upload works quite rarely, like 70% of all my attempts it just fails with errors like

avrdude: Warning: cannot open USB device: Function not implemented
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='' product='USBasp'


avrdude: error: usbasp_transmit: Broken pipe
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 0 
avrdude: initialization failed, rc=-1


avrdude: Warning: cannot query manufacturer for device: Broken pipe
avrdude: Warning: cannot query product for device: Broken pipe
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='' product='USBasp'

These are the common errors I get once I try to upload my sketch to Midiboy. The upload might work if I plug it in and out for a bunch of times but it gets really annoying. The USBasp drivers seem to be ok (installed with zadig) so I’m out of ideas of what the problem really is.

Is there something I forgot to configure? Do you also guys deal with such behavior?
Any help or clue would be highly appreciated!

Hi, it looks like as if the connection via USB gets interrupted. Are all the solder joints fine on the board?

Try holding down the B button for the entire duration of firmware flashing, make a couple of attempts, just to see if the same errors still occur.

The joints seem to be in order. I also tried to flash firmware with the B button being held as you suggested - still no luck.

As far as I can see there’s some stuff going on with libusbK driver.
Here’s some info from the EventViewer

Device USB\VID_16C0&PID_05DC\5&30e2396f&0&4 was not migrated due to partial or ambiguous match.
Last Device Instance Id: USB\VID_046D&PID_C05B\5&30e2396f&0&4
Class Guid: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Location Path: PCIROOT(0)#PCI(1400)#USBROOT(0)#USB(4)
Migration Rank: 0xF000FFFFFFFF0023
Present: false
Status: 0xC0000719


Device USB\VID_16C0&PID_05DC\5&30e2396f&0&4 had a problem starting.
Driver Name: oem110.inf
Class Guid: {ecfb0cfd-74c4-4f52-bbf7-343461cd72ac}
Service: libusbK
Lower Filters: 
Upper Filters: 
Problem: 0xA
Problem Status: 0xC0000001

These errors may get reported due to communication issues, it may not be the fault of the driver itself.

Could you try flashing it with another computer and cable? Just to rule out 2 variables here. :slight_smile:

Hey, Giedrius,

Finally got me a new cable and had no issues since then! Can’t believe I didn’t figure this out earlier :slight_smile:

Thanks for your help!

1 Like

Good to hear it’s working well now. :slight_smile:

1 Like