Find network adapter ID for youbot driver on Windows

From youBot wiki
Revision as of 13:28, 10 September 2015 by Nowak (Talk | contribs) (Created page with "While on ubuntu the network adapter have simple names like "eth0", on Windows they are more complex. We provide a very simple program that lists the available network adapter...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

While on ubuntu the network adapter have simple names like "eth0", on Windows they are more complex. We provide a very simple program that lists the available network adapter under Windows, so that the correct one can then be used for the youbot driver. The program calls the pcap_findalldevs_ex() function of the PCAP libraries and lists the results.

This program called list_pcap_devices is hosted at Github.

In order to run it:

  • Download and unzip resp. checkout the repository into any folder.
  • Start the file runCMake.bat in the project root folder, e.g. by double-clicking it in the file browser.
  • If successfull, this will generate a file "(project_root)/built/list_pcap_devices.sln".
  • Open that file with Visual Studio and compile (e.g. choosing menu Build/Build Solution, or pressing F7)
  • Run the program
    • In Visual Studio, in the Solution Explorer Window right click on "list_pcap_devices" and from the context menu select "Debug/Start new instance"
    • Or start "(project_root)/build/Debug/list_pcap_devices.exe" from file browser or console
  • The program should output the list of devices that can be used with the WinPcap driver. Exit the program with pressing any key.

An example output is the following:

1. rpcap://\Device\NPF_{0DEBFE06-6009-4A3A-91D1-2540A7065F8B} (Network adapter 'Microsoft' on local host) 2. rpcap://\Device\NPF_{B8BA4AE2-24D8-46AE-9CCD-271D54F3617F} (Network adapter 'Sun' on local host) 3. rpcap://\Device\NPF_{406CF676-7B6A-4B88-9594-3AF9CCFE0F89} (Network adapter 'Microsoft' on local host) 4. rpcap://\Device\NPF_{7696B504-9E43-44C5-BA89-37C522F29E1F} (Network adapter 'Intel(R) 82579LM Gigabit Network Connection' on local host) 5. rpcap://\Device\NPF_{DCF81245-E6BC-4141-B7C8-7FACEA851B12} (Network adapter 'Microsoft' on local host)

In this example, only one entry corresponds to a real hardware adapter, that is no. 4. That means the following line should be copied into the (youbot_driver)/config/youbot-ethercat.cfg file at the top:

EthernetDevice = \Device\NPF_{7696B504-9E43-44C5-BA89-37C522F29E1F}

Note: this was only an example, on your machine it will surely be a different string.