02-23-2022 09:47 PM - edited 02-23-2022 09:49 PM
Hello,
I tried to communicate with a USB device using LabVIEW. And I followed the procedure online:
1. Install the NI-VISA (version 21.0, my Labview version is 2021 community).
2. Generate a .inf file in NI-VISA Driver Wizard:
3. Move the .inf file to C:\Windows\INF.
4. Generate a .cat file and a certificate, and sign the .cat file using the certificate, as the steps on https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YH1PCAW&l=en-US.
5. Right click the .inf file and choose "install".
However, it reports an install error "The system cannot find the file specified" when I do step 5.
And there is an error in the installation information file C:\Windows\INF\setupapi.dev.log.
I have tried rebooting the computer, re-installing LabVIEW and even the whole NI software, and doing this again on other two computers. But these all didn't work and turned to the same result.
02-23-2022 10:07 PM
Please provide more information about the "device", make, model and manual.
02-23-2022 11:09 PM
The device is a development board fabricated by ST, STM32F746G-DISCO. The manual is attached.
It's shown in the NI-VISA Driver Wizard as the follow picture.
And a USB communication program running on the MCU has been loaded in it.
Thanks a lot.
02-24-2022 05:49 AM - edited 02-24-2022 05:56 AM
The particular subdevice of the USB Composite Device that you selected seems to be a HID device. As such it is automatically claimed by the Windows HID driver as soon as you plugin the device and there is no easy way to claim it for NI-VISA.
Maybe you need to tell us first what you are trying to achieve. Even if you could claim that interface for NI-VISA you are not even halfway there to be able to use it. You would need to know the exact data byte structure of the HID messages in order to be able to decode the information.
And unless you go into a specific test mode of Windows, you can not anymore load a device driver into any modern Windows version without it being properly signed. And to sign a driver you need a Software Signing Certificate that costs around $300 to $400 dollar per year. For recent Windows 10 version self signed drivers are not enough anymore and you need to have them countersigned by Microsoft to let Windows load them without going through a special self signing procedure. This is the error you see. The Windows kernel refuses to load the NI-VISA Wizard generated INF file, since you have not signed it with a valid Software Signing Certificate. And if you use Windows 10 with Secure Boot enabled the driver needs to actually be submitted to Microsoft for signing after you self signed it first yourself. With Windows 11 there won't be a legitimate way to start it up without Secure Boot enabled so be aware of that.
02-24-2022 07:14 AM
Thank you very much for your reply.
I'm trying to develop a simple software on LabVIEW. In this software, I can send some specified messages to the development board through the USB, and the program in the development board will react to the messages and also send back some specified messages back to the software. This is what I want to achieve.
As for the signature problem, I have seen another method which is to "disable driver signature enforcement" on Win10. I don't know if this method is reasonable, but the error is still the same when I install the INF file. The steps are as follows.
(Then choose 7 on the keyboard while restarting.)
And if I want to achieve my goal, do you have any other suggestions? Thanks a lot.
02-24-2022 07:22 AM
It would be a lot easier if the board has networking capability or even a serial port.
02-24-2022 07:46 AM
Yeah, actually it does have a serial port and I have realized the same function through it. But the project I'm working on needs the USB function and I'm still learning how the USB communication could be achieved using LabVIEW.