Digistump Forums
The Digispark => Digispark (Original) Support => Topic started by: lincomatic on January 07, 2013, 07:44:57 pm
-
I just got my digisparks today. Downloaded the latest IDE, and installed the driver, then tried to load the blink sketch, but Arduino is giving me the following error:
Running AVRDUDE...
avrdude_original: usbdev_open(): did not find any USB device "usb"
Any ideas what's wrong? Also, can you tell me the programmer type that's being sent to avrdude (-c argument)?
Thanks.
BTW, the digisparks are all too wide to fit directly into my dell notebook. I have to use a usb hub.
-
the fact that avrdude_original is being run seems like a bad sign. that\'s presumably the original one that is supposed to be replaced with the digispark version.
-
@lincomatic - I think you need to set Tools->Board as Digispark AND Tools-> Programmer as Digispark
Are both of those set?
-
OK, I didn\'t have Tools->Programmer set to Digispark. Funny, because for other boards, I only have to do that when programming the bootloader.
It kind of works now... I was able to successfully upload sketches to all 3 of my digisparks, but it\'s a frustrating process, because very often, either 1) the system doesn\'t recognize the board, and thinks it malfunctioned, or 2) the board gets out of the bootloader before it gets detected or 3) it aborts before it gets to 100%. Is there any way to make it more reliable?
Also, I\'m afraid I\'m going to destroy the digisparks if I have to keep unplugging/plugging them in each time I program them (especially if I have to do it 3-5x each time). Could I just hit the reset pin instead?
-
This sounds like a bad USB cable or finicky port - have you tried a rear port or a USB hub, sometimes that will help. If you are using an extension cable try without it. You certainly shouldn\'t have to do more than plug it in when asked to and unplug it before uploading again.
Reset pin: there is no reset pin, though @Bluebie suggested moding a USB extension cable to have a button/switch on the power wire - you could also get a cheapo hub off ebay that has a on/off switch. That said I have several that have been plugged and unplugged thousands of times (literally) and I\'ve yet to wear them out or break them.
-
My laptop is flaky and has similar issues as you describe. My work desktop has no problems. I have solved the laptop\'s problems by using a small powered USB hub, as Erik describes above.
And, in a completely unrelated subject, the DMP1 is working great Sam! :)
-
I'm having the same nature of problem. I followed the instructions here:
http://digistump.com/wiki/digispark/tutorials/connecting
Then I had the problem in the OP. Then I fixed the "Tools-> Programmer as Digispark" error. Then it compiled and asked me to plug in the digispark. Plugged it in and Windows gives an error message that device isn't recognized. Trying to install the drivers manually is so far fruitless. No idea what the problem is. I'll try it again later with another port or a powered hub and see if that changes anything.
-
AlanSE -
Is the message that the device is not recognized or that it has malfunctioned?
Can you try different ports, a hub, and if you have one a USB extension cable?
Thanks,
Erik
-
I had similar problems with my first attempts. I am used to the Arduino IDE and there are enough differences that it is easy to get derailed along the way.
In the end, I learned that most of my problems were in the connection between the digispark and the USB extension cable. The first time I actually had it plugged in upside down. I had to put my glasses on and look at things carefully. I have never had a USB device that could be plugged in more than one way. 8-)
I finally got it working when I realized that the connect between the USB jack and the board is loose enough that I have to wiggle it a little to make sure that the pads align correctly. Once I got that figured out it seems to work just fine.
http://mypetdigispark.blogspot.com/
-
Mine has worked now. At least it works occasionally. I also need to note that I'm on Windows 7, and since my last post I've been plugging it directly into the USB on the back panel of my computer tower due to power supply concerns.
When it doesn't work it just gives this message that it didn't recognize and nothing else happens. The editor keeps sitting there waiting for me to plug in the digispark.
(https://lh4.googleusercontent.com/-NE6YoOxYTEc/URHHUgYoibI/AAAAAAAACOw/NVt0e3b0CqE/s338/Fullscreen+capture+252013+92614+PM.jpg)
This seems to almost always be the initial result. After a few times of replugging it in, I get lucky and I get these messages instead:
First, driver not installed.
(https://lh5.googleusercontent.com/-dbWqh2qdmic/URHHU4SugII/AAAAAAAACO4/d_0UkJ0tujc/s460/Fullscreen+capture+252013+93812+PM.jpg)
Next, driver is installed?
(https://lh3.googleusercontent.com/-YA8QeBUnpbI/URHHVFhUvFI/AAAAAAAACPA/O-iNv7K71a0/s296/Fullscreen+capture+252013+93827+PM.jpg)
Third, something (driver?) crashes:
(https://lh6.googleusercontent.com/-1uVWPnEDLCw/URHHVmqdD2I/AAAAAAAACPI/o55zuwGyH1U/s498/Fullscreen+capture+252013+93832+PM.jpg)
After this point the editor starts a dialogue. This step doesn't always work either, so I'm going to share the output it gives me as it crashes two different times:
First crash:
>> Eep! Connection to device lost during erase! Not to worry
>> This happens on some computers - reconnecting...
>> (!) Automatic reconnection not working. Unplug and reconnect
device usb connector, or reset it some other way to continue.
> Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device is found!
connecting: 20% complete
connecting: 23% complete
connecting: 27% complete
connecting: 30% complete
connecting: 34% complete
connecting: 40% complete
> Device looks like ATtiny85!
> Available space for user application: 6010 bytes
> Suggested sleep time between sending pages: 8ms
> Whole page count: 94
> Erase function sleep duration: 752ms
parsing: 40% complete
parsing: 60% complete
> Erasing the memory ...
erasing: 60% complete
erasing: 60% complete
erasing: 60% complete
(NOTE: this continues for a while, I've deleted those lines)
erasing: 79% complete
erasing: 79% complete
>> Eep! Connection to device lost during erase! Not to worry
>> This happens on some computers - reconnecting...
>> (!) Automatic reconnection not working. Unplug and reconnect
device usb connector, or reset it some other way to continue.
Another way it failed:
Binary sketch size: 776 bytes (of a 6,010 byte maximum)
Running Digispark Uploader...
Plug in device now...
Assertion failed: res >= 4, file library/micronucleus_lib.c, line 63
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
> Please plug in the device ...
> Press CTRL+C to terminate the program.
At last, here's the output from a time that it worked:
Binary sketch size: 776 bytes (of a 6,010 byte maximum)
Running Digispark Uploader...
Plug in device now...
> Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device is found!
connecting: 20% complete
connecting: 23% complete
connecting: 27% complete
connecting: 30% complete
connecting: 34% complete
connecting: 40% complete
> Device looks like ATtiny85!
> Available space for user application: 6010 bytes
> Suggested sleep time between sending pages: 8ms
> Whole page count: 94
> Erase function sleep duration: 752ms
parsing: 40% complete
parsing: 60% complete
> Erasing the memory ...
erasing: 60% complete
erasing: 60% complete
(NOTE: many more lines, deleted)
erasing: 79% complete
erasing: 79% complete
>> Eep! Connection to device lost during erase! Not to worry
>> This happens on some computers - reconnecting...
>> Reconnected! Continuing upload sequence...
erasing: 80% complete
> Starting to upload ...
writing: 80% complete
writing: 80% complete
(NOTE: many more lines, deleted)
writing: 99% complete
writing: 100% complete
>> Micronucleus done. Thank you!
So I'm curious, did it have a problem half way through this upload and then fix it? Anyway, my sketch ran after this. I've fully soldered the RGB shield as well as the headers on the digispark. I have it running an edited version of the test code for that shield:
http://digistump.com/wiki/digispark/tutorials/rgb
I think this is obvious from my post, I would like to see this working a little bit more consistently. I really can't say for sure that it'll work the next time I plug it in. Maybe this is a physical problem, it just only seems to work 1/3rd of the time and I don't know why.
-
AlanSE - I believe the problem you are having is that you need to unplug the Digispark before you hit the upload button and then not plug it in until the program tells you to.
-
No, I'm doing that. I guess I wasn't very clear about that.
My blurb there starts where the editor has compiled the sketch and is in the waiting mode. So then I try to plug it in, and cycle around that first error - that Windows sees a USB device that it can't recognize. You know the sound it makes when it detects a new device, and when you unplug a device? Imagine that on repeat for minutes while trying to physically adjust the digispark in the USB slot. All the while, the editor is sitting there with the message that it's waiting for the digispark to be plugged in.
Then occasionally I get lucky and it proceeds to the next set of popups. Then the editor, which had been waiting, kicks in and spits out all the text. I've loaded a new sketch since that post, and I confirmed that every time it works it gives that same dialogue. I was surprised by this, because why would it lose the connection at 80%... and then work? It seems to do this consistently.
I know, I need to try it with some other operating systems now. I have plans, but haven't got around to it yet.
-
I'm getting a similar error to the first set of output posted above except I'm on Linux (Fedora 17 x64) and it is always the same.
./arduino
Gtk-Message: Failed to load module "pk-gtk-module"
Experimental: JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
Binary sketch size: 896 bytes (of a 6,010 byte maximum)
Running Digispark Uploader...
Plug in device now...
> Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device is found!
connecting: 40% complete
> Device looks like ATtiny85!
> Available space for user application: 6010 bytes
> Suggested sleep time between sending pages: 8ms
> Whole page count: 94
> Erase function sleep duration: 752ms
parsing: 60% complete
> Erasing the memory ...
erasing: 79% complete
>> Abort mission! -1 error has occured ...
>> Please unplug the device and restart the program.
I'm running as root and not inserting the device until asked to.
I have installed a 32bit JRE and the 32bit libusb as needed.
The device flashed the onboard LED before I tried to upload a sketch, now just the power LED is on.
I am going to try on a 32bit Ubuntu machine when I can get my hands on one, but I would really like to get this to work on my normal machine.
Thanks,
-
I have encountered exactly the same problem as the above poster, though i am on a MacPro (late2009). It always stops at 79% with 3 different digiSparks... I also tried it on my iMac but there it wont be recognized.. (i assume because of the ports being USB 3)
Running Digispark Uploader...
Plug in device now...
> Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device is found!
connecting: 20% complete
[1F[2Kconnecting: 23% complete
[1F[2Kconnecting: 27% complete
[1F[2Kconnecting: 30% complete
[1F[2Kconnecting: 34% complete
[1F[2Kconnecting: 40% complete
> Device looks like ATtiny85!
> Available space for user application: 6010 bytes
> Suggested sleep time between sending pages: 8ms
> Whole page count: 94
> Erase function sleep duration: 752ms
parsing: 40% complete
[1F[2Kparsing: 60% complete
> Erasing the memory ...
erasing: 60% complete
[1F[2Kerasing: 60% complete
[1F[2Kerasing: 61% complete
[1F[2Kerasing: 62% complete
[1F[2Kerasing: 63% complete
[1F[2Kerasing: 64% complete
[---SNIP---]
[1F[2Kerasing: 77% complete
[1F[2Kerasing: 78% complete
[1F[2Kerasing: 79% complete
>> Abort mission! -1 error has occured ...>> Please unplug the device and restart the program.
-
hardillb and GuzWaatensensen - - The Abort Mission -1 error on linux (unlike the Assertion failed one that is related to permissions) - is usually related to a certain distros/copies/combos of linux and hardware/we aren't quite sure yet but it involves linux - issue that seems to be solved by a hub and often specifically a powered hub (sometimes the USB plugs found on a monitor work as well) - can you try a hub as well as the various different ports on your machine?
-
AlanSE - I apologize for misunderstanding where the error was occurring, we see a ton of people with that error who aren't unplugging it first.
Have you tried an extension cable and/or hub? It sounds like all of these could be related to the Digispark not having a good connection both the error during upload not recovering (the error at 80% is normal for how some computers handle the USB, but it should always recover itself) and the crashing of the program and device issues.
Does this occur with one or multiple Digisparks? If you have others and haven't yet, can you test them as well?
Thanks,
Erik
-
Um, i'm on a Mac though. I can verify however that using an unpowered USB Hub solved the problem in my case. Hope you'll eventually uncover what's the problem behind that...
-
Hi thanks for the feed back,
If it helps to track things down, I'm running up to date Fedora 17 x86_64 on a Lenovo w500 ThinkPad
I tried it with a basic un-powered hub today, but I will try with a powered one when I'm back in the office tomorrow.
I have managed to get the DigiBlink code loaded via my Windows 7 machine tonight so I've managed to start playing, but I getting it all working on Linux would be great.
-
I can confirm that plugging the digispark in via the powered hub in my monitor has allowed me to upload the Start blink sketch with Linux.
Thanks for the pointer
-
hardlib - wonderful that you got it working! still a puzzle as to why some linux distros work with it only through a powered hub...
-
Consider my previous posts to be using a computer named "A". I've tested it out on 3 computers now, and they all work at least some of the time. In case you're going to ask, yes, I'm changing the timing of the blinking sketch each time so that I can confirm "runs with old sketch" or "runs with new sketch", because obviously it will boot up and run its old program with the USB power even if it's not doing anything with data. This is the shield on the digispark.
(https://lh5.googleusercontent.com/-Db3HohXgFns/URO9Dnr3RSI/AAAAAAAACQQ/F6gZBzSSZn0/s480/IMG_3537.jpg)
Here are the most important specs of the different computers:
- Comp A: 64-bit Windows 7, a 64-bit machine, desktop
- Comp B: 32-bit Windows 7, a 32-bit machine, netbook
- Comp C: 32-bit Windows XP, a 64-bit machine, desktop
To summarize my hypothesis, A had problems with both the connection and software. Like I outlined, there were two hangup points that still occur, and I think this is connection, and then software, but I leave it open for others to disagree with me. The thing never worked with a passive USB extension cord and I was still jiggling it a lot when it was plugged directly into the back.
With Comp B, the netbook, I put the software on the computer, I ran the Windows driver exe, I opened up my program, changed the programmer and board preferences, hit the "compile & send" button, plugged in my digispark - RGB shield, and then it runs the old sketch. The dialogue in the editor still said "Plug in device now...". A strange thing is that it gives the Windows 7 popups that it installed the driver and it works. It doesn't give the messages (like Comp A) that it failed, then worked, then failed, etc.
So I restarted, and then after another try or two it seems to have worked.
With Comp C I followed the same song and dance and similarly, it seems to be working now. Here, I used a powered hub.
(https://lh6.googleusercontent.com/-o7zIdUvRJfc/URO9DzcrONI/AAAAAAAACQw/Fm_8oezULxE/s480/IMG12347.jpg)
Again, I got the software, ran the Windows driver exe, started the editor, fixed the settings, loaded my sketch, changed the timing, hit the "compile & run" button, got the message to plug it in, plugged it in, and I got this:
(https://lh6.googleusercontent.com/-glGGEq3uwec/URO9EnsOmEI/AAAAAAAACQc/ZDP6Kub5m1I/s480/Found+New+Hardware+Wizard+272013+84306+AM.jpg)
At this point, with the found hardware wizard, from a QA standpoint we have a fork. First, I try canceling. The editor doesn't really change or see anything. However, I do hear the windows sound for a new hardware being found. In fact, this sound repeats over and over again. I observed the same thing many times with Comp A. For what it's worth, it does run the old sketch.
So canceling doesn't work. Now, we say that we want to specify the location to get the driver from and get Windows to install it. I specify the Windows driver folder. It installs, or at least it thinks it does.
(https://lh5.googleusercontent.com/-fNDTsjeCFoQ/URO9EsVVNlI/AAAAAAAACQk/SYdKgYxL-L8/s480/Found+New+Hardware+Wizard+272013+84351+AM.jpg)
(https://lh5.googleusercontent.com/--M84Ga5KhEg/URO9FQAm_wI/AAAAAAAACQs/9usSh-32ha8/s480/Found+New+Hardware+Wizard+272013+84402+AM.jpg)
Click Finish, and the editor starts to do stuff at last. But now I hit on something that I think reflects the second problem I had with Comp A. The editor outputs something very nasty, similar to what I posted from my first try with Comp A. It gets long so I'm not posting it right now.
So that didn't work. Now I try it a second time. This time it works. This is the output I get.
Binary sketch size: 984 bytes (of a 6,010 byte maximum)
Running Digispark Uploader...
Plug in device now...
> Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device is found!
connecting: 20% complete
connecting: 23% complete
connecting: 27% complete
connecting: 30% complete
connecting: 34% complete
connecting: 40% complete
> Device looks like ATtiny85!
> Available space for user application: 6010 bytes
> Suggested sleep time between sending pages: 8ms
> Whole page count: 94
> Erase function sleep duration: 752ms
parsing: 40% complete
parsing: 60% complete
> Erasing the memory ...
erasing: 60% complete
[--CLIPPED--]
erasing: 80% complete
> Starting to upload ...
writing: 80% complete
[--CLIPPED--]
writing: 99% complete
writing: 100% complete
>> Micronucleus done. Thank you!
Now it runs the new sketch.
I should summarize I guess. Here are my major hypotheses that are non-intuitive:
- There's some kind of driver recognition that has to happen in Windows when you first plug it in, and this is in addition to running the driver install stuff.
- Even if you get that, the sketch is never sent correctly the first time. Sometimes you can try again and it'll work and sometimes it will after restart.
- There's another cause for hangups unrelated to the above two, and I think it's likely to be hardware. Plugging it in directly to the tower doesn't eliminate this problem. Everyone (including myself) seems to not have this problem with a powered hub, and my netbook also never showed signs of this problem. It's likely an issue with the construction of the ports. With my Comp A it still gets thrown into strange loops of Windows trying to recognize the device even though the driver works occasionally.