Operation not permitted / initialization failed, rc=-1

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
chuckjaxfl
 
Posts: 4
Joined: Mon Jun 25, 2012 12:19 am

Operation not permitted / initialization failed, rc=-1

Post by chuckjaxfl »

I just received and built this kit. After building it, I used it to program blink on an Arduino Nano w/ a 328.

I booted the same machine into Ubuntu, tried to do the same thing, and got the below error.

avrdude: error: usbtiny_transmit: error sending control message: Operation not permitted
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: error: usbtiny_transit: error sending control message: Operation not permitted


The help page says, "It is ALWAYS a bad chip or a wiring, clocking, bit-speed, powering or output-resistor problem", which I am reluctant to accept, as it seems those problems would exist on both systems, not just on Ubuntu. I thought there was nothing required to get it running under linux, but I've got to be overlooking something, obviously.

User avatar
chuckjaxfl
 
Posts: 4
Joined: Mon Jun 25, 2012 12:19 am

Re: Operation not permitted / initialization failed, rc=-1

Post by chuckjaxfl »

FIRST: Are you using a USBtiny from a kit or from DIY? Make sure you mention that in your post
Kit purchased here.

SECOND: What OS and computer are you using?
The issue exists under ubuntu 12.04 LTS.

THIRD: Which programming software are you using, and what chip?
Arduino 1.0.1, programming a Arduino Nano w/ 328.

FOURTH: Did the USBtinyISP ever work (even once) or is it your first time trying to talk to a chip
Yes, it works as expected under Windows XP, using the same machine.

FIFTH: Post screenshots (NOT copy&paste) of what is happening
I'll take screenshots if you feel it's really necessary. The error is what it is, though.

SIXTH: Post clear, in-focus, not-blurry, easy to see photos of the top and bottom of the kit. If the photos are blurry, unfocused, and difficult to see they will only make it harder to debug what is going on
I can take some and post these if you feel it's really necessary, but I don't suspect it's a physical issue with the board.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Operation not permitted / initialization failed, rc=-1

Post by adafruit »

did you follow our instructions about running it as root?

http://ladyada.net/make/usbtinyisp/avrdude.html

User avatar
chuckjaxfl
 
Posts: 4
Joined: Mon Jun 25, 2012 12:19 am

Re: Operation not permitted / initialization failed, rc=-1

Post by chuckjaxfl »

Not until you just told me to, no!

From the terminal window:
chuck@chuck-desktop:~$ sudo avrdude -c usbtiny -p t84
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e930c
avrdude: safemode: Fuses OK
avrdude done. Thank you.
chuck@chuck-desktop:~$


So, it's only in the Arduino IDE that I'm having the difficulty.
I take it this means I need to create rule file for the USB port? I'll try that and report back.
Attachments
terminal.png
terminal.png (31.92 KiB) Viewed 8595 times

User avatar
chuckjaxfl
 
Posts: 4
Joined: Mon Jun 25, 2012 12:19 am

Re: Operation not permitted / initialization failed, rc=-1

Post by chuckjaxfl »

That worked, using the third option, SUBSYSTEM=="usb", ATTR{product}=="USBtiny", ATTR{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE="0666"

I loaded up blink, changed pin 13 to pin 5, and loaded it right from the Arduino IDE to the ATtiny84 via the USBtinyISP. It works great.

I don't yet know how to write in anything other than the Arduino IDE, so I didn't look under the AVRdude and AVRstudio sections. I guess I should have. Mark this one solved.

Dheath
 
Posts: 1
Joined: Thu Sep 06, 2012 7:46 pm

Re: Operation not permitted / initialization failed, rc=-1

Post by Dheath »

adafruit wrote:did you follow our instructions about running it as root?

http://ladyada.net/make/usbtinyisp/avrdude.html
In Ubuntu 12.04 64-bit this did not work for me no matter what I did.
The way I got it working was to put the rule file in /lib/udev/rules.d/ instead of placing the udev rule in /etc/udev/rules.d/ and then $ sudo udevadm trigger

The exact reason why my Ubuntu system does not seem to read rules from /etc/udev/rules.d/ is still a bit mystery.

mikeceranski
 
Posts: 2
Joined: Fri Jan 20, 2012 9:01 pm

Re: Operation not permitted / initialization failed, rc=-1

Post by mikeceranski »

Dheath you rock! I had the same issue with my ubuntu x64 install. Your solution worked like a charm. Thanks!

mikeceranski
 
Posts: 2
Joined: Fri Jan 20, 2012 9:01 pm

Re: Operation not permitted / initialization failed, rc=-1

Post by mikeceranski »

Dheath you rock! I had the same issue with my ubuntu x64 install. Your solution worked like a charm. Thanks!

timretniw
 
Posts: 1
Joined: Tue Jul 16, 2013 8:50 am

Re: Operation not permitted / initialization failed, rc=-1

Post by timretniw »

Hei folks!

I am struggling since the whole morning with precise the problem you all described, I'm using ubuntu 12.04 and tried to write both into etc and lib, but still get this anoying message that the operation is not permitted. I'm not sure about which of the 3 different code lines have to go into the 10...file, could someone help me with that??
Thanks a lot in advance!

slado
 
Posts: 1
Joined: Fri May 02, 2014 5:51 pm

Re: Operation not permitted / initialization failed, rc=-1

Post by slado »

In my case (Ubuntu 12.04, USBtiny, Atmega328p, using Arduino Uno settings/bootloader) only the following rules worked:

SUBSYSTEM=="usb", ATTR{idVendor}=="1781", ATTR{idProduct}=="0c9f", GROUP="plugdev", MODE="0666"

ron_bean
 
Posts: 6
Joined: Sat Jul 16, 2011 7:07 am

Re: Operation not permitted / initialization failed, rc=-1

Post by ron_bean »

I've been puzzling over this issue, and this thread finally pointed me in the right direction, with a bit of a twist:

I'm running Ubuntu 14.04, and I discovered that there is already a file called /etc/udev/rules.d/usbtinyisp.rules which contains this: SUBSYSTEM=="usb", ATTR{pro duct}=="USBtiny", ATTR{idPro duct}=="0c9f",
ATTRS{idVendo r}=="1781", MODE="0660", GROUP="dialout"

Note the weird spaces in "pro duct", "idPro duct" and "idVendo r". I removed those spaces, but still no luck. Following the clue from "Dheath" above, I copied this file into /lib/udev/rules.d/ (adding a number to the beginning of the filename, to match the format of the other files in that directory), and then ran $ sudo udevadm trigger (it won't work if you don't do this).

Now it works, either from the command line or from within the Arduino IDE. I would suggest updating the documentation somewhere to include this information.

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”