-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Driver does not attach to device and does not log anything #30
Driver does not attach to device and does not log anything #30
Comments
Thanks so much for your quick response!
Windows 11 Pro 24H2 OS Build 26100.1882
The EWDK titlebar says: "Enterprise WDK with VS 17.8.6 [34525.116.d17.8]". I installed Visual Studio and WDK as well before using EWDK, I hope that doesn't conflict.
But that must be because I changed the
Itlooks like this. What does that mean? Oh I have to say that I'm not building from the clean commit. I had to make a change to make it build. diff --git a/general/echo/kmdf/driver/DriverSync/echo_2.inx b/general/echo/kmdf/driver/DriverSync/echo_2.inx
index 7b9daaa..0890930 100644
--- a/general/echo/kmdf/driver/DriverSync/echo_2.inx
+++ b/general/echo/kmdf/driver/DriverSync/echo_2.inx
@@ -7,8 +7,8 @@
[Version]
Signature = "$WINDOWS NT$"
-Class = Sample
-ClassGuid = {78A1C341-4539-11d3-B88D-00C04FAD5171}
+Class = RustSample
+ClassGuid = {0de61b41-c8a4-44d5-812a-81e5cb731728}
Provider = %ProviderString%
PnpLockDown = 1 Without this change I see the following error when trying to build:
I just found this: #21 (comment) |
It's great to hear your enthusiasm :) From what you've shared, it looks like its an issue with the test device's setup. Your screenshot of device manager shows that the driver is installed, but it isn't on any device nodes. I'm going to assume you're building from #18 now.
|
Ok let's start fresh from #18. I remove everything and then rebooted.
Let's clean and build fresh from EWDK:
During the build it says this, I think this is the certificate verification you're referring to?
Install the driver
Checking whether it's installed or not (I cut just the relevant output):
Add device, check if it's present and try to access it.
DbgView does not show anything relevant, as far as I can tell:
I don't know :( Everything seems fine until the last step. |
The system I'm running on is not activated. Might that be the problem? The certificate does not change if I rebuild or clean, right? Do I have to install the cert again? |
yes. this is it and it looks like the cert is fine. Just for one more sanity check, can you run
After first build, it will reuse generated certificates. You should see a
This output is actually very useful. You see that the devgen-created devnode has In Device Manager, under the Sample Device Node, you will also get valuable info in the |
This output is also important. The signer name is
|
I just did a quick test of installing the test cert to Current User instead of Local Machine, and I repro all the behaviour you are experiencing(ie. c_swdevice outranking the echo2 driver, and the Unknown signer name). Can you double check to make sure your test cert is installed to Local Machine via the |
Wow I'm so sorry. That was it exactly. Now it works:
I also see the logs in DbgView. |
The existing |
Fantastic, thanks! I hope that can avoid more people running into the same issue 😅 About the logging, is the current plan to keep using DbgView or also add WPF tracing (and include that in the PDB)? |
I'm assuming that's a typo for Right now, your options for tracing/logging are:
We are early on in experimenting with wpp in rust right now, but that is a lot more involved and is not going to be available anytime soon (if at all). |
Yes, that's right, thanks! So many similar terms and abbreviations 😵
Wow that looks very interesting. Have you got an example how to use that with the echo2 driver?
No problem at all, honestly, I'm just happy to get logs working at all. With DbgView can I filter the log messages to show only those from my driver? |
No, but the tracelogging crate samples should be a good start: https://github.com/microsoft/tracelogging/blob/main/etw/rust/tracelogging/examples/generate_events.rs
If its a usermode driver, i believe you can filter on the PID of the host process. If its a kernel mode driver, you would probably need to prefix it since |
Hi I'm succesfully loading the driver:
Then I use devgen to create a device:
But I don't see any log messages in DebugView:
And Driver Store Explorer also does not show any device associated with the driver (last column "Device Name"):
Consequently the demo app does not find the driver:
Anything I could've done wrong? I did load the certificates into Trusted Root Certification Authorities and Trusted Publishers.
Bitlocker is off, testsigning is on, secureboot is off.
The text was updated successfully, but these errors were encountered: