Hello,

Your posts are kind of hard to reply to, sorry if I miss something.
I'll try to get everything into this message.

On Mon, Aug 7, 2017 at 10:41 AM,  <tu...@posteo.de> wrote:
> Hi,
>
>
> On 08/06 07:04, R0b0t1 wrote:
>> On Sun, Aug 6, 2017 at 11:50 AM,  <tu...@posteo.de> wrote:
>> > When I plug in such a little board into my PC, demesg
>> > reports:
>> > [ 1429.834140] usb 7-4: new low-speed USB device number 15 using ohci-pci
>> > [ 1429.965142] usb 7-4: device descriptor read/64, error -62
>> > [ 1430.203151] usb 7-4: device descriptor read/64, error -62
>> > [ 1430.438161] usb 7-4: new low-speed USB device number 16 using ohci-pci
>> > [ 1430.569151] usb 7-4: device descriptor read/64, error -62
>> > [ 1430.803174] usb 7-4: device descriptor read/64, error -62
>> > [ 1431.038184] usb 7-4: new low-speed USB device number 17 using ohci-pci
>> > [ 1431.456157] usb 7-4: device not accepting address 17, error -62
>> > [ 1431.582204] usb 7-4: new low-speed USB device number 18 using ohci-pci
>> > [ 1432.000209] usb 7-4: device not accepting address 18, error -62
>> > [ 1432.000244] usb usb7-port4: unable to enumerate USB device
>> >
>>
>> >
>> > My first thought was: The micronucleus bootloaed is missing or
>> > is defective...
>> >
>> > But plugging in the board into my Android tablet (the tablet runs
>> > Lollipop and is nothing special at all beside being rooted) via
>> > an OTG cable and using lsusb after that, it shows
>> > Bus 001 Device 003 ID 16d0:0753 MCS Digistump DigiSpark
>> >
>>
>> What the dmesg output is saying is that your USB hardware has reported
>> a communication error to the driver. It is my guess that the ATtiny85
>> is not meeting the timing requirements for USB.
>
> The above is the only part of the dmesg log regarding this usb
> "device"...
>
> If I plug it into a usb-port, it "works"... (read: will be recognized
> according to dmesg, but still the udev rules dont get triggered, so
> I still get nothing under /dev/...
>

You should look more closely at the dmesg output, though admittedly
some of this might not be obvious without reading the USB
specification. The computer being unable to read a descriptor or the
device failing to accept an address are things that will prevent the
device from properly registering on the bus. The initial handshake
fails to complete.

>
>> Looking at the board there does not seem to be a crystal oscillator
>> which most people would consider necessary for doing USB
>> communication. This is an oversight on DigiStump's part and it is very
>> likely you will not be able to fix the communication issues. You
>> should contact them and tell them that your computer will not
>> recognize their device and that you suspect it is because the clock is
>> too inaccurate.
>
> ...the board is a thumbnail thing:
> http://digistump.com/products/1
>
> No crystal. It is not an original digistum and had cost me less than 1
> EUR...so not such a painful loss...
>
>
>> >
>> > What can I do to make this Digispark being correctly recognized?
>> >
>> > Thank you VERY much for any help in advance!
>> >
>>
>> Three things:
>>
>> 1) Return the one you bought and get a new one. The ATtiny85's
>> internal oscillator might be at the end of the bell curve but within
>> manufacturer tolerance, which isn't enough to produce a USB signal
>> close enough to the specified frequency. Expect the seller to pay for
>> return shipping.
>
>   Returning the board does cost more than the board and I haven't
>   any hope that this will change anything: I have six of them and none
>   works. "The design can be improved..." to be friendly.
>
>
>> 2) You can calibrate the oscillator using instructions in this
>> application note:
>> http://www.atmel.com/Images/Atmel-2555-Internal-RC-Oscillator-Calibration-for-tinyAVR-and-megaAVR-Devices_ApplicationNote_AVR053.pdf.
>> This process still might not get you close enough.
>
>   I have no oscilloscope nor a frequency counter.
>   That is above my financial possibilities...
>
>> 3) Add a crystal oscillator to the ATtiny85 and change its fuses to
>> use the oscillator. You will need to recompile the firmware if the
>> crystal is a different frequency from the internal oscillator.
>
>   There is not enough space on the board.
>

Well, if you can't do any of those and if the board doesn't have level
shifters that might be affecting the signal then you probably won't be
able to use the board. If you send the hardware developer a message
that the board has failed to work with a device you will be doing them
a favor.


On Mon, Aug 7, 2017 at 10:51 AM,  <tu...@posteo.de> wrote:
> I ordered a similiar board yesterday, with a more reasonable setup:
> ATmega32u4 and a attached sdcard slot for the flash memory.
> The ATmega32u4 has a fully fledged USB 2.0 stack (is it called a "stack"?)
> and does not bitbang the whole stuff but "talks USB natively".
> I have gathered some hope so far, that this thingy will
> a) work with USB < 3.0
> b) is more stable and more versatile

The software is the stack, the device itself is said to have a USB
interface or peripheral.

The ATmega32U4 is a good choice but it can be exceedingly hard to use
without the Arduino wrappers. It's a good idea to learn how to use it,
but a lot of existing software you will find was personally very hard
to read, even after referring to the USB specification and doing a
bunch of searching.

Typically the suggestion is to avoid tinyAVRs (or microcontrollers of
similarly limited capabilities) for development work and only choose
them after you know what you are doing. If you have problems with the
ATmega32U4 you should get a board with, say, an ATmega328PA and use a
serial to USB converter for a while.


On another note, you should look up needle probes for multimeters and
oscilloscopes. You can also poke into insulated wires with them.
Working with SMD components isn't too hard, the solder tends to orient
them for you. For a lot of parts a hot air rework station is helpful
and is not too much money. If you are going to continue in this
direction you should get one as almost all modern parts come only in
SMD packages. Buying premade boards can only get you so far (but for
most people it's enough).

R0b0t1.

Reply via email to