I ran into this particular issue and came up with 3 different ways of resolving it.
I think that the problem is caused by an interaction with Virtual Box and libusb.
I added the udev rules file. I then decided to check the permissions on the USB device nodes.
So I ran lsusb, which produces a bunch of output. This line corresponds to the digispark:
Bus 001 Device 076: ID 16d0:0753 GrauTec
Note: with my brand new never programmed digispark, it would only show up in lsusb for 5 seconds. Once I was able to program it once, then it stays around as long as the DigiSpark is plugged in.
So I did:
find /dev -name 076 -ls
(the 076 part will change each time you plug the DigiSpark in). What I saw as output from the find command was this:
10367836 0 crw-rw---- 1 root vboxusers Jan 19 22:57 /dev/vboxusb/001/076
10367827 0 crw-rw-rw- 1 root root Jan 19 22:57 /dev/bus/usb/001/076
So the /dev/bus/usb/001/076 gets its permisions set from the udev rules on the troubleshooting page.
Solution 1: I ran arduino as root (sudo arduino) and then it was able to program my DigiSpark fine.
Solution 2: Given that running as root worked, I surmised that libusb was picking the wrong node and using it or something. I discovered that /etc/udev/rules.d contained a 10-vboxdrv.rules, and one of the lines was:
SUBSYSTEM==\"usb\", ACTION==\"add\", ENV{DEVTYPE}==\"usb_device\", RUN+=\"/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}\"
So I took a look in the /usr/share/virtualbox/VBoxCreateUSBNode.sh script, and sure enough, it has a line:
mknod \"$devpath\" c $1 $2 -m 0660 2>/dev/null
I changed the 0660 to 0666 and then ran arduino as a normal user, and I was able to program my DigiSpark. Reseting the 0666 back to 660 and I got the error again.
Solution 3: (not for the faint of heart). You can screw things up if something goes wrong, and don\'t expect me to know how to fix it - you\'re on your own. I downloaded the latest libusb from sourceforge, built it and installed it, and that also allowed arduino to run as non-root and program succsessfully. Reverting to the original libusb and I get the error back.
Here\'s what I did to dowload and install libusb. My machine is setup for development (I\'m a software developer), so you may need to install additional packages to get these steps to work.
wget
http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2tar xf libusb-1.0.9.tar.bz2
cd libusb-1.0.9
./configure
make
sudo make install
cd ..
wget
http://sourceforge.net/projects/libusb/files/libusb-compat-0.1/libusb-compat-0.1.4/libusb-compat-0.1.4.tar.bz2tar xf libusb-compat-0.1.4.tar.bz2
cd libusb-compat-0.1.4
./configure
make
sudo make install
This will install some files into /usr/local/lib
The ones with the system (I\'m running 64-bit ubuntu) are in /lib/x86_64-linux-gnu
So I made a backup:
cd /lib/x86_64-linux-gnu
sudo mkdir libusb-orig
sudo mv libusb*.so* libusb-orig
and copied the ones from /usr/local/lib:
sudo cp -P /usr/local/lib/libusb*.so* .
and now running arduino as non-root and the programming work perfectly.
You can revert back to the original libs:
sudo rm libusb*.so*
sudo cp -P libusb-orig/* .
Dave Hylands