Welcome, Guest

Author Topic: Unable to connect to tool  (Read 2002 times)

poporacer

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Unable to connect to tool
« on: September 10, 2017, 06:31:50 PM »
I have searched and tried to find a solution to my problem but I just can't get anything to work. I got a new computer (Windows 10) and am trying to get the programmer (AVR-ISP MK2) and software to work. I updated drivers and firmware and about every option I could find and none of them worked. Here is what I tried and the results I got.

1.
Installed the Programmer and it showed up as Atmel-> AVR ISP mkII ->

Driver Provider: Atmel Norway AS
Driver Date: 2/2/2017
Driver version: 42.0.1.0
Digital Signer: Atmel Norway

When I run Atmel Studio, it sees the programmer and when I try to program a device, it will say that the firmware is out of date, that the firmware is version 1.16 and it needs to be updated to version 1.18. When I try to update it, I get an error that the update failed and to reset the power and try again. But that doesn't work.
If I run FLIP, then I get an error that it cannot open the USB device.

2.
So then I updated the drivers to the one from the Olimex web site

It will shows up as a libusb-win32 devices -> AVR ISP mkII -> (Not Atmel USB device, but the driver version and date are correct)

Driver Provider: libusb-win 32
Driver Date: 1/27/16
Driver version: 1.2.6.0
Digital Signer: Atmel Norway

When I run Studio, it sees the Programmer but when I try to program a chip, I get an error

ComponentId:   20100
StatusCode:   131117
ModuleName:   TCF (TCF command: Tool:connect failed.)

Failed to connect: MPLABCOMM_INVALID_HANDLE

If I try to use FLIP with the programmer, I get an error that it is unable to connect to USB.

3.
Then I tried 4.2.1 from the user manual and here are the results:

Connect the device to the USB and with a needle or sharp object press the button on it's back side (the one that the arrow points as "Upgrade"; the LEDs should turn off) which will put the processor in bootloader state – ready for firmware upgrade. **DONE**

Download and install the Atmel Flip software. Check in device manager if the device is recognized as AT90USB162 if it isn't search for proper drivers in Atmel Flip installation folder.

**It was showing up as AVR mkII so I went to the Flip installation folder and there was only one .inf file and it was in the USB folder of FLIP. I tried to install that driver. It gave me an error stating that the folder specified doesn't contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for x64-based systems. So I could not proceed with those instructions

4.
I installed zadig and changed the driver to libusb-win32(v1.2.6.0)
It shows up in Device Manager as libusb-win32 devices -> AVRISP mkII

Driver Provider: libusb-win 32
Driver Date: 8/2/2012
Driver version: 1.2.6.0
Digital Signer: USB\VID_03EB&PID_2014 (libwdi autogenerated)

When I run Atmel Studio, it sees the programmer and when I try to program a device, it will say that the firmware is out of date, that the firmware is version 1.16 and it needs to be updated to version 1.18. When I try to update it, I get an error that the update failed and to reset the power and try again. But that doesn't work.
If I run FLIP, then I get an error that it cannot open the USB device.

5.
The I tried the FAQ from the product page and here are my results:

Connect the programmer to the USB and with a sharp object (needle or pin) press the upgrade pin - it is in a small hole at the back of the board (this will start the bootloader and will turn off the LED, it will also probably show a new unrecognized device in the device manager for which we will install drivers in step 3) **DONE**

Download and install the latest version of "Atmel Flip" software (it can be downloaded from the Atmel's web-site)
**DONE**

Open its install folder and update the software of the unrecognized device (usually under the "Other devices" tab) with the drivers from folder named "usb"; the device should now be recognized as AT90USB162 under "libusb-win32" tab

**I didn't understand these directions. I am not sure what was meant by the install folder. I looked in the FLIP folder and there was no "other devices" folder or tab so I couldn't proceed with these instructions.

I am stumped. How do I get this working? It seems like I tried everything.
« Last Edit: September 13, 2017, 08:02:37 AM by poporacer »

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1817
  • Karma: +46/-2
Re: Unable to connect to tool
« Reply #1 on: September 13, 2017, 04:32:44 PM »
It was ok in your first try, where you got "MPLABCOMM_INVALID_HANDLE"!

If you can get back to that point (with the drivers from our web site suitable for Windows 10)...

Then you can fix it by navigating in the menus of Atmel Studio 7. Go to Tools -> Options -> Tools -> Tool Settings -> Check Firmware -> False. (shown here: https://i.imgur.com/XWjed2c.jpg )

Now try again.
« Last Edit: September 13, 2017, 04:49:24 PM by LubOlimex »
Technical support and documentation manager at Olimex

poporacer

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Unable to connect to tool
« Reply #2 on: September 14, 2017, 02:47:59 AM »
It WORKS! Thanks a million. So it is a problem that the programmer doesn't have the most current firmware? And that there is no way to update the firmware?

I REALLY, REALLY appreciate your help, I have been pulling my hair out trying so many different things!

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1817
  • Karma: +46/-2
Re: Unable to connect to tool
« Reply #3 on: September 14, 2017, 08:52:22 AM »
Glad to help.

The thing is that AVR-ISP-MK2 is not a replica of the original tool AVRISP mkII and it neither copies its software. It is based on the design of LUFA's creator Dean Camera. So the firmware updates pushed by Atmel (Microchip) are not compatible with the tool. The thing is that there is a firmware version check which we have to bypass in order to work with the studio. Each time Atmel (now Microchip) releases an update for the firmware they increment the firmware version number. So the Studio looks for that number stored in the tool and if it is older than the latest one it performs a software update. The thing previously was that if the number was bigger than the number seen studio didn't attempt to update it. Since they pushed updates frequently I set this number to a big value and the tool bypassed this check successfully over a number of firmware updates. It seems they changed it and now you need to set the exact version value expected (or probably the latest firmware version is 0x29+). The variable that takes care for the firmware version in the LUFA is called FIRMWARE_VERSION_xxxx and I've set "FIRMWARE_VERSION_MINOR" to 0x29.
Technical support and documentation manager at Olimex