cancel
Showing results for 
Search instead for 
Did you mean: 

USB Composite Device Driver

Lori B.
Associate III
Posted on September 19, 2016 at 08:59

Hi all, for my project I developed an USB composite device (MSC + CDC) based on an STM32F2.

Since ST doesn't provide an example of a composite device based on the HAL, it wasn't so easy to have my device working, but I did it, also thanks to the help received on this forum.

During my development, I modified the .inf driver file of ST's virtual COM. I assigned a random PID in the ST group (0x5741) with the proper interface for the CDC (&MI_01).

Everything works fine but now I have some questions related to the driver.

My modified driver isn't signed, of course, but I'm able to install it on Windows 7. It isn't so easy to install an unsigned driver on Windows 8/10 though..

It would be a huge effort for me to go through a full Microsoft driver validation and signing process..

So my question is, does ST somehow provide a signed driver for composite devices, since it's possible to develop composite devices with STM32 products, out of the box?

Is there another easier way to obtain my signed driver for my STM32 device, rather than going through the whole process?
7 REPLIES 7
qwer.asdf
Senior
Posted on September 19, 2016 at 12:59

By only modifying the inf file and not the driver's binary file (*.sys) ST's signature is not altered and will be valid, you don't need to re-sign it.

BTW, is there any chance of you sharing your composite device's code?

Lori B.
Associate III
Posted on September 19, 2016 at 14:57

Unfortunately that's not true I'm afraid..

I only modified the [DeviceList] line in the stmcdc.inf file, but when I try to install it, i get an alert saying that the driver is not signed..

Regarding the source code, since there is a lot of request about it, I'm thinking about packing it like a Cube example and sharing it. I will do it as soon as I have some free time..

qwer.asdf
Senior
Posted on September 19, 2016 at 15:14

hmm, yes,

https://social.msdn.microsoft.com/forums/windowsdesktop/en-US/0a1050b7-462f-4129-b720-e6c84ae2b23d/how-can-i-get-new-whck-signed-driver-by-changing-inf-file-only

you are right, sorry for the disinformation, as I wouldn't think MS could do such a, I think, stupid thing and include the inf file in the signature. What harm can be done by changing the inf file? No security vuln can be introduced by that, just MS wanting more and more control on everything, as always..
Walid FTITI_O
Senior II
Posted on September 19, 2016 at 16:32

Hi lori.b,

I recommend these both threads that contains guidelines and explanation about USB composite device's project building which may help you to figure out what you have missed.

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Multiple%20USB%20CDC%20%28USB%20IAD%%20How&currentviews=9776]Thread1

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https%3a//my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32Cube%20USB%20Composite%20device%20CDC%20%2b%20MSC&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5...

-Hannibal-

Lori B.
Associate III
Posted on September 19, 2016 at 17:08

qwer.asdf

I agree with you, such a frustrating situation..

Hannibal

Hi! Well, actually I did.. Expecially the second one, since I started it!

My problem is not about building a composite device (which I already did), but about getting a signed driver for it..
Lori B.
Associate III
Posted on September 21, 2016 at 10:57

I found a solution.

I use ST Link's signed driver, which has a msc cdc composite device mode.

So I set the PID to fake my device as an ST Link.

Maybe it's not a clean solution, but for the moment is ok.

hi there could you send me your example code?

And what do you assigned to your PID?