manual configuration of wdf network debugging with windbg also fails

hi,

I am struggling to get my WDF usb driver debugging working. At the moment, I have the following problem,
On my target PC, ( Windows 10 + Microsoft certified NIC card ) I have assigned ip as 192.168.1.3 and host PC address is 192.168.1.2. BCDEDIT debug settings are fine and key is properly generated.

From windbg UI, when start the remote debug with key , port details, I partial output as below.
Using NET for debugging
Opened winsock 2.0
Waiting to reconnect
Connected to target 169.254.58.242 on port 50000 on local IP 192.168.1.2.

After the above text, no more log is displayed in UI.
I am wondering why the target IP is different than what I have configured!!!
PLEASE ADVISE. I AM STUCK here…

My development PC is WIN7.

Earlier I tried provisioning from VS2015+WDK 10 from my PC and debugging and deployment is my driver was not successful, I want to confirm if manual configuration works fine firstly or not.

Hello.
I setup my System by two methods.

  1. With COM Port and a VM. Look at this site: https://msdn.microsoft.com/en-us/library/windows/hardware/ff538143(v=vs.85).aspx
  2. By using “Host” in VM. Try this to setup VM and WinDbg:
    select host only radio button in vmware network setting , do ipconfig in host and locate the vmnet1 ipv4 address ping from target if ok simply follow the documentation in windbg bcdedit /debug on bcdedit /dbgsettings:net ipaddr:==xxx port == XXX a key will be autogenerated use it in a batchfile in host like windbg.exe" -k net:port=55555,Key=

Additional Information for debugging with VS2015.
Currently (at least for me) it is not possible, because it is buggy.
Look at this site: https://connect.microsoft.com/VisualStudio/feedback/details/2080376/fails-to-load-configure-devices
When I try to debug with VS2015 (including Update2), VS2015 crashes completely and restarts.
Because I am using WinDbg I have no problems.

Best Regards

srinivaskumar.r@in.bosch.com wrote:

I am struggling to get my WDF usb driver debugging working. At the moment, I have the following problem,
On my target PC, ( Windows 10 + Microsoft certified NIC card ) I have assigned ip as 192.168.1.3 and host PC address is 192.168.1.2. BCDEDIT debug settings are fine and key is properly generated.

From windbg UI, when start the remote debug with key , port details, I partial output as below.
Using NET for debugging
Opened winsock 2.0
Waiting to reconnect
Connected to target 169.254.58.242 on port 50000 on local IP 192.168.1.2.

The “169.254” range is what Windows assigns to an interface that could
not get an IP address through DHCP. Is it possible you have configured
your host PC with debugging enabled as well, and you’re actually
connecting to IT?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I am not able to get your comment. My set-up is following,

  • both test and dev/host PC are assigned static IP and not connected to external network;
  • I could see that warning message in HKEY_Local_Machine\System\CurrentControlSet\Services\kdnet says the following,
    KdinitResultString - " GetTargetIPAddress failed to acquire an IP address using DHCP"
    KdInitStatus = 0x0
  • but network adapter reads as Microsoft kernel debug network adapter.

Switching to null modem is a challenge for me as my dev/host PC is a laptop and target pc is a desktop. I don’t want to waste time again on setting up debug over null modem + usb-serial cable. I find different to get the right cable type as how to connect between laptop-desktop.

srinivaskumar.r@in.bosch.com wrote:

I am not able to get your comment. My set-up is following,

  • both test and dev/host PC are assigned static IP and not connected to external network;
  • I could see that warning message in HKEY_Local_Machine\System\CurrentControlSet\Services\kdnet says the following,
    KdinitResultString - " GetTargetIPAddress failed to acquire an IP address using DHCP"
    KdInitStatus = 0x0
  • but network adapter reads as Microsoft kernel debug network adapter.

You can’t use a static IP on your target system. Remember that the
kernel debugger runs VERY early during boot. It can’t use the regular
network driver, and the file systems and registry are not available
yet. Thus, it doesn’t have any way to find out your network adapter
settings. It MUST have access to DHCP.

So, you can either run a simple DHCP server on your host machine, or you
can get a gateway router with DHCP service.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.