docsteer / sacnview

sACNView provides a tool for monitoring and sending the Streaming ACN lighting control protocol used for lighting control in theatres, TV studios and architectural systems
http://www.sacnview.org
Apache License 2.0
91 stars 24 forks source link

PCap Playback Falis - Unable to Open Required Interface #330

Open Ben-Rosenfeld-VPS opened 1 month ago

Ben-Rosenfeld-VPS commented 1 month ago

Transmitting through the NIC works with no issues. However, the moment I try to use PCap Playback an error occurs which states "Unable to open required interface". The same error occurs whether we use pcap or pcapng files.

image

Interface settings appear proper:

image

Latest beta build:

image

Ben-Rosenfeld-VPS commented 1 month ago

Forgot to include image of NIC settings: image

marcusbirkin commented 1 month ago

You'll need to run sACNView as Administrator (right click on shortcut, run-as administrator) to use this feature

Ben-Rosenfeld-VPS commented 1 month ago

Correct. Am already doing that as well. Is there something else that we are missing?

marcusbirkin commented 1 month ago

Do you have any additional network interfaces, other than the 1 listed in sACNView's preferences?

Ben-Rosenfeld-VPS commented 1 month ago

Yes. I have several network interfaces. I have tried three of them (all without luck):

  1. Physical Ethernet Port on Laptop
  2. Ethernet Port on USB C Dock
  3. UGREEN USB C to Ethernet Adaptor
marcusbirkin commented 1 month ago

I mean, does Windows report any other network interfaces in Control Panel, other than the 1 listed in sACNView? i.e. is sACNView missing adapters from it's list?

Ben-Rosenfeld-VPS commented 1 month ago

image

vs

image

marcusbirkin commented 1 month ago

So yes, you have multiple adapters that don't appear in sACNView. Also confusingly your "Ethernet 2", which was shown in the first post; is now shown in Windows control panel, but not in your most recent sACNView shot.

I would recommend that you do the following:

Ben-Rosenfeld-VPS commented 1 month ago

Ok - I will try this and get back to you. Thanks for the recommendation.

Ben-Rosenfeld-VPS commented 1 month ago

Ok - sorry for the delay.

Disabled all the I/Fs: image

Updated Npacp to v1.79. Did not see WinPcap installed to remove from add/remove programs.

Ran sACN view as Admin but same issue:

image

image

marcusbirkin commented 1 month ago

...and you checked that the interface has only a single IP? As for Wipcap, search your system folders for wpcap.dll and packet.dll, checking the version properties.

If you still have issues than there isn't much else that can be done, you might simply have to accept that this feature won't work on your machine.

Ben-Rosenfeld-VPS commented 1 month ago

Correct - the I/F only has a single IP.

The only version of wpcap.dll and packet.dll are the ones within the Npcap folder (that were installed with Npcap): image

Thanks for trying to support. As a side note - there are three other folks on my team who have this same issue. So I do not believe it is a singular event. This is likely a systemic issue.

marcusbirkin commented 1 month ago

If anyone on your team has experience with Qt/C++, then I would recommend you run up the project in a debugger to establish why Npcap is failing to enurmerate your interfaces.

marcusbirkin commented 1 month ago

You might try replacing wpcap.dll and packet.dll in the sACNView install folder with the dlls from c:\Windows\Sytem32\Npcap

alphajbravo commented 1 week ago

I just ran into this issue as well. The only place I've gotten this to work at all is on a Win10 VM using a vmxnet3 adapter (vmware). Using a USB NIC on the same vm (tried two different brands) I get the same error as the OP. I also get the same error on two different Win11 laptops and two different Win10 desktops with both USB and built-in PCIe adapters.

You might try replacing wpcap.dll and packet.dll in the sACNView install folder with the dlls from c:\Windows\Sytem32\Npcap

I tried this, but I get the error below when opening a .pcapng file, whether I use the v1.78 files from my current wireshark install or the latest v1.79

Error opening bad dump file format

marcusbirkin commented 1 week ago

Do you have the same issue with the older .pcap formatted files?

After copying the DLLs, could you post a screenshot of the about screen from sACNView.

alphajbravo commented 1 week ago

After copying the npcap dlls, I can open and play back pcaps on the vmxnet3 adapter, but get the same 'Unable to open required interface' error on a USB adapter. So behavior seems to be the same as the included dlls.

I had been using v2.1.3, but just tried v2.2.0-beta.1, and it actually DOES work with the replaced DLLs on both the vmxnet3 and USB adapters on the Win10 VM, and with both pcap and pcapng files. Screenshots of the about screens after replacing the dlls below. With the included dlls, it seems to behave the same as v2.1.3

image image

marcusbirkin commented 1 week ago

So yes, this confirms what the issue is. WinPcap fails on modern Windows.

sACNView is bundled with WinPcap (as it was current at the time), but can not be bundled with Npcap due to licence restrictions.

331 removes the bundled WinPcap DLLs, and will prefer Npcap if both are installed on the system.

In the meantime the solution is to ensure that only Npacp DLLs are available in accessible PATHs, as currently sACNView will use the first set of DLLs found.

alphajbravo commented 1 week ago

I just tried the same solution on a Win11 laptop, and with v2.2.0-beta.1 and Npcap v1.79, and it works on a USB network adapter. If I try to use the built-in wifi, I get a different problem: as soon as I click "Play", I get what looks like an error popup with no text, and then sACNView closes. I don't really WANT to send sACN over wifi, but I don't know if the underlying problem may occur with other adapters as well.

In the meantime the solution is to ensure that only Npacp DLLs are available in accessible PATHs, as currently sACNView will use the first set of DLLs found.

At least with v2.2.0-beta.1, sACNView does not appear to locate the npcap dlls in their install directory unless "Install Npcap in WinPcap API-compatible mode" option is selected during Npcap installation. So it may be worth documenting that for users, or looking for the default Npcap path explicitly.

Thanks for the quick support on this. pcap playback is a really powerful feature, and even with the WinPcap issues it saved me a ton of time in pinpointing the source of a challenging problem yesterday.

marcusbirkin commented 1 week ago

Install Npcap in WinPcap API-compatible Mode. places the DLLs in the system32 folder and not in the subdirectory system32/npcap. The system32 folder is one of Window's search paths. However the directory local to the executable is the first place checked - unless the executables working directory is altered (i.e. with a shortcut, or other method).

With #331, the npcap subfolder is set as a preferred search path. But ultimately it will depend on what ever the system provides.