cancel
Showing results for 
Search instead for 
Did you mean: 

USB is not recognized by PC when PIMA USBX disables UX_PIMA_WITH_MTP_SUPPORT

esxu
Associate II

I am developing a custom embedded device that uses PIMA with USBX in order to access the SD card contents of my PCB from a PC through USB.

When UX_PIMA_WITH_MTP_SUPPORT is enabled, the device is correctly detected by Windows and communication works properly.

However, in order to correctly represent a hierarchical folder structure in Windows Explorer using MTP, I would need support for command 0x9805 (GetObjPropList, CMD 00000043). As far as I can see, USBX does not implement this command.

To avoid implementing the full MTP property system myself, I wanted to use the more generic PIMA behavior instead, where the host requests ObjectHandles each time the user enters a folder, similar to how old digital cameras behaved.

The issue is that when I disable UX_PIMA_WITH_MTP_SUPPORT, the PC no longer even recognizes that a USB device is connected. If I enable the macro again, everything works correctly.

So my question is:
Is disabling UX_PIMA_WITH_MTP_SUPPORT expected to completely break USB enumeration on Windows? Or is there some additional descriptor/class configuration required when using the generic PIMA mode without MTP support?

1 REPLY 1
esxu
Associate II

I’ve been investigating this topic further, and I wanted to clarify my previous assumption regarding GetObjPropList (0x9805).

At first, I thought this command would be necessary to correctly represent a hierarchical folder structure in Windows Explorer when using MTP. That was the reason I mentioned it. However, after digging deeper into the MTP/PIMA behavior and how USBX implements the class, I now realize I was most likely wrong about that assumption.

It seems that GetObjPropList is part of the more advanced MTP object property system, and not strictly required for basic hierarchical navigation, which is more tied to how object handles and associations are managed rather than property enumeration alone.

That said, I still have the main issue unresolved:

When I disable UX_PIMA_WITH_MTP_SUPPORT, the device stops being recognized by Windows altogether. The USB enumeration fails completely, even though I expected a more “basic PIMA” mode to still expose the device and allow object-based navigation.

When the macro is enabled again, everything works correctly and the device is properly detected and accessible.

Also, this is my first time working with MTP, so it is very likely that I am misunderstanding parts of the protocol or mixing concepts that don’t fully align. If some of my statements don’t make perfect sense from an expert perspective, that would probably be the reason.

So my main question remains:

Is this behavior expected? In other words, does disabling UX_PIMA_WITH_MTP_SUPPORT imply that the MTP class layer is entirely removed (including required descriptors and handlers for Windows to recognize the device)?

Or is there an additional configuration step required in USBX to properly expose a non-MTP PIMA device (for example, different class/subclass definitions or mandatory callbacks) that I might be missing?