Gentoo Archives: gentoo-user

From: tuxic@××××××.de
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] USB device (ATtiny86 w. mcronucleus bootloader) not recognized ?
Date: Mon, 07 Aug 2017 15:42:16
Message-Id: 20170807154150.nke2vp3tfq4vyz4d@solfire
In Reply to: Re: [gentoo-user] USB device (ATtiny86 w. mcronucleus bootloader) not recognized ? by R0b0t1
1 Hi,
2
3
4 On 08/06 07:04, R0b0t1 wrote:
5 > On Sun, Aug 6, 2017 at 11:50 AM, <tuxic@××××××.de> wrote:
6 > > When I plug in such a little board into my PC, demesg
7 > > reports:
8 > > [ 1429.834140] usb 7-4: new low-speed USB device number 15 using ohci-pci
9 > > [ 1429.965142] usb 7-4: device descriptor read/64, error -62
10 > > [ 1430.203151] usb 7-4: device descriptor read/64, error -62
11 > > [ 1430.438161] usb 7-4: new low-speed USB device number 16 using ohci-pci
12 > > [ 1430.569151] usb 7-4: device descriptor read/64, error -62
13 > > [ 1430.803174] usb 7-4: device descriptor read/64, error -62
14 > > [ 1431.038184] usb 7-4: new low-speed USB device number 17 using ohci-pci
15 > > [ 1431.456157] usb 7-4: device not accepting address 17, error -62
16 > > [ 1431.582204] usb 7-4: new low-speed USB device number 18 using ohci-pci
17 > > [ 1432.000209] usb 7-4: device not accepting address 18, error -62
18 > > [ 1432.000244] usb usb7-port4: unable to enumerate USB device
19 > >
20 >
21 > >
22 > > My first thought was: The micronucleus bootloaed is missing or
23 > > is defective...
24 > >
25 > > But plugging in the board into my Android tablet (the tablet runs
26 > > Lollipop and is nothing special at all beside being rooted) via
27 > > an OTG cable and using lsusb after that, it shows
28 > > Bus 001 Device 003 ID 16d0:0753 MCS Digistump DigiSpark
29 > >
30 >
31 > What the dmesg output is saying is that your USB hardware has reported
32 > a communication error to the driver. It is my guess that the ATtiny85
33 > is not meeting the timing requirements for USB.
34
35 The above is the only part of the dmesg log regarding this usb
36 "device"...
37
38 If I plug it into a usb-port, it "works"... (read: will be recognized
39 according to dmesg, but still the udev rules dont get triggered, so
40 I still get nothing under /dev/...
41
42
43 > Looking at the board there does not seem to be a crystal oscillator
44 > which most people would consider necessary for doing USB
45 > communication. This is an oversight on DigiStump's part and it is very
46 > likely you will not be able to fix the communication issues. You
47 > should contact them and tell them that your computer will not
48 > recognize their device and that you suspect it is because the clock is
49 > too inaccurate.
50
51 ...the board is a thumbnail thing:
52 http://digistump.com/products/1
53
54 No crystal. It is not an original digistum and had cost me less than 1
55 EUR...so not such a painful loss...
56
57
58 > >
59 > > What can I do to make this Digispark being correctly recognized?
60 > >
61 > > Thank you VERY much for any help in advance!
62 > >
63 >
64 > Three things:
65 >
66 > 1) Return the one you bought and get a new one. The ATtiny85's
67 > internal oscillator might be at the end of the bell curve but within
68 > manufacturer tolerance, which isn't enough to produce a USB signal
69 > close enough to the specified frequency. Expect the seller to pay for
70 > return shipping.
71
72 Returning the board does cost more than the board and I haven't
73 any hope that this will change anything: I have six of them and none
74 works. "The design can be improved..." to be friendly.
75
76
77 > 2) You can calibrate the oscillator using instructions in this
78 > application note:
79 > http://www.atmel.com/Images/Atmel-2555-Internal-RC-Oscillator-Calibration-for-tinyAVR-and-megaAVR-Devices_ApplicationNote_AVR053.pdf.
80 > This process still might not get you close enough.
81
82 I have no oscilloscope nor a frequency counter.
83 That is above my financial possibilities...
84
85 > 3) Add a crystal oscillator to the ATtiny85 and change its fuses to
86 > use the oscillator. You will need to recompile the firmware if the
87 > crystal is a different frequency from the internal oscillator.
88
89 There is not enough space on the board.
90
91 > It might work on your phone and not your desktop because of
92 > differences in the USB hardware (your phone's serial decoder in the
93 > USB hardware performs clock recovery but your PC does not) or because
94 > there are multiple things on a USB hub in your PC and the ATtiny85 is
95 > less accurate than those already present devices. Admittedly I'm
96 > surprised it gets most of the way to registering as a device and then
97 > fails, but I don't think the problem is with the drivers or your
98 > kernel. It's also not very likely to be a problem with the USB code
99 > unless it was reimplemented for DigiStump's product (check against
100 > these libraries
101 > http://www.fourwalledcubicle.com/files/LUFA/Doc/120219/html/_page__alternative_stacks.html).
102 >
103 > R0b0t1.
104 >

Replies