cancel
Showing results for 
Search instead for 
Did you mean: 

How can a signature be added to a driver?

RWilt.1
Associate II

Hello

I'm wanting an STM32 device to communicate with a laptop directly over the USB (i.e. using a CDC module). I've been following ST's "STM32 USB training - 09.3 USB CDC libusb device lab" video.

In the video (at 13:18) they talk about installing a driver using 'inf-wizard'. Everything appears to go well until I attempt to install the driver. As I'm using Windows 10 there is a message saying "System policy has been modified to reject unsigned drivers". Is there a way around this during the development stage?

Regards

Ron

7 REPLIES 7
TDK
Guru

You shouldn't need a driver for USB CDC mode. It will use a native Win10 driver instead. I would skip that step and see if it works.

If you feel a post has answered your question, please click "Accept as Solution".
RWilt.1
Associate II

Thanks for the reply, TDK.

I did try running it and have just tried again but only got a 'Waiting for device connection' message. Further, when I look in the Device Manager the device comes up under 'Other devices' and the device's Properties I get a 'No drivers are installed for this device' message.

You should be able to uncheck that requirement, or find something in the DDK or debug build of Windows.

Microsoft does have some signing tools, you should be able to sign your own executables.

Signing INF/CAT files is more something Microsoft does when your driver passes WHQL testing

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
RWilt.1
Associate II

Hello, Tesla

Do you mean unchecking the 'System policy has been modified...' via 'secpol.msc' or 'Gpedit.msc' as per https://windowsreport.com/edit-group-policy-windows-8-1/ ?

What is strange is that the drivers that are trying to be installed are the same version as already installed on Windows and therefore cannot understand why the STM32 device cannot run already without having to install them (I don't pretend to be an expert on these issues, though).

> Microsoft does have some signing tools, you should be able to sign your own executables.

Heaven forbid. You don't want to touch this cr@p with a 10 ft stick.

> What is strange is that the drivers that are trying to be installed are the same version as already installed on Windows and therefore cannot understand why the STM32 device cannot run already without having to install them ..

TL;DR this is because installing a *driver package* into Windows and having some specific device to use a specific driver package are two different, loosely coupled things. Whenever possible, avoid installing anything, use in-box drivers. Win10 has a decent choice of in-box device classes : at least CDC, HID and WinUSB.

--pa

RWilt.1
Associate II

Thanks for the answers. Still not able to get the laptop to communicate with the NUCLEO.

I've tried the following:

1) On looking on the internet Damogram Labs mentions that 'usbser.sys' is required as a native driver for CDC drivers and that this is automatically loaded for versions above Win 7 (https://damogranlabs.com/2018/02/stm32-usb-cdc/). @TDK and @Pavel mentions that there should be a native driver for the CDC. The use of this appears to be supported by Microsoft (https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-driver-installation-based-on-compatible-ids).

This 'usbser.sys' drive is there. I have restored it to see if that would solve the issue (http://batcmd.com/windows/10/services/usbser/). There is still no driver attached to the NUCLEO board, though it can be seen in Device Manager.

2) I've tried to 'Update Driver' in Properties. I have tried both the following options:

  • 'Search automatically for drivers'
  • 'Browse my computer for drivers' and telling it to look at 'C:\Windows\System32\drivers'

Neither of these solve the issue.

3) I've checked the schematics for the NUCLEO I'm using (F413ZH) and the board used in the original ST example (NUCLEO-F446ZE). They both use the same PCB and components (MB1137), so I'm confident that that it is not a design issue; though it could be that the F413ZH has got damaged though I have got working as a MSD with an SD card.

From what I've learnt I'm not sure yet, that I really need to install the drivers, especially as they been unsigned.

Does anyone have any other suggestions?

Thanks

Ron