Hi - Iām new here - Brian pointed me to this thread to get a discussion about getting the Sensel Morph working with Ansible. I work for Sensel, and weāve had to reach out to several USB host makers - Snyderphonics, Expert Sleepers, Endorphines, Squarp, etc - to help them get their firmware to recognize the Morph.
The issue is that the Morph doesnāt appear as only a USB MIDI device - it shows up as several USB devices (that way we can send keyboard events, gaming events, serial events, etc).
The fix has tended to be fairly quick. Hereās one developerās feedback:
On my end, I needed to change my code to prioritize midi devices and stop looking once a midi device was found. The issue for me was that the morph reports itself as both a midi device and a hid device. My USB host code wasnāt expecting that a device would do that, so it would find the midi device, but then keep iterating through the USB report device descriptor and then write over the midi device details with the HID device details that were reported afterward.
I needed to change my code to stop searching once it finds a device, and to search for midi devices first, and then it worked. Most middleware for USB host in micro controllers that I have used either donāt iterate through the full descriptor at all (hard coded to look only at device zero) or canāt understand devices that report with two classes, and would need some code hacking to understand a device that reports as belonging to two classes.
There were two things I had to change to get the Morph working.
The first was the maximum number of interfaces per USB descriptor. I
had it set to 5, but the morph needs 7. Obviously on a non-embedded
system with dynamic memory allocation thatās never an issue.
The other was a bit more subtle. The Microchip USB code treats it as a
fatal error if a HID device doesnāt respond to a āset idleā. The code
comment is:
/* SET IDLE failed. As per specification SET IDLE
is optional
* for both boot and non-boot mouse.For e.g. Microsoft mouse
* does NOT support SET IDLE request and STALLs it.
* However for keyboard it is mandatory. */
I had to remove this check for the morph to work.
Should I put this as an issue in github?