Digistump Forums

The Digispark => Digispark (Original) Support => Topic started by: srz2 on January 12, 2013, 01:43:56 pm

Title: Can't Upload Program
Post by: srz2 on January 12, 2013, 01:43:56 pm
I am new to this kind of thing so i dont know if i'm doing something wrong, but I copy and pasted the sample program and tried to upload it to my digispark through the Audino ready software. I've selected the necessary board and program in the tools menu and when it says to, i plugged in my digispark to upload. After which, the software seems to do nothing and does not progress. Is there another step that I am missing or am I wrong to assume that the program should upload to the device after i plug it in.

Please help,

thanks
Title: Can\'t Upload Program
Post by: deranjer on January 12, 2013, 03:18:58 pm
Windows or Linux?

If you are in Windows did you run \"InstallDriver.exe\"?

No need to copy and paste it, go to

File->Examples->Digispark->Start

and that is the exact same blink example
Title: Can\'t Upload Program
Post by: Bluebie on January 12, 2013, 04:07:41 pm
It sounds like the digispark isn\'t connecting. Deranjer is right in thinking it maybe drivers on windows. On linux it could be a permissions error. On Mac OS it should just work. The connector on the digispark is a bit short too, so if the USB ports you\'re trying to use are a bit deep in to the computer\'s case you could try using a little usb extension cable or plug it in to a hub or something like that.

Does the green LED light up when you plug it in? If it does but isn\'t in deep enough to connect data, one thing you can try is using a conductive silver pen or something like that to extend the two data wires in the middle of the USB prong all the way to the edge.
Title: Can\'t Upload Program
Post by: srz2 on January 13, 2013, 11:46:09 pm
I\'m sorry, I should have been more specific...

I\'ve tested digispark on multiple computers

2 different PCs running windows 7
2 different Macs running Mountain Lion (Macbook Pro Retina) and Lion (Macbook Pro early 2012)

Big issue I am having with the macs is that when i try to upload the program on a mac, the ardunio editor freezes my computer (mouse and keyboard). Is there a solution to this? Regardless, it also doesn\'t upload to my digitpark

On the PCs, I\'ve had the same issue with each PC. When I try to upload and plug in my digispark, it can do anything from a couple different things. One, I\'ve actually had it work correctly and everything is fine. Two, the *budum* sounds goes on and off and nothing happens. Three, the *budum* sounds several times, it might recognize it and if it does, it says either the driver is not found/recognized OR it says the USB device in unknown.

What I am aware of:
          - There is a potential problem with the retinas and the USB 3.0
          - Some computers might not have the device going in all the way. I am aware and have taken precautions

Toubleshooting I\'ve done:
           - Uninstall and Redownload the software
           - Uninstall and redownload the driver
           - Tried all the USB ports in each computer with no different results
           - Tried a different digispark (i\'ve got three in my order)
           - Tried with and without anything else connected to it

The only thing I have not done that I will try tomorrow after buying one is using a USB extension cable. HOWEVER I would like different advise than that incase that fails as well unless there can be nothing wrong with the process otherwise (which still doesn\'t answer the macs freezing on the upload)

Any and all help is appreciated!!!
Title: Can\'t Upload Program
Post by: srz2 on January 13, 2013, 11:51:47 pm
ALSO to add on, I make double sure that I\'ve selected the proper digispark board and programming language in the ardunio software editor
Title: Can\'t Upload Program
Post by: digistump on January 14, 2013, 10:19:40 am
@srz2

Do you have more than one Digispark? If so, have you tried a second one?

When you plug it in and leave it for about 10+ seconds does the LED on it start to blink? (The power LED should stay solid, a second LED should blink)
Title: Can\'t Upload Program
Post by: RussNelson on January 14, 2013, 04:12:53 pm
srz2 I had to use a powered USB hub.
Title: Can\'t Upload Program
Post by: Bluebie on January 14, 2013, 04:34:00 pm
I believe the issue with USB 3.0 on recent retina macbook pro to be that the USB port is quite a bit deeper in to the case than on previous mac laptops. This is what I observed on a friend\'s retina macbook pro, and a usb extension cable or hub had it working fine. On freezing, this seems to be happening during the compile process, not the upload - because it also happens when you try and verify the program. Hopefully digistump or arduino can find a fix for this weirdness. :)
Title: Can\'t Upload Program
Post by: srz2 on January 14, 2013, 07:41:05 pm
@digistump : I have three in my order and I tried using a different one. Same issues

@RussNelson : I am using a USB extender but I will try a hub when I can

@Bluebie : I used an USB extender but I still observe the same issues. The freezing issues still persist

Any other comments or ideas would be appreciated. This problem is still ongoing
Title: Can\'t Upload Program
Post by: digistump on January 14, 2013, 08:08:36 pm
@srz2 - if you plug one in and leave it (not trying to upload or anything) does it begin to blink?

I know you\'ve answered this but to confirm have you tried the rear ports on a windows desktop with no cable of any kind?
Title: Can\'t Upload Program
Post by: srz2 on January 14, 2013, 09:46:02 pm
@digistump

Once i plug in the device, the power LED turns on and remains solid. Leaving it in while NOT trying to upload anything, a second LED turns on and also remains solid. At this point, the program stored on the device begins to execute.

I have tried the rear ports of the PCs with no luck. I can\'t with the Mac as they are laptops and are lacking anything in the rear.
Title: Can\'t Upload Program
Post by: Bluebie on January 14, 2013, 11:08:33 pm
On mac\'s try a port on either side (most have at least one port on each of the left and right edges). As a rule, one side will go through a hub on the motherboard, combined with the laptop\'s keyboard, trackpad, and sometimes webcam and bluetooth module, while the other port will go straight in to the system\'s usb chip.
Title: Can\'t Upload Program
Post by: srz2 on January 15, 2013, 08:29:48 pm
@Bluebie

I\'ve already tried this, but thanks for the recommendation
Title: Can\'t Upload Program
Post by: Deamiter on January 19, 2013, 07:59:41 pm
I have what I think is a similar problem.  I\'ve used a dremel to trim down a USB extension cable, and I tried every USB port on my computer (Win XP).  I found just one port that seems to work, but the upload is aborted at 80% and now the Digispark doesn\'t flash.

I\'ve tried this with two separate Digisparks, and now neither of them flash with the pre-loaded program.  Further, while one of them can repeatedly reach this 80% point, the other isn\'t even recognized any more.  I\'ll try purchasing a powered USB hub, but if that doesn\'t work, I\'m not sure what to try next.
Title: Can\'t Upload Program
Post by: digistump on January 20, 2013, 01:21:48 am
@Deamiter - do you have anything plugged into the Digispark when you try this? A circuit, etc? That ended up being the issue srz2 was having. So if that is the case then try with nothing plugged into it (just to establish it working at least).
Title: Re: Can't Upload Program
Post by: Deamiter on January 23, 2013, 05:38:04 am
Sorry for the slow response -- I had some trouble logging into the site a second time (which seems to be resolved -- the "forgot password" link wasn't sending me an email).

I tried uploading both with and without a second board plugged into the Digispark.  I also had the same problem on a second Digispark that has no headers (so nothing has been plugged in yet).

I'll get my powered hub and try again today.  If that fails, I'll try on other computers/operating systems to rule that out too.
Title: Re: Can't Upload Program
Post by: crchapman on January 23, 2013, 07:24:26 pm
Sorry to hijack - I'm having the same issue except that my power LED remains solid while my onboard LED blinks.  When I attempt to upload the starter sketch, the Arduino IDE never acknowledges when I've inserted the DS - it just waits and waits, never uploading the sketch. I've re-installed the drivers and tried plugging it in to each of my laptop's three USB ports - no joy.


On the IDE I have selected Tools-->Board-->DigiSpark (Tiny Core) and Tools-->Programmer-DigiSpark.



I'm thinking this must be a driver issue (I'm running Win7 x64, latest patches)


(http://i49.tinypic.com/snex3s.png)
Title: Re: Can't Upload Program
Post by: digistump on January 23, 2013, 09:06:54 pm
@crchapman - have you tried a hub or extension cable - some laptops ports are too far recessed for the data pins to make contact


Do you hear a sound when it is plugged in? Do any messages about unrecognized USB devices pop up?
Title: Re: Can't Upload Program
Post by: crchapman on January 24, 2013, 06:22:35 am
@digistump: I have a ThinkPad T510 - the USB ports are quite flush to the casing - you can easily see the contacts extend right up to the edge. This said, I'm a little doubtful about how well the connections are being made in spite of the LED indicators - I'll try an extender to see if it makes a difference.

None of the usual sounds or notifications that a USB device has been plugged-in appear when the DS is inserted. In light of this, I ran a utility to list the drivers installed on my system and cannot find libusb0.sys anywhere - or any driver that appears to relate to the DigiSpark bootloader. I'd like to nail that down before proceeding further...
Title: Re: Can't Upload Program
Post by: digistump on January 24, 2013, 11:45:05 am
Assuming you have those sounds turned on - when you plug it in if you aren't getting the plug in sound my bet would be on the connector - even if the driver was not installed you'd get the sounds and if the driver wasn't installed you also get the pop up about looking for a driver. If the Digispark was faulty you'd likely get a "device malfunctioned" pop-up as well.


I'd bet on an extender.


What software do you use to list the drivers? I'll try it and see if libusb shows up for me.


Thanks,
Erik
Title: Re: Can't Upload Program
Post by: zippitydoodah on January 24, 2013, 06:56:05 pm
I have the very same problem. I am also using windows 7 64. I have tried all three of my digisparks and they all act the same. I have tried a powered hub, usb extender, usb on the front, usb on the back, etc, etc, etc. The boards are making contact just fine. What appears to be a happening is the boot loader switches over to the led blink program before windows 7 has a chance to recognize and install the correct driver onto the usb port. I say this because as soon as the device is inserted I get the audio cue and the device shows up in device manager. After the blink program begins, I get another audio cue and the device disappears from device manager. 

I will try linux next.

Update:

So I tried linux (latest mint flavour of ubuntu). And results were only slightly better. I followed the instructions related to udev on ubuntu. I even ran arduino app as root. I was able to erase the device but always got an error on programming. So now the device has no program other than the bootloader.

Well I guess I will try my Mac.

Update 2:

Mac Arduino app won't execute on my mac.

Anyone have a suggestion for a VM or USB live distribution to try with this ?  I am out of ideas.


Title: Re: Can't Upload Program
Post by: digistump on January 24, 2013, 08:18:38 pm
zippitydoodah - going back to windows, to focus on getting them to work physically before getting them to work on everything:


Have you installed the driver for windows?


Are you waiting to plug them in until prompted to do so by the Arduino IDE?


When you plug them in and you hear the connect and disconnect sound - do you get any pop up messages about drivers, devices malfunctioning etc?


What happens in the Arduino IDE after you plug them in?


Thanks,
Erik
Title: Re: Can't Upload Program
Post by: zippitydoodah on January 24, 2013, 10:03:05 pm
Have you installed the driver for windows?

Yes.  I installed the driver first thing as per the getting started instructions.


Are you waiting to plug them in until prompted to do so by the Arduino IDE?

Yes.


When you plug them in and you hear the connect and disconnect sound - do you get any pop up messages about drivers, devices malfunctioning etc?

Yes.  That was what I was calling audible cue in my post.


What happens in the Arduino IDE after you plug them in?

It never recognizes the board. I believe it is because the bootloader executes the led blink program before windows has a chance to set up the driver.

Title: Re: Can't Upload Program
Post by: digistump on January 25, 2013, 11:16:59 am

Thanks for the thorough response!


Was the Windows and Linux on the same machine?




Even on really ancient Windows XP machines 5 seconds (the delay before it moves form bootloader to program) has been enough time for windows to enumerate - that said even as a windows guy, sometimes windows can be slow to do something for no apparent reason.


On linux when you got to the upload before the error - was that with a powered hub or directly plugged in?



On the mac have you looked at this thread:


http://digistump.com/board/index.php/topic,119.0.html








Thanks for your patience!



Title: Re: Can't Upload Program
Post by: larural on January 25, 2013, 01:45:30 pm
hi,
I work with mac, and i installed the arduino and run it.
I selected the board and the programmer,.. and all run.


But when upload de code to the board digispark,...




[1Ferasing: 79% complete
>> Abort mission! -1 error has occured ...
>> Please unplug the device and restart the program.

I reset and umplug but not run.

thank you,
Title: Re: Can't Upload Program
Post by: seattleandrew on January 25, 2013, 04:22:05 pm
Just adding my problem to this list.


Can't upload program to my DigiSpark (I only have one to test).


Windows 7 x64
Drivers were installed.
Board and Programmer were set in the IDE
I can't progress pass "Plug in device now..."
Title: Re: Can't Upload Program
Post by: zippitydoodah on January 25, 2013, 05:30:12 pm
Was the Windows and Linux on the same machine?

Yes.  Dual booting.

Even on really ancient Windows XP machines 5 seconds (the delay before it moves form bootloader to program) has been enough time for windows to enumerate - that said even as a windows guy, sometimes windows can be slow to do something for no apparent reason.

It was quick to recognize insertion but did not immediately enumerate the usb device.  It goes into the looking for matching driver mode instead.  This makes me think that maybe the win 64 driver has a problem or is not installing in the proper location.

On linux when you got to the upload before the error - was that with a powered hub or directly plugged in?

Directly plugged in.  I did try multiple ports.

On the mac have you looked at this thread:

Thanks for the link. This allowed me to get the arduino app working. However, the mac is never able to complete the erase cycle. It errors out at 79% every time on two of the three digisparks.  The third digispark appears to have failed now as it isn't even seen on the usb bus by any computer.

Thanks for your patience!

No problem.  Is their any kind of access to the devices other than the usb? 
I will try my laptop next.
Title: Re: Can't Upload Program
Post by: Deamiter on January 25, 2013, 06:50:26 pm
My upload problem was fixed with a powered USB hub.


I tried a couple digisparks in each of 7 USB ports on my PC.  A couple of the ports would allow me to get part-way through the upload, but on all the others, the Arduino IDE simply sat "waiting" for me to plug in a USB.  The powered USB hub worked to upload to my digispark the first time I tried.  (make sure to read the upload instructions -- it's very different from uploading to official Arduino boards). 


Anyway, I'm thrilled that my little LEDs are flashing as intended, and I'll add my experience to the chorus suggesting that anybody with upload problems try a powered USB hub.


In case there's someone who doesn't know what I mean by powered USB hub, it's just a USB hub that plugs into the PC via USB but also has a wall-wart power supply that allows you to exceed the normal current limits on USB ports.  There's a lot of cheap ones out there, and (with minimal research) I picked up this one on Amazon.com:  http://www.amazon.com/gp/product/B003Z4G3I6/ (http://www.amazon.com/gp/product/B003Z4G3I6/)
Title: Re: Can't Upload Program
Post by: zippitydoodah on January 25, 2013, 10:07:05 pm
Ok.  I have my digisparks working!  ;D

Linux with a powered hub! 

Windows 7 32 and 64 never did work even with a powered hub.  Weird.

Thanks.
Title: Re: Can't Upload Program
Post by: digistump on January 26, 2013, 02:06:12 am
@larural - have you tried the items in the troubleshooting section, including a hub, extension cable, powered hub, and perhaps a different machine if possible.
Also have you tried other USB ports?
Also if you have anything plugged into the Digispark (shields/circuits) -  remove them first.




@seattleandrew - have you tried the items in the troubleshooting sections, especially different ports, hub, extension cable - and are you hearing the device connect disconnect sound?




Out of the 20+ computers I tested with and the about 12 I have here permanently (old, new, mac, PC, many windows 7 64bit) - I didn't need a powered hub with any of them - but it certainly is a good bet that one will help and also might save you from harming your machine if you short out your Digispark while connected (of course you shouldn't be bulding circuits while it is connected, but I almost killed a apple cinema display this way...).


Anyway here is my favorite powered USB hub: http://www.ebay.com/itm/New-7-Port-USB-2-0-High-Speed-HUB-AC-Power-Adapter-Black-/390520019648?pt=US_USB_Cables_Hubs_Adapters&hash=item5aecce9ac0


Thanks everyone for your patience! I am determined to help everyone get them working, but my responses may be slow until we finish shipping (90% done!), I try to keep a balance between the two but I have to fit a day job in too! - and thanks to all those in the community helping as well!
Title: Re: Can't Upload Program
Post by: digistump on January 26, 2013, 07:19:49 pm
I wanted to add one more thing to try - especially for those who are getting a connection but then an error - try putting a bit of pressure on the Digispark after you plug it in and/or adding a few layers of tape to the bottom of the USB plug part of it - sometimes these issues seem to be due to the Digispark not making snug enough contact with the USB pins when plugged in.
Title: Re: Can't Upload Program
Post by: seattleandrew on February 10, 2013, 12:11:11 pm
Quote
have you tried the items in the troubleshooting sections, especially different ports, hub, extension cable - and are you hearing the device connect disconnect sound?[/size]

@DigiStump, Yes and I've tried an unpowered hub and I'm getting the unplug noise from Windows :(
Title: Re: Can't Upload Program
Post by: Mark on February 10, 2013, 02:55:24 pm
The other option is find an extension that has proper spring type pins.

It solved my issues.


Mark
Title: Re: Can't Upload Program
Post by: digistump on February 11, 2013, 10:16:16 am
Quote
have you tried the items in the troubleshooting sections, especially different ports, hub, extension cable - and are you hearing the device connect disconnect sound?
@DigiStump, Yes and I've tried an unpowered hub and I'm getting the unplug noise from Windows :(


Are you getting any dialogs from the system tray - like "Device has malfunctioned"?


Have you installed the driver?


Do you have access to a second machine to test it with?


Thanks for your patience - it could be a bad one, but we'll try to eliminate a few more things first.
Title: Re: Can't Upload Program
Post by: seattleandrew on February 13, 2013, 01:21:43 pm
@Digistump I get USB Device Not Recognized. I tried uninstalling the drivers then reinstalling. No dice, and I know the little guy is getting power because it runs the default blink program. I'll try on another device, keep in mind I am unable to get any "USB device" noises from my USB 3.0 port, only when I plug into my unpowered USB hub... aaaand weird. I tried another USB 3.0 port on my computer and the drivers loaded. It's just on a side of my computer I never use the ports on. Ok so I tested it and I am now able to successfully upload code :) Thanks for the help!


tl;dr try ALL of your ports
Title: Re: Can't Upload Program
Post by: deejayspinz on February 19, 2013, 06:01:06 am
This may have been answered already.  I'm running Win7 and was having similar issues (USB device not recognized).  It would not work when connecting directly to the 2 front USB ports on my PC (but I know these work as I use memory keys in them all the time).  I have a cheapo 4 port hub connected to the USB port on the back and this worked.   Issue could be either something whacky with my 2 front ports, or (as others have suggested) making sure that a 4 pins get a solid connection when inserted. 


Something I am going to try when I get around to it, is to solder a thin layer of solder to each of the 4 pads to build up some height to ensure positive contact.  This is reversible provided you have some solder wick.  I'll post back to see if that helps. 
Title: Re: Can't Upload Program
Post by: Mark on February 19, 2013, 08:42:43 am
I need to explain my earlier post when I said
Quote
The other option is find an extension that has proper spring type pins.

The extension cord as well as the normal spring parts on the metal shroud, had the 4 USB connection pins sprung.
Thereby ensuring that not matter how thick the device being inserted, positive contact was made to all 4 contacts.

The cheaper extensions don't have this.


Mark