SOLUTION: Macs with USB 3 and USBtinyISP

by bitteroz on Tue Jul 17, 2012 6:16 am

On my MacBook Air (mid 2012) which features USB 3 ports I have had some significant issues with the USBtinyISP and avrdude. I received consistent error messages as below:

Code: Select all | TOGGLE FULL SIZE
$ avrdude -c usbtiny -p t85

avrdude: error: usbtiny_transmit: usb_control_msg(DeviceRequestTO): unknown error
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


The solution to this was to place a USB 2 hub between my Mac and the USBtinyISP - everything started working again.

I hope this helps someone.
bitteroz
 
Posts: 2
Joined: Tue Jul 17, 2012 6:12 am

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by adafruit_support_rick on Tue Jul 17, 2012 6:58 am

Thanks for the tip! I would not have expected that. I wonder how many other USB gizmos are going to have problems?
User avatar
adafruit_support_rick
 
Posts: 10821
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by adafruit_support_rick on Wed Jul 18, 2012 8:53 am

Here's an interesting article on the subject of newer USB hardware and cables. I'd be interested in knowing if your USBtiny works directly with the Air using a different cable?
User avatar
adafruit_support_rick
 
Posts: 10821
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by bitteroz on Sat Jul 21, 2012 2:03 am

I have tried two cables with exactly the same results. The hub fixes it every time.
bitteroz
 
Posts: 2
Joined: Tue Jul 17, 2012 6:12 am

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by richms on Sun Jul 22, 2012 1:51 am

I have had huge issues with other USB2 and 1 items on the front USB 3 ports on my computer that connect to the large connector on the motherboard. Finally relented and got a USB2 combo card reader and port thing to put in that connects to a smaller USB2 motherboard header. Same things work fine.

Not sure if its because the mobo's USB3 isnt native to the chipset or because USB3 is problematic, but in any case I didnt think to try a hub at the time.
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 2:05 am
Location: New Zealand

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by adafruit_support_rick on Sun Jul 22, 2012 9:09 am

For future reference, what sort of computer, OS, and USB2 gizmo are you using? Also, what sort of USB devices have you had trouble connecting? Any arduino or adafruit stuff?
User avatar
adafruit_support_rick
 
Posts: 10821
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by richms on Thu Jul 26, 2012 5:49 am

In my case it was a couple of cheap usb2 to sata docks without a card reader (the red ones) and some dirt cheap nokia data cables with prolific fakes in them. I tried an unpowered hub and the sata docks worked. Not too fussed about the data cables
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 2:05 am
Location: New Zealand

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by JesterVineo on Mon Sep 17, 2012 6:43 pm

I am having this same problem, but haven't been able to resolve it.

I have a new (two month old) Macbook Pro.

I have a new USBtinyISP.

I have tried programming an AVR I wired up on a breadboard as well as an Arduino Nano v3. Neither can be programmed.

I have tried four different USB cables as well as a (very old) USB hub. All had the same results.

Here is the verbose output from avrdude:

Code: Select all | TOGGLE FULL SIZE
Steves-MacBook-Pro:avr steve$ avrdude -v -v -v -v -patmega328p -cusbtiny -P usb -Uflash:w:firefly.hex:i

avrdude: Version 5.11.1, compiled on Feb 16 2012 at 22:11:20
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/usr/local/CrossPack-AVR-20120217/etc/avrdude.conf"
         User configuration file is "/Users/steve/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 003:004-1781-0c9f-ff-00
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : USBtiny
         Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec

avrdude: error: usbtiny_transmit: usb_control_msg(DeviceRequestTO): unknown error
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Steves-MacBook-Pro:avr steve$


Anybody have any suggestions? Am I doing something wrong? It seems like others have gotten it to work with different cables or a hub, but that hasn't been my experience. Is there something specific I should be looking for in a cable or hub?
JesterVineo
 
Posts: 6
Joined: Mon Sep 17, 2012 6:36 pm

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by adafruit_support_rick on Mon Sep 17, 2012 8:09 pm

Post some pictures of both sides of the USBTiny circuit board. We'll have a look..
User avatar
adafruit_support_rick
 
Posts: 10821
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by JesterVineo on Mon Sep 17, 2012 11:19 pm

Here are my pictures...

IMG_1026.JPG
Top Side
IMG_1026.JPG (449.68 KiB) Viewed 3572 times


IMG_1027.JPG
Bottom Side
IMG_1027.JPG (436.73 KiB) Viewed 3572 times


Thanks for looking.
JesterVineo
 
Posts: 6
Joined: Mon Sep 17, 2012 6:36 pm

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by adafruit_support_bill on Tue Sep 18, 2012 6:07 am

The build looks good. Make sure you are not using a USB-3.0 port.
User avatar
adafruit_support_bill
 
Posts: 28061
Joined: Sat Feb 07, 2009 9:11 am

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by JesterVineo on Tue Sep 18, 2012 6:20 am

I am using a USB 3 port, but that's all I've got on this computer. I tried several different cables and a very old USB hub -- no luck.

Are you saying it won't work at all with a USB 3 port? Or is there a special type of cable or hub that I need to use?
JesterVineo
 
Posts: 6
Joined: Mon Sep 17, 2012 6:36 pm

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by adafruit_support_bill on Tue Sep 18, 2012 6:45 am

We have seen problems using Arduinos and USBTinyISPs on some USB 3 ports.

Connecting via a USB2.0 or older hub usually takes care of it. If that still doesn't work, the problem is likely elsewhere.
User avatar
adafruit_support_bill
 
Posts: 28061
Joined: Sat Feb 07, 2009 9:11 am

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by adafruit_support_rick on Tue Sep 18, 2012 9:59 am

Well, it's a long-shot, but I have seen some odd things with Mac and the USBTiny. Disconnect the tiny and reboot the Mac. Then, attach the tiny through your old hub - don't attach the tiny directly the computer.
User avatar
adafruit_support_rick
 
Posts: 10821
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: SOLUTION: Macs with USB 3 and USBtinyISP

by JesterVineo on Wed Sep 19, 2012 1:10 pm

Tried the hub again on my mac -- no luck.

I tried it on a Linux laptop with USB 2 ports -- no luck, but different error messages.

Code: Select all | TOGGLE FULL SIZE
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
CMD: [ac 53 00 00] [00 00 00 00]
CMD: [ac 53 00 00] [00 00 00 00]
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.


I'm really scratching my head on this one. I'm pretty sure I plugged the 6-pin cable in backwards once. Could that have fried something? It seems like the programmer is being detected via USB, and power is definitely getting to the board through the 6-pin connector. I can power my Arduino Nano from the 6-pin cable just fine, but can't program it.

I think I'll have a chance to look at the signals on a scope this weekend. Maybe that will turn up something.
JesterVineo
 
Posts: 6
Joined: Mon Sep 17, 2012 6:36 pm