Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Ethernet over USB kernel debugging

Ben_EnglishBen_English Member Posts: 3

There was a similar topic here https://community.osr.com/discussion/258914/kdnet-on-a-usb-nic but the circumstances have changed enough in the 5 years since that thread that I think a new post isn't unwarranted.

I am trying to debug a specific laptop target that has no ethernet port (and its wireless adapter is not on the MSDN supported NIC list). The target is running a recent Windows 10, and Win10 doesn't support any kernel debugging but ethernet after version 1607. It has a thunderbolt port and usb ports. I have normally been debugging via a supported ethernet adapter in an eGPU enclosure connected by thunderbolt, but unfortunately what I'm trying to debug now is related to hotplugging that thunderbolt port, so this does not work in this scenario.

So, does anyone know if the updated supported NIC list yet contains any USB-ethernet NICs that I could buy for this purpose? I've tried searching for NICs by their device id / product ID in the list but haven't really had any luck with this.

Thanks,
-Ben

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,482
    via Email
    Ben_English wrote:
    > I am trying to debug a specific laptop target that has no ethernet port (and its wireless adapter is not on the MSDN supported NIC list). The target is running a recent Windows 10, and Win10 doesn't support any kernel debugging but ethernet after version 1607.

    What??  Is that true?  I had heard 1394 was dropped, but were USB and
    RS232 also dropped?


    > So, does anyone know if the updated supported NIC list yet contains any USB-ethernet NICs that I could buy for this purpose? I've tried searching for NICs by their device id / product ID in the list but haven't really had any luck with this.

    I seriously doubt it.  As I've said before, the kernel debugger (the
    part that's in the kernel) does not use operating system drivers.  It
    has its own separate corral of drivers, so that it isn't affected by
    driver issues.  It doesn't have a general purpose USB stack -- USB
    debugging uses a "back door" mechanism that goes straight to the HCI. 
    Thus, it seems very unlikely they can drive enough of USB to enumerate,
    configure, and drive a USB NIC.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 9,065

    Win10 doesn't support any kernel debugging but ethernet after version 1607

    Not true. Why do you say that?

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • Ben_EnglishBen_English Member Posts: 3

    @Tim_Roberts said:

    ...and Win10 doesn't support any kernel debugging but ethernet after version 1607.

    What?? Is that true? I had heard 1394 was dropped, but were USB and
    RS232 also dropped?

    @Peter_Viscarola_(OSR) said:

    Win10 doesn't support any kernel debugging but ethernet after version 1607

    Not true. Why do you say that?

    Peter

    Ah, because I apparently misread the documentation! Thanks for pointing this out. I pretty much exclusively used 1394 until this change, and then switched to ethernet. I guess I need to acquire an appropriate USB cable to debug this.

  • Ben_EnglishBen_English Member Posts: 3

    Well, I may have spoken too soon. It appears that neither of the USB ports on this laptop are debug capable according to usbview. It of course has no serial ports. Am I out of options?

    @Tim_Roberts said:

    So, does anyone know if the updated supported NIC list yet contains any USB-ethernet NICs that I could buy for this purpose? I've tried searching for NICs by their device id / product ID in the list but haven't really had any luck with this.

    I seriously doubt it. As I've said before, the kernel debugger (the part that's in the kernel) does not use operating system drivers. It has its own separate corral of drivers, so that it isn't affected by driver issues. It doesn't have a general purpose USB stack -- USB debugging uses a "back door" mechanism that goes straight to the HCI. Thus, it seems very unlikely they can drive enough of USB to enumerate, configure, and drive a USB NIC.

    Hmm, that's good to know. I am able to use an ethernet port on a connected thunderbolt device for kernel debugging, I wonder how that works? It seems likely that it must use OS drivers - I doubt there is a kernel debug specific thunderbolt driver. Unfortunately I don't have a second thunderbolt port with which to debug the first one, so I think I'm still out of luck. Are there any other options? The only other ports on this thing are audio, SD card, and HDMI...

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,482
    via Email
    Ben_English wrote:
    >
    > Hmm, that's good to know. I am able to use an ethernet port on a connected thunderbolt device for kernel debugging, I wonder how that works? It seems likely that it must use OS drivers - I doubt there is a kernel debug specific thunderbolt driver.

    Because Thunderbolt 3 is essentially just PCIExpress over a wire.  No
    drivers are required.  The hardware magically makes it look like PCIExpress.


    > Unfortunately I don't have a second thunderbolt port with which to debug the first one, so I think I'm still out of luck. Are there any other options? The only other ports on this thing are audio, SD card, and HDMI...

    Not really. There is probably a header on the motherboard that exposes a
    debug-capable port, like an RS232 header, but unless you're in the
    factory, there's probably no way to get at it.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 January 2023 Live, Online
Developing Minifilters 20 March 2023 Live, Online
Internals & Software Drivers 17 April 2023 Live, Online
Writing WDF Drivers 22 May 2023 Live, Online