Skip to content
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

Device Not Ready #1

Open
wint100 opened this issue Sep 17, 2016 · 0 comments
Open

Device Not Ready #1

wint100 opened this issue Sep 17, 2016 · 0 comments

Comments

@wint100
Copy link

wint100 commented Sep 17, 2016

Hi,

When running the shell application I get following unhandled exception in the EthernetPort class when the NIC is already being used by another BACnet OWS. I currently have Delta Controls enteliWEB connecting over ethernet so it can not bind to that adaptor.

private LibPcapLiveDevice _getCaptureDevice()
{
var devices = LibPcapLiveDeviceList.Instance.Where(dev => dev.Interface != null);

        if(_options.DeviceName != null)
            return devices.Where(dev => dev.Name == _options.DeviceName).FirstOrDefault();
        else
        {
            foreach(var device in devices)
            {
                **if (device.LinkType == PacketDotNet.LinkLayers.Ethernet
                    && device.Interface.MacAddress != null)
                    return device;**
            }

            return null;
        }
    }

An unhandled exception of type 'SharpPcap.DeviceNotReadyException' occurred in SharpPcap.dll

Maybe we should add some error checking to this to handle this common situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant