Main Site Documentation

CerbFamily - USB Host Help probably needed


@ TWIMC - Using strait forward, all in the same code file, RawDevice USB Host on a CerbuinoBee or CerbuinoNet it is all going fine, even initalising the connected dusb device, but when I get to the endpoint and setup the pipe, I must do it with a fixed 5 seconds timer to perform the pipe.transfer that is stable and runs I expect forever. Now looking at the incoming data I’m suspecting it misses some. There is this FF FF data that inits a measurement but comes only at the beginning and than no more, so I guess I’m missing data/ usb reports of always 8 byte long … :think:

Going below the 5 seconds, if gives me errors 2 from the controller.getlasterror, the shorter the time the more errors. :wall:

If I implement it, like the codeshare or, in a seperate class, it freaks out immediately with those same errors … again wall banging :wall:

Q: In the endpoint there is this Interval how is that to take, since when I use it, in my case bInterval = 1, as milliseconds the Controller throws errors of number 2. Whatever that means ?

So I chose to implement it with the 5 second timer, but that doesn’t give a correct result if comparing to the protocoll details of the sensor hub @

Anyone any idea what is wrong here ?


Are we talking about a non standard usb device?


It is a HID with USB 1.1 having only one endpoint of type interrupt


@ PiWi - Have you tried this on a non-cerb board to see if it behaves the same?


@ John - I guess a PC doesn’t count, there it works as expected … I’ve got it communicating without errors on a cerbuinobee in a separate class as yours on codeshare, but had to set the Interval on the pipe to a hardcoded 2500. Runs at the moment for more than 20000 iteratios without an error and still going strong.

With 2500, I’ve got the impression when looking at the raw USB data, sometimes it has been transferred twice. With 5000, it looks like it’s missing some data …

With the update to, one has not to insert the device, the cerbuinobee picks it up just with a little delay after boot …

I’ll try my raptor to see where it goes … and let you know …


@ John - had to upgrade my raptor to and this time the tinybooter as well.

Started a new gadgeteer project added a couple of mods in the designer, copied over the cerb code,adjusted the namespace, compiled, deployed and ran it.

The device is already lit so power is there but no event is generated, neither by having it connected at boot time nor by re-inserting …

Tried both sockets 6 & 7 no change same behavior, doesn’t catch the device …


@ PiWi - Error 2 is a generic transfer error. bInterval is a measure of frames to poll. In low speed devices, 1 frame is 1ms. As said in the other thread, for us to easily debug the issue, we need to have the problem device to work with.