MeUSBHost Buffer Overflow after Config Descriptor Read of Bluetooth Dongle


#1

Good evening all!

I have a MeUSBHost connected to an mBot and a DualShock 4 controller that I would like to use to control the mBot (newest firmware and library versions).

So far I have been able to successfully connect the DS4 through USB cable to the MeUSBHost and control the mBot in that way.

Now, as shown in the wireless joystick showcase, I am trying to connect the DS4 via bluetooth using a bluetooth dongle.

However, when I connect the dongle to the MeUSBHost, MeUSBHost::initHIDDevice() returns 0 after an USB_INT_BUF_OVER error condition after the CMD_GET_DESCR, i.e. the CH375 interface chip complains with a buffer overflow when reading the configuration descriptor from the BT dongle (a Trendnet TBW 107).

The source of MeUSBHost.cpp says

    irq = get_desr(2); // max buf 64byte, todo:config descr overflow

so it seems fixing this is on your todo-list?

What can be done in such a case?

Best regards and thanks a lot to the makeblock team for developing those great little robots. My girls (6 and 8) and myself (some 40 years older) love to teach the mBots new tricks with mBlock and the Arduino IDE!

Christian


#2