Digistump Forums

The Digispark => Digispark Pro Support => Topic started by: FourG on June 24, 2014, 09:06:59 am

Title: Pro fails to enumerate
Post by: FourG on June 24, 2014, 09:06:59 am
Working on bringing up a Beta Pro on one of my systems.  So far, I've tried 3 different machines, all with the same result: the DigiSpark Pro failed to enumerate and drops back into the default mainloop (blinking LED) after 5 seconds.

Setup:

Systems tried:
1. Windows 7 64-bit, P55 Express chipset
2. Windows 8.1 64-bit, QS77 chipset
3. Ubuntu Linux 14.04, X58+ICH10 chipset

Cables tried:
1. Motorola Micro USB
2. Samsung Micro USB

Hub tried:
1. USB 2.0 self-powered hub

Tried all the suggestions from the Troubleshooting and Linux Troubleshooting sections of the Wiki, but still no enumeration.  I don't have a USB monitor to interpose between the host and device, so I can't see the enumeration sequence to see if the D+/D- lines are doing what they're supposed to at the physical and link level.  Does anyone have any ideas on next steps to try?

Thanks!
Title: Re: Pro fails to enumerate
Post by: netguy204 on June 24, 2014, 05:53:33 pm
I'm having the same problem. I'm able to program my device without trouble (plug in when micronucleus asks me to) but the digispark never gets a /dev/tty* entry and dmesg eventually says that enumeration was attempted but it gave up. The ultimate impact is that I'm not able to play with the new serial debugging support that the pro adds.

Having fun programming with the beta shield though!
Title: Re: Pro fails to enumerate
Post by: digistump on June 24, 2014, 06:36:56 pm
@FourG are you able to program it? It will only remain ready to recieve code for 5 seconds - hit the upload butotn first and then plugin/reset the pro

@netguy204 - sorry it wasn't made more clear - I mentioned it on the kickstarter comments - the USB serial debugging is not yet integrated into this beta release
Title: Re: Pro fails to enumerate
Post by: FourG on June 24, 2014, 08:39:28 pm
Sadly, no, I cannot program.  Using the example sketch from the "Connecting Pro" page:

Sketch uses 968 bytes (6%) of program storage space. Maximum is 14,844 bytes.
Global variables use 9 bytes of dynamic memory.
Running Digispark Uploader...
Plug in device now... (will timeout in 60 seconds)


I then plug the Digispark Pro's USB-A cable into the host's USB port.  Windows 7 pops up "USB Device Not Recognized" in the notification center.

> Press CTRL+C to terminate the program.
> Device search timed out


I've got "Tools->Board->Digispark Pro (16 Mhz)" and "Tools->Programmer->Micronucleus" selected (there was no Digispark Pro option available for the Programmer menu in my IDE).

Is there a way to put the bootloader in an infinite "check for programming" loop, say by grounding one of the pins?
Title: Re: Pro fails to enumerate
Post by: FourG on June 25, 2014, 03:02:18 pm
Follow up: I'm starting to suspect the cables may be playing a part in my issue.  The Mini-USB cable that came with my Make: Beaglebone Black kit also resulted in enumeration problems (bad descriptor) but after switching to the no-name cable I use with the Didj and FTDI serial adapters it started enumerating and working correctly.

Will have to swing by the cable store tomorrow to pick up a few of their Micro-USB cables to test this theory...
Title: Re: Pro fails to enumerate
Post by: digistump on June 25, 2014, 05:44:28 pm
If that doesn't solve it please send me an email (support@digistump.com) and we'll get a new one to you.
Title: Re: Pro fails to enumerate
Post by: TravisF on June 26, 2014, 08:43:23 am
I'm having the same problem now.  My board worked fine for two days but then one time it failed to program and now whenever I plug it in Windows says the device isn't recognized.
Title: Re: Pro fails to enumerate
Post by: ubersmack on June 26, 2014, 09:55:00 pm
Also failing to upload any new program, times out after resetting/replugging.  I have the initial blink program working.

"Sketch uses 3,430 bytes (23%) of program storage space. Maximum is 14,844 bytes.
Global variables use 98 bytes of dynamic memory.
Running Digispark Uploader...
Plug in device now... (will timeout in 60 seconds)
> Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device search timed out"
Title: Re: Pro fails to enumerate
Post by: Eascen on June 28, 2014, 01:12:42 pm
I had this problem repeatedly -- turns out my hand being too close to the usb pins was causing interference.
Title: Re: Pro fails to enumerate
Post by: amadren on June 29, 2014, 06:57:30 am
Same problem, my digispark isn't recognized (but from the first day for me) on Windows 8.1
Title: Re: Pro fails to enumerate
Post by: Paul Nicholson on June 30, 2014, 10:15:02 pm
I am having the failed to enumerate device issue as well. I have tried it on my iMac, MBPr & Windows. Nothing.
I also tried multiple cables, with and without a usb 2 hub.
Also note, the ardiuno addon does not include libusb. I copied it out of the old digispark addon but I don't know if there is a newer version.

Code: [Select]
kernel[0]: USBF:    6468.755    The IOUSBFamily was not able to enumerate a device.
Code: [Select]
dyld: Library not loaded: /usr/local/lib/libusb-0.1.4.dylib
  Referenced from: ~/Documents/Arduino/hardware/digistump/avr/tools/micronucleus
  Reason: image not found
Title: Re: Pro fails to enumerate
Post by: defragster on July 01, 2014, 11:53:46 am
I got mine assembled and set up to work.  Then I can upload a few times and lose connectivity.  Initially it wholly failed when I used a short but cheap cord.

On my Win 7 Open Device Manager and monitor ongoing connections: >mmc devmgmt.msc

For some reason mine shows under “Jawbone Devices” - phone Bluetooth I once connected to update.

USB device comes and goes with connection and it typically works, until it stops.  Then I move from one USB port to another (USB 2[HUB] <> USB 3) and it will work again - until it stops again for the next move. { note Under Windows this happens with other common devices not recognized until it moves ports }

I am using the DigiStump Programmer to switch off the USB, I haven't worked with reset yet.

This detection drop may relate to 'Arduino IDE' on my machine as it seems familiar to DIGIX/Digispark and not the hardware.  I did dump my DigiX era docs\Arduino for the last nightly build. {Note: That prior v1.5 build was confusing the new build I initially put in a second location}

Will post after I set up on a Win 8 box and see what I see there.
Title: Re: Pro fails to enumerate
Post by: defragster on July 01, 2014, 01:50:30 pm
Going direct to USB 2 port (not HUB or USB3) I have been had 100% reliable UPLOAD over a dozen times with BetaShield demo app.  Win7 with a Motorola phone cable using my clean nightly build with DigiSpark hardware addons.

Title: Re: Pro fails to enumerate
Post by: digistump on July 01, 2014, 04:38:06 pm
Thanks for your patience everyone - here is a guide to some different issues:

Your Digispark Pro:

Worked - but no longer responds after an error during uploading. If you have an Arduino or ISP programmer try this: http://digistump.com/wiki/digispark/tutorials/proisp - otherwise contact us to exchange/have us reprogram it.

Shows USB device isn't recognized (or similar) and has never worked. Try a different cable, port, hub or computer - and other troubleshooting steps here and in the Digispark message boards. If none of that works contact us.

Does not work with Windows 8/8.1 but works on another computer - we are getting reports of issues with Windows 8 drivers - we are looking into this, but there is nothing wrong with the device itself.
Title: Re: Pro fails to enumerate
Post by: amadren on July 01, 2014, 06:10:37 pm
So... Will it work on linux?

Cuz' I have Kali Linux (dual boot) but have a msg error like:
Java:
Code: [Select]
File /root/arduino/hardware/....... not found but, I've verified and there is the file.
Title: Re: Pro fails to enumerate
Post by: gogol on July 01, 2014, 11:45:20 pm
In that case the whole error message would be helpful.
Furthermore: which user you are using for the IDE? Check the whole path, if file permissions are correct for that user down to the final path.
Is your user member of the "dialout" group?
Title: Re: Pro fails to enumerate
Post by: defragster on July 02, 2014, 12:23:31 am
Having bolted my Pro&Shield together I'd been working from the one sample and poking at it.

Last night on my USB2 HUB and USB3 Win7 notebook ports I seemed to get ~6 uploads and then had to swap ports.

Not rebooting my machine I pulled my MOUSE RF dongle and used that direct USB2 port today.  I must have made and uploaded 50 to 100 trivial changes as the code morphed.  All was working 100% as expected!

After hours of this (on/off/on AC) it finally has the USB port messed up - my HUB, nor my RF mouse work there either (hopefully it fused out).  I moved my HUB to USB3 and it works, I moved my PRO to the Hub's USB2 port and I am back in business.  I've been running the matrix full on for long periods so I don't suspect it was simply from that.

While it was on the 'messed up port' I was seeing the PRO take power and the MATRIX full on, like it does during my normal power up - but after 6-7 seconds it stayed full on.  Then I noticed my finger at/near touching the two caps and resistor area would mess up the display - all off of random bits.  Perhaps it was getting low current volts or some other signal confusing to the micronucleus - but it was looking bad.  I didn't move or do anything I can think of to have caused this - but I assume I had just hit 'upload'.  This behavior persisted even after re-plugging to the same USB, and I got ">> Flash write error -1 has occured ..."

The PRO and Shield are back in fine shape and I finished my code Morph - will post after this. I have to reboot my notebook to see if the port comes back. [UPDATE] After reboot the system and USB port work fine, but when it went bad it was very bad looking.  It was on running overnight and an upload just worked.
Title: Re: Pro fails to enumerate
Post by: amadren on July 02, 2014, 06:01:33 am
So, I tried with the root user, I created another user.

Here's the error code for the root user:
Code: [Select]
java.io.IOException: Cannot run program "/root/Arduino/hardware/digistump/avr/tools/avrdude": java.io.IOException: error=2, Aucun fichier ou dossier de ce type
at java.lang.ProcessBuilder.start(ProcessBuilder.java:488)
at java.lang.Runtime.exec(Runtime.java:612)
at java.lang.Runtime.exec(Runtime.java:485)
at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:12)
at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:102)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:127)
at processing.app.Sketch.upload(Sketch.java:1672)
at processing.app.Sketch.exportApplet(Sketch.java:1578)
at processing.app.Sketch.exportApplet(Sketch.java:1550)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2399)
at java.lang.Thread.run(Thread.java:701)
Caused by: java.io.IOException: java.io.IOException: error=2, Aucun fichier ou dossier de ce type
at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
at java.lang.ProcessImpl.start(ProcessImpl.java:81)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:470)
... 10 more


With the other user, I can't select the port. So, I tried with sudo ./arduino and I have the same error (that's normal :p)

There's a weird thing: when I have to select the port, there's only  /dev/tty0 but I'm quite sure that it's not correct.

I used lsusb and here's the output:

Code: [Select]
Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 011 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 003: ID 0738:1705 Mad Catz, Inc.  //My mouse
Bus 008 Device 002: ID 04f2:1060 Chicony Electronics Co., Ltd // The Digispark?
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 010 Device 002: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader // An SD reader
Bus 010 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Also, I've verified, and the file exists in both /root/Arduino/hardware and /arduino-1.5.5/hardware and /home/"user"/Arduino

EDIT: On Windows 8.1, I haven't got this problem but my Digispark isn't recognized
EDIT2: When in text mode, it loops on USB Bus 008 Device recognition. A problem like manufacturer ID or something like that (can't copy the code/screen it cause on text only mode)
Title: Re: Pro fails to enumerate
Post by: gogol on July 02, 2014, 06:50:46 am
When the file /root/Arduino/hardware/digistump/avr/tools/avrdude exists and is flagged as executable,  there are some more reasons, why you get and error-message like that:

In the other case, that you can't select the port, I assume, that this user has no access rights to /dev/ttyACMnn, which is normally done, by adding that user to the dialout-group. After adding a user in that group, the user needs to login again, that this change gets active.

To check, whether Linux detects the device, and which tty will be associated, run "udevadm monitor" as root in one terminal window, while you plug the device into the USB port.
Title: Re: Pro fails to enumerate
Post by: amadren on July 02, 2014, 07:21:25 am
I have a linux 64, could you tell me what are the librairies that I have to install?

"You have extended ACL on your files (getfacl/setfacl)
You have either SElinux or App-Armor running, and no rights to execute that file" Nope and nope.

"In the other case, that you can't select the port, I assume, that this user has no access rights to /dev/ttyACMnn, which is normally done, by adding that user to the dialout-group. After adding a user in that group, the user needs to login again, that this change gets active." That was what I was thinking about. That's why I used sudo.
Title: Re: Pro fails to enumerate
Post by: gogol on July 02, 2014, 08:39:09 am
Code: [Select]
dpkg --add-architecture i386
apt-get update
apt-get install ia32-libs

should hopefully do the trick.
Unfortunately some newer Debian-familiy distributions (Ubuntu 13.10/14.04) don't have any longer the "ia32-libs" meta-package on board.
In those cases you need to install all missing libraries by the following recipe:

Code: [Select]
dpkg --add-architecture i386
apt-get update
apt-get install build-essential
apt-get install libc6:i386
apt-get install libncurses5:i386
apt-get install libstdc++6:i386
ldd /root/Arduino/hardware/digistump/avr/tools/avrdude
#watch the output with library is not installed and install it with:
apt-get install libMISSING:i386   #where libMISSING is the name of a missing library
Title: Re: Pro fails to enumerate
Post by: amadren on July 03, 2014, 07:56:57 am
Hi, now it works, thanks but the digispark isn't recognized. I tried 3 computers and that not works.

Maybe it's my digispark
Title: Re: Pro fails to enumerate
Post by: defragster on July 05, 2014, 01:44:58 am
Minor issues I had with Win 7 x64 went away - #1:bad cable - #2:USB2 Hub - #3:USB3: Worked many dozens of times reliably on my Toshiba laptop direct from USB2 port - i5 2.8 years old. The #1:bad cable never worked, the #2&#3:USB worked a few times then failed until I swapped.  neither tried again.

Windows 8.1: I have a 32bit ASUS Tablet/netbook unit and it works!  Full sized USB3 port and a Micro USB port with OTG cable - 7 months old.
> Opened and downloaded 4 sketches with no issues USB3
> Opened and downloaded 4 sketches with no issues Micro USB/OTG
> Undocked from keyboard and uploaded 2 more with no issues OTG

I had a minor issue Win 8.1 and Win 7 machine - Fixed by REMOVING the old version of the 1.5 IDE (leftover from DigiX connect)!  Fresh 6/30 nightly build on both machines works.
Title: Re: Pro fails to enumerate
Post by: gogol on July 08, 2014, 08:59:04 am
As I have now decided to solder male pins on my beta-PRO and the female pins to the  beta-shield,  (http://digistump.com/board/index.php/topic,1467.0.html) I realized, that my beta-board is also not recognized from any of my PC.

Windows is telling about an unrecognized device, while in Linux the "udevadm monitor" is showing nothing at all.  That leads to the conclusion, that only the pullup on D+ is recognized, but the USB initialization is missing.

Are the schematics and the board-layout available, that I can investigate further?  I have seen the solder-jumpers on the back (like on the digix), where I can disable the Zeners. My plan is disabling the zeners and use one of my   external zener cables  (http://digistump.com/wiki/digispark/tutorials/programming#creating_digispark_compatible_clones) to connect them to the corresponding pins.

The blink-program is currently running on the chip,so it was factory loaded.
Title: Re: Pro fails to enumerate
Post by: FourG on July 08, 2014, 05:22:00 pm
Received a replacement Pro in the mail today.  The new Pro enumerated right out of the gate on my Win7 64-bit machine as a libusb device, then disconnected automatically after 5 seconds to run the Blink sketch shipped with the board.  I read the flash out of the new Pro with avrdude and wrote it back into the malfunctioning Pro with no mis-compares on the verify operation.  The malfunctioning Pro's USB enumeration continues to fail with the "Unknown device" message, so I have to assume bad hardware at this point.  I will be sending the malfunctioning Pro back to Digistump for post-mortem, as I don't have the tools to reflow the USB connector to see if that's the culprit.
Title: Re: Pro fails to enumerate
Post by: gogol on July 10, 2014, 07:07:18 am
Edit 2014-07-30:  See this post as well: (http://digistump.com/board/index.php/topic,1455.msg6983.html#msg6983)  My assumption here is slightly off!
---

As I don't have the board layout, I can only guess.  I have opened the D- and D+ solder jumper on the back side of the PRO.   I assume, that one end of the open solder-jumper is now a straight connection to the PINs 3 and 4.  This is true for pin 3 (PB3), however pin 4 has a 300k resistance to the open jumper.

From my understandig the jumper should look like:

Code: [Select]
pin4-----------------------+--------------PB6 of attiny
                           |
                           |
                     solder-jumper
                           |
                         66R5
                           |
             GND ----zener-+---1k5---- +5V
                           |
                           |
                           |
                           
                         USB D-
respective
Code: [Select]
pin3-----------------------+--------------PB3 of attiny
                           |
                           |
                     solder-jumper
                           |
                         66R5
                           |
             GND ----zener-+
                           |
                           |
                           |
                           
                         USB D+

so I would expect 0  Ohm to one end of the open solder jumper for each of D- and D+

Having the schematics and the board layout would help a lot!

Title: Re: Pro fails to enumerate
Post by: gogol on July 10, 2014, 07:32:11 am
Ok connected now my external USB interface to PB3/PB6 and the PRO is immediately recognized!
Title: Re: Pro fails to enumerate
Post by: Paul Nicholson on July 10, 2014, 12:22:22 pm
So I did a closer inspection of my digispark pro and it looks like a component on not attached completely. I marked one of the pictures from kickstarter because I couldn't get a clear picture with my camera. The side facing the usb connector is detached. I have no idea what implications that would have on its usage but maybe it explains why mine will not enumerate.
Title: Re: Pro fails to enumerate
Post by: gogol on July 11, 2014, 12:19:04 am
@digistump:  I would really like to see the board-layout for better understanding.  Right now it looks for me, that a via is not properly connected. As I have 0 R from PB3/6 to pin3/4, but 300k between pin4 and the solder-jumper.
But things are to small to identify details. ...
Title: Re: Pro fails to enumerate
Post by: defragster on July 11, 2014, 01:55:16 am
I just opened my second Pro Beta and I see two anomalies - open solder pads [red boxes] where two resistors are standing on end [fuchsia line on up end]. Near the USB end on two sides of the mount hole.  Lucky I picked the other one first - and had two choices - will return without applying power.
Title: Re: Pro fails to enumerate
Post by: defragster on July 11, 2014, 02:52:26 am
@Paul_N - is this the 'part' you are seeing off a bit? [beside the 680 resistor] This is my #1 Pro and it seems connected with shiny solder on both ends.
Title: Re: Pro fails to enumerate
Post by: gogol on July 11, 2014, 03:45:49 am
Attaching the front and backside from my pro.
After the test with external zeners/resistors was successful, I tried to bridge pin4 to the solder jumper (assuming that I could fix this way a broken via).
I closed both solder jumpers with a small solder blob, but there must be more defective, as it still gets not recognized.

However I can't see any solder failures like those posted above.  Perhaps some diodes have the wrong orientation, but for all that we need schematics and layout-information :-(
Title: Re: Pro fails to enumerate
Post by: gogol on July 11, 2014, 03:58:14 am
Watching the board, the parts must be:
Title: Re: Pro fails to enumerate
Post by: Paul Nicholson on July 12, 2014, 09:58:47 pm
@Paul_N - is this the 'part' you are seeing off a bit? [beside the 680 resistor] This is my #1 Pro and it seems connected with shiny solder on both ends.

@defragster yes, that is the part that is only connected on one side.
Title: Re: Pro fails to enumerate
Post by: defragster on July 13, 2014, 03:47:47 am
Mine stopped working after many hours of taking uploads (1 or 2 hundred likely), also no power LED flash on reset button (is that expected?)

I get 'USB Device Not Recognized' on win 7 now every time it connects [USB2 and USB3 and UNO works].  Downloaded fresh bootloader and AvrDude

I'm trying some OLED code so I have an UNO right here and I got it to work - after telling it to -F ignore the signature check - avrdude got verification - but same error connecting?  And no power LED flash on reset.  Is it valid to expect the sig check to fail?

Quote
C:\Users\Tim\Documents\Arduino\avrdude>avrdude -p attiny167 -c arduino -P com3 -
U flash:w:ProBootloaderR2.hex:i

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATtiny167 is 1E 94 87
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.


C:\Users\Tim\Documents\Arduino\avrdude>avrdude -p attiny167 -c arduino -P com3 -
U flash:w:ProBootloaderR2.hex:i -F

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATtiny167 is 1E 94 87
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be perform
ed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "ProBootloaderR2.hex"
avrdude: writing flash (16384 bytes):

Writing | ################################################## | 100% 0.04s

avrdude: 16384 bytes of flash written
avrdude: verifying flash memory against ProBootloaderR2.hex:
avrdude: load data flash data from input file ProBootloaderR2.hex:
avrdude: input file ProBootloaderR2.hex contains 16384 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.06s

avrdude: verifying ...
avrdude: 16384 bytes of flash verified

avrdude: safemode: Fuses OK (H:00, E:00, L:00)

avrdude done.  Thank you.
Title: Re: Pro fails to enumerate
Post by: gogol on July 14, 2014, 08:52:57 am
still nothing from digistump? 
I haven't seen him in the board since over a week. No answer to email @support as well.  :-(
Title: Re: Pro fails to enumerate
Post by: defragster on July 14, 2014, 10:34:23 am
Production and Timeline Update posted Fri 7/1, same day I got my last email from digistump.  But unanswered email since then.

He said moisture in the solder paste stood up my resistors and they usually catch it..

I'm trying to get OLED to work on the PRO and have a 95% solution with graphics.  digistump offered his starting text only libraries and some feedback I needed to get going - then I found a set with graphics that works - except some screen garbage.  I've pelted him with a few emails as I worked and then disabled my PRO  :-[
Title: Re: Pro fails to enumerate
Post by: FourG on July 16, 2014, 02:19:09 pm
I'm trying some OLED code so I have an UNO right here and I got it to work - after telling it to -F ignore the signature check - avrdude got verification - but same error connecting?  And no power LED flash on reset.  Is it valid to expect the sig check to fail?

C:\Users\Tim\Documents\Arduino\avrdude>avrdude -p attiny167 -c arduino -P com3 -U flash:w:ProBootloaderR2.hex:i

I had similar signature issues when I tried to re-program my Pro with my Uno.  It turned out I had to pass a baud rate (-b 19200) to avrdude to make the signature mis-match go away:

avrdude -p attiny167 -c arduino -P [COM PORT OF YOUR ARDUINO] -b 19200 -U flash:w:ProBootloaderR2.hex:i
Title: Re: Pro fails to enumerate
Post by: defragster on July 16, 2014, 04:39:43 pm
Does your power LED go dark/flash at all when you hit RESET?  I'll have to set up to try again as I still have the unit since I haven't heard from Digistump.  Avrdude confirmed a verify in the end - not sure the garbage in could have equaled the garbage out.
Title: Re: Pro fails to enumerate
Post by: FourG on July 16, 2014, 05:57:09 pm
The power LED on which board, the Pro or the Uno?  I think I also had to bridge the GND and Reset on the Uno with a 10 uF cap after I flashed the programmer sketch to it, per the Arduino Wiki's instructions (http://arduino.cc/en/Tutorial/ArduinoISP).
Title: Re: Pro fails to enumerate
Post by: defragster on July 16, 2014, 07:05:45 pm
Power on the Pro - mine is just on - I was not sure if it was designed to flash off on reset or not.
Title: Re: Pro fails to enumerate
Post by: digistump on July 17, 2014, 05:26:48 pm
The LED will not go out on reset - it is hard wired to the 5v line

The uno does have some timing issues sometimes when programming these - setting the baud may help - an avrisp or similar is even better.

I'm catching up on all emails as fast as possible - thank you all for your patience
Title: Re: Pro fails to enumerate
Post by: defragster on July 17, 2014, 07:46:24 pm
Reconnected UNO and added baud to command line and http://digistump.com/wiki/digispark/tutorials/proisp (http://digistump.com/wiki/digispark/tutorials/proisp) brought my PRO back to life:

C:{...}\Arduino\avrdude>avrdude -p attiny167 -c arduino -P com3 -b 19200 -U flash:w:ProBootloaderR2.hex:i

thx ;D
Title: Re: Pro fails to enumerate
Post by: digistump on July 18, 2014, 12:00:04 am
@defragster - awesome - if by any chance you can duplicate what killed it, that'd be great to see if the new firmware version is as tough as we hope
Title: Re: Pro fails to enumerate
Post by: defragster on July 18, 2014, 12:12:09 am
I'm on it.  It was the OLED code work - over and over . . .

NOTE: The OLED dot grid is GONE though - so I suspect the bootloader change helped that.  Except right margin garbage still there - the Code I found is running cleaner!  Text can flow over there - but the Clear routine falls short, where it worked on the UNO.

Hoping that means some conflict has been resolved and I won't see it again.
Title: Re: Pro fails to enumerate
Post by: amadren on July 19, 2014, 09:34:23 pm
Hi, just received my digispark replacement but it's not connecting to the computer :/

It's powered correctly (the led is blinking) but nothing else
Title: Re: Pro fails to enumerate
Post by: defragster on July 19, 2014, 09:50:10 pm
Obvious things . . . I had a cable the other day that wouldn't connect.  If you can try different cable use a different USB port - don't use a hub - (maybe try a hub).  Give the board a close look for soldered component connections.
Title: Re: Pro fails to enumerate
Post by: amadren on July 19, 2014, 10:07:59 pm
That's what I did :/
Title: Re: Pro fails to enumerate
Post by: defragster on July 20, 2014, 12:02:57 am
Have you got an UNO?  You could try to install the new bootloader like I just did.  Only Digistump will know what he sent you . . .

What OS?  Does it just ignore plugging it in - or pop up saying it had some failure to recognize it? 
Title: Re: Pro fails to enumerate
Post by: amadren on July 20, 2014, 12:23:04 am
On windows 8.1 and Kali Linux, just like it doesn't even exists :/ I'll try the method with the UNO
Title: Re: Pro fails to enumerate
Post by: gogol on July 21, 2014, 07:22:12 am
I figured now out, that my PRO is only detected on some USB ports.

On two notebooks and one PC it is not connected at all, no matter which OS is booted.
On one notebook (Thinkpad T400) and one PC (Shuttle ds437) it is recognized.
On the Thinkpad only on one of the three built in USB 2.0 ports, on the shuttle on all 4 USB 2.0 ports (but not on the USB 3.0 ports).

On all the ports, where the PRO is not detected, my DigiX, and a original DUE as well as a Arduino Micro are detected on the very same cable!
I checked that with three cables!

When Linux is booted, the command "udevadm monitor" doesn't show a single line, however when Windows is booted and unknown USB device is reported for the PRO.

When I take the PRO and open the solder-jumpers for the Zeners and use my Digispark adapter (that digispark, where I have removed the broken attiny) as USB adapter, it is recognized!
http://digistump.com/wiki/_media/digispark/tutorials/removed-attiny.jpg?cache=&w=900&h=600
http://digistump.com/wiki/digispark/tutorials/programming#creating_digispark_compatible_clones

That means, as soon as I use the Zeners and resistors from the original Digispark, instead of those from the PRO, it is recognized!

Title: Re: Pro fails to enumerate
Post by: gogol on July 22, 2014, 09:05:35 am
I managed to get hands on a DSO and connected that to D+ and D- in the USB-cable.

I made several measurements, and the positive and negative screens are looking almost the same.

D+ is green and D- is yellow.  One step in X-axis is equal to 1 ms, one step in y-axis is equal to 1V.    I had the USB connected to a notebook, which was running only from battery, to avoid conflicts with possible potential-differences.
D+ has a base current from -0.7V,
D- is pulled up to around 2V and in the situations, where the PRO is detected, it goes up to 3.8V and down to 0V.
In the situations where the PRO is not detected, it D- reaches only 2.7 V with only some small peaks going higher.

I assume, that the pullup resistor is to big, so that the current can't get to the expected level by the timing, when there is a somewhat higher serial resistance in the D- line of the USB host.

Where are the USB cracks?
Title: Re: Pro fails to enumerate
Post by: gogol on July 22, 2014, 09:06:59 am
and here the cases, where the PRO was not detected, as those were to big for one post:
Title: Re: Pro fails to enumerate
Post by: gogol on July 22, 2014, 09:24:37 am
unfortunately I had only the PRO with me and have not measured the original digispark. Need to do that in addition.

Rethinking, I would have expected, D- idling around 3.6V with signal peaks down to 0V like figure B in that documentation:
http://www.networktechinc.com/usb-prots.html

Perhaps there is a problem with the zener diode?
Title: Re: Pro fails to enumerate
Post by: gogol on July 22, 2014, 01:23:56 pm
OK, here are now two pictures with 5 us timing for the first sample.   Unfortunately I have changed the colors, but the lower one is still D-.

One is the failing USB port with the onboard zeners, the next is the same USB port with open solder jumpers and the zeners from my original digispark connected to. (That one, where I have removed the broken attiny).

Looks like, that the zener from D- is reducing the voltage too much!
Title: Re: Pro fails to enumerate
Post by: gogol on July 23, 2014, 01:43:27 am
and one more:
in this picture I have overlayed both pictures and added a clock scale.

What I currently don't understand:  You see, that D- is for about one clock on the expected voltage around 3.5V
After that pulse the voltage breaks down in both situations, however much stronger in the situation, where the PRO is not detected.

I see further, that at the beginning D- is not synchronous to the D+ clock, but gets synched with the first D+ pulse.

@cpldcpu, Bluebie:  can you bring some light into, what is happening on the USB level?

Which part can be responsible, that the current breaks down after one clock under certain circumstances?  As you can see, D- is also able to stay high for 3 clock pulses.

Title: Re: Pro fails to enumerate
Post by: defragster on July 23, 2014, 02:54:46 am
@gogol - does your Pro have the latest bootloader? As I read you are doing good work and indeed seeing hardware showing a measurable difference preventing communication.  But it seems there are more than a couple intermittent edge cases where the PRO got 'bricked' then came back better with a fresh bootloader - weak/odd signals could explain that - but the new code seems more robust - maybe Digistump addressed some symptoms but not the root problem?

BTW: My USB 2 & 3 laptop ports generally work and my HUB didn't.  At least once my USB 3 port went 'offline' until a reboot happened - something caused a ruckus or overdrew current (at higher USB 3 levels unless I have a weak/early one coming up on 3 years old)
Title: Re: Pro fails to enumerate
Post by: gogol on July 23, 2014, 03:42:02 am
I have the latest bootloader installed. However from my observations, that can't have anything to do with code.

As you see, everything is fine, when I use the other set of zeners and resistors from an original digispark. The good point on the PRO is, that there are solder-jumpers, where you can disconnect the on-board V-USB components, allowing this trick.

Its the very same code on the very same attiny running in both cases.  The difference is made just by the external components!


---
@Digistump:  I already asked that question in a parallel thread: http://digistump.com/board/index.php/topic,1468.0.html

Are the changes in the github repo related to the current Beta test?  Or has that newest bootloader you have linked in this thread other changes incorporated?

Title: Re: Pro fails to enumerate
Post by: defragster on July 23, 2014, 04:11:56 pm
I saw your #1468 note weeks back.  Indeed bad diode would be a problem - perhaps the code change addressed some symptoms.

Interesting you have the later bootloader to no affect.  I asked because mine got bricked - and my 'events' since flashing the new code have all been non-fatal.
Title: Re: Pro fails to enumerate
Post by: gogol on July 24, 2014, 01:14:28 am
The last code changes in github dealt with the calibration and storage of the last calibration value together with the uploaded sketch, so that a standalone device (which can't calibrate against an USB-Host) will run more exactly. That is the reason, why I am asking about what triggered the changes and if there might be more.

The problem I am seeing is, that the high-level is under certain circumstances to low, to be detected as high!  USB allows for 2.8V-3.6V for HIGH, and D- is for sure ways below that.  I can imagine, that better calibration helps detecting the weaker HIGH levels better, but that can't be the solution.

The whole picture is looking (for D-) this way:


 USB-Host .                        .       Digispark
          .                        .    Vcc
          .                        .    |
          .                        .   1.5k
          .                        .    |
 >---+----------------------------------+----68R---<
     |    .                        .    |
    15k   .                        .  3.6 Zener
     |    .                        .    |
    GND   .                        .   GND


So the question is, under which condition the current of D- breaks in, and under which conditions not.  The Zener seems to work, as, otherwise the higher level could never be reached. Or am I wrong?
Title: Re: Pro fails to enumerate
Post by: defragster on July 24, 2014, 03:33:19 am
interesting - I've been hanging my Pro off a USB battery box sometimes for long runs (now I wonder if that relates to my issues ...) - is the update on each power up - or only when data xfers?  That could be a symptom changer as you describe it - but not a solution if the diode isn't running cleanly and the signal is compromised.
Title: Re: Pro fails to enumerate
Post by: gogol on July 24, 2014, 04:06:26 am
interesting - I've been hanging my Pro off a USB battery box sometimes for long runs (now I wonder if that relates to my issues ...) - is the update on each power up - or only when data xfers?  That could be a symptom changer as you describe it - but not a solution if the diode isn't running cleanly and the signal is compromised.

This is the comment, I was reading in github: https://github.com/micronucleus/micronucleus/commit/1e6cfd178fc302e5dd269444063745dd7b7a66c0

Jul 14th and 15th some more changes were pulled into, but unfortunately I miss discussion/comments why exactly this is happening, and which error is fixed with.

Title: Re: Pro fails to enumerate
Post by: gogol on July 30, 2014, 07:11:22 am
In the  previous post  (http://digistump.com/board/index.php/topic,1455.msg6840.html#msg6840) I assumed, that the schematics looks like that, derived from the original digispark and the V-USB reference.

Code: [Select]
pin4-----------------------+--------------PB6 of attiny
                           |
                           |
                     solder-jumper
                           |
                         66R5
                           |
             GND ----zener-+---1k5---- +5V
                           |
                           |
                           |
                           
                         USB D-
respective
Code: [Select]
pin3-----------------------+--------------PB3 of attiny
                           |
                           |
                     solder-jumper
                           |
                         66R5
                           |
             GND ----zener-+
                           |
                           |
                           |
                           
                         USB D+

Now after looking through the schematics, I received from Erik, I see, that it looks like that:


Code: [Select]
pin4-----------------------+--------------PB6 of attiny
                           |
                           |
                     solder-jumper
                           |
                           |
             GND ----zener-+---1k5---- +5V
                           |
                         66R5
                           |
                           |
                           
                         USB D-
respective
Code: [Select]
pin3-----------------------+--------------PB3 of attiny
                           |
                           |
                     solder-jumper
                           |
                           |
             GND ----zener-+
                           |
                         66R5
                           |
                           |
                           
                         USB D+

Which means, the 66R5 series resistor comes after the Zener diode, which will pull the output of the attiny to 3.6V.  I have not enough electronic background to estimate, if that may be a problem for the attiny itself, when a high output is something like partially shorted to reduce the voltage to 3.6V (or even a little bit further).  That means, that the difference of 1.4V needs to be "burned" in the attiny.

When I use my original digispark as V-USB interface, the 66R5 resistor is between the pin and the zener diode, like in the original attiny. In that case, the 1.4V are burned from this resistor, resulting in approx 20mA, which is ok for the pin of the attiny. With a lower internal impedance, the current might go up to 100, 200mA.


Where are the electronic gurus??

Title: Re: Pro fails to enumerate
Post by: defragster on July 30, 2014, 09:54:04 am
I know enough to think I see why that is different going one direction - but these are bidirectional lines?  So the effect that clipped then dropped voltage one way is now dropping then clipping (less) that direction and the opposite change the other direction.  Will the voltage tend to need this conditioning one way more than the other as it isn't symmetric.
Title: Re: Pro fails to enumerate
Post by: saket on April 16, 2016, 05:06:52 am
Hi,
I am using digispark Attiny85 for last one week and it was working fine, but today suddenly it started showing following error while uploading
Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device search timed out
 Please reply. i am on a deadline.
I have also read your solution on same issue with the pro, do I need to burn the bootloader? If yes then  how?
Title: Re: Pro fails to enumerate
Post by: pitchakorn on May 16, 2019, 10:31:04 pm
OK nice

ufabet (http://www.ufabet99.vip)