Tomlow
September 29, 2017, 2:21pm
1
I don't have much experience with arduino..
The problem started when I once tried to upload a sketch to my arduino using a programmer and I received an error in the console saying that the verification failed... which appeared sometimes.. but this time it wouldn't upload anything to the board. Now it says that the target didn't answer.
This is the whole error after trying to upload a sketch using the programmer
-I'm using an AVRISP MkII programmer but it only worked with the programmer set to USBasp in Arduino IDE (with the libusb or libusbK driver installed, WinUSB doesn't work)
-The board is a Sanguino ATmega644p but it only worked with Sanguino ATmega644 set in Arduino IDE
When I try to upload a sketch using the serial port, i get "target didn't answer" as well.
When i try to upload the sketch, the green LED blinks once and then the error message appears.
The yellow and the red LEDs are lit all the time for me.
Any ideas?
Did your Windows update, mine just did and that has caused some problems in the past.
Have a look at the issues:
perhaps an old device enumeration has it stuck, (just a guess).
opened 06:23AM - 28 Apr 17 UTC
closed 01:24PM - 20 Apr 18 UTC
windows
I have a custom composite USB device with usbser, winusb, usbstor interfaces.
…
We have a few hundred devices running for three ish years now, with billions of libusb operations. (Thanks folks!) on win7,8,10.
The unit has a feature in which I send a command to the winusb interface to reconfigure it's usb serial#.
The device soft disconnects from the USB bus, changes part of it's descriptor (the serial number), waits 500ms (or 2seconds, doesn't help the issue) and then reconnects.
Under windows 7, and the virus known as windows 8, this works fine.
Under windows 10, I get a duplicate entry of the old device in my libusb_get_device_list structure.
Below is a data dump. I have libusb debugging turned on (hence the first 3 lines)
The first line (VID 046D) is a USB flash drive that was unplugged during a PRIOR power cycle of the box. Where or why libusb is complaining about this device is a mystery to me. At the same time it may likely be a clue to the what is going on.
Using usbdview, all 3 errant devices are not present.
The second 2 lines (VID 2B2A) refer to the winusb and msc interfaces on my composite device, and the parent id of 17AD5DBB is the old parent from the previous enumeration of my device. (with the old serial number). 2B2A is a private USB VID.
Finally, the 0), 1), 2), is a simple crawl of the libusb_get_device_list with libusb_get_devicedescriptor
There should be only one VID 2B2A in this list (as there is on win7/8); there is only 1 device attached to the PC.
If I reboot, there is in fact only 1 device present, and things work. However, rebooting isn't really an option for the actual use case of the product. (but I still get the gripe about the USB flash drive)
libusb: error [init_device] device '\\.\USB#VID_046D&PID_C080&MI_01#6&33F61665&0&0001' is no longer connected!
libusb: error [init_device] device '\\.\USB#VID_2B2A&PID_0156&MI_02#6&17AD5DBB&1&0002' is no longer connected!
libusb: error [init_device] device '\\.\USB#VID_2B2A&PID_0156&MI_03#6&17AD5DBB&1&0003' is no longer connected!
0) VID 1B21 PID 1242 CLS 0000 PROT 00
1) VID 1B1C PID 1B15 CLS 0000 PROT 00
2) VID 1B1C PID 1B15 CLS 0000 PROT 00
3) VID 046D PID C080 CLS 0000 PROT 00
4) VID 2B2A PID 0156 CLS 00EF PROT 01
5) VID 2B2A PID 0156 CLS 00EF PROT 01
6) VID 8086 PID A12F CLS 0000 PROT 00
Any suggestions are welcome. I unload libusb as soon as possible after firing off the call that causes the disconnect/modification of the serial number/reconnect. I am confident that I have unloaded the libusb default context, closed libusb, and exited my program before the USB endpoint device performs the soft-disconnect.
The errant behavior happens on 3 different windows 10 Pro boxes. In all cases, the device is connected to the root hub embedded in the Intel chipset. (USB xHCI )
-Steve