Open camera without using a broadcast message

Hi,

I’m using the C++ CVB API to capture video from a GigE Vision camera.

Cvb::DeviceFactory::Discover() is sending a broadcast Discovery Command.

As the IP address of the camera is known, is there a way to open it without sending a broadcast message ?

Hi @PaRo

have you tried configuring the camera in the GenICam browser and simply loading the driver in your code?

auto path = Cvb::InstallPath(); 
path += CVB_LIT("drivers/GenICam.vin"); 
auto device = DeviceFactory::Open(path); 

Not sure if this works without broadcast but I would think so…

Cheers
Chris

Thank you for your answer Chris.

I’ve already tried this method and it was still sending a broadcast message.

Maybe this snippet is what you are looking for, here the broadcastdiscovery is disabled on the interface bevore discovering:

// Discover all interfaces 

auto allInterfaceFlags = Cvb::Driver::DiscoverFlags::UpToLevelInterface | Cvb::Driver::DiscoverFlags::IgnoreGevSD; 

auto allInterfaces = Cvb::DeviceFactory::Discover(allInterfaceFlags);  

for (auto& iface : allInterfaces) 
{ 
// Broadcast discover on each interface to find every device, even devices in the wrong subnet: 
auto allDevFlags = Cvb::Driver::DiscoverFlags::IgnoreVins | 
Cvb::Driver::DiscoverFlags::IncludeInaccessible | 
Cvb::Driver::DiscoverFlags::IgnoreGevSD; 
iface.SetGenApiFeature("TLInterface", "DisableSubnetMatch", "1"); 
iface.SetGenApiFeature("TLInterface", "AllowBroadcastDiscoveryResponse", "1"); 
auto allDevices = Cvb::DeviceFactory::Discover(iface, allDevFlags); 

for (auto& device : allDevices) 
{ 
// Check if camera is accessible: 
// device[Cvb::Driver::DiscoveryProperties::DeviceAccessStatus];  

// Work with camera. e.g. open it: 
// auto cam = Cvb::DeviceFactory::Open(device.AccessToken()); 

} 
} 
```cpp

Just notice, you dont want to ignore the gevSD on ubuntu machines as there is no filter driver.
On windows we prefer working with the FD thus we ignore the SD when discovering. On ubuntu you wont find any devices when doing so.

It seems it is still sending a broadcast discovery command with this one too.

I really don’t know how to avoid that

Hi @PaRo

I had a short chat with one of my colleagues and unfortunately have to tell you, that there is no way to avoid the Broadcast.
The reason is, that there was no need so far, as the Broadcast itself is not really putting any load to the network.

Cheers
Chris