Troubleshooting DeviceFactory.Discover

If I use the GenICam Browser, I can see two configured devices.

But if I do DeviceFactory.Discover I don’t see anything (except GenICam.vin if I add DiscoverFlags.All).

I’m currently using a Node-Locked license, but I don’t think that should make a difference, should it?

Am I missing something obvious, and if not, what should I try next?

Can you post a screen shot of the GenICamBrowser? Configured devices are not necessary reachable. And the default DeviceFactory.Discover() (also with .All) only shows available devices.

1 Like

Hi Ben,

Win Server could be our problem here.
If you have a look into the releasenotes of CVB 13.0 you can find the following information:

image

As far as I am aware, winserver 2008 is the same codebase as Vista.
So I guess the only option would be to upgrade to a newer Winserver Version or back to CVB 12.
@Andreas should be able to tell us whether Discover is already implemented in this version.

Cheers
Chris

1 Like

I just saw, that he is using the R2 version of server 2008 which is the first server that is not based on Vista anymore, but on Windows 7 instead. Looks like we have another problem here…

@Ben could you please post a code snippet of your discovery here?

1 Like

I can’t decide whether I’m happy about that or not :slight_smile:

There’s not much to see:

namespace CVB
{
    class Program
    {
        static void Main(string[] args)
        {
            var device = Stemmer.Cvb.DeviceFactory.Discover();
        }
    }
}

device.Count is zero, and if I FindAll I just get GenICam.vin.

Other info: I have the Sapera libs installed, but all the services are turned off. The two Stemmer services are running. And I can “talk” to the cameras with GenICam Browser.


For context: I know nearly nothing about cameras. I’ve just been tasked with trying to get an idea of the usability of the CVB API, and use it to bench test the speeds we can get out of some Nano and Linea cameras. So I have probably done or forgotten something stupid that no sane person would think of.

Could you please try the following:
Give your NIC port, where your camera is connected, a static IP address other than 192.168.x.x (e.g. 10.0.0.1).
Then also give your camera a static IP in the same subnet, via the GenICam Browser. (e.g. 10.0.0.2).

Now please try to discover again :slight_smile:

Also please send me a screenshot of your network ports settings:

grafik

1 Like

image

Didn’t work (I did Ignore Subnet Discover & Assign temporary IP) used 11.0.0.x, can still access via GenICam browser, but not seeing anything more in code. Sorry :frowning:

Meh.
Do you even find your interfaces? Just use:
DeviceFactory.Discover(DiscoverFlags.UpToLevelInterface);

Nope.
This is a machine with 16 ethernet ports, if that makes a difference…
Could it be unaligned versions of code? I’ve got 1.30 for the libs, but not sure whether it’s 2017 or 2018 for the CameraSuite.

You can try to reinstall CVB. Uninstall the old version first (and also the binding previews).
Please double check if all files are removed properly. Delete the whole STEMMER IMAGING folders at C:\Program Files and C:\ProgramData if they remained.

Then install the latest version.

1 Like

OK I’ll reinstall all that and get back to you, probably tomorrow. Thanks for the help.

1 Like

Before you reinstall: Check the Prefer 32 bit check box in your project’s properties.

1 Like

Still no better :frowning:
Anything else I could try?


Slightly unrelated, but can someone remind me what the magic property combination is to get a Linea camera to trigger using it’s own AcquisitionLineRate? I managed to get it working at one point, but can’t remember how :frowning:

Also: why is connecting to cameras so slow?!

Ok, do you have a firewall installed? Or special rules for the Windows firewall?

Discovery sends a broad cast to all your NICs. By default the timeout for waiting on responses is 300ms. This is a good middle ground between the 1s proposed by the GigE Vision standard and what devices do in the wild.

So, if you want to speed up discovery have either fewer active NICs and/or reduce the timeout. Reducing the timeout may lead to fewer devices found, though.

For opening the speed depends mostly on memory allocation and the speed of the device itself. First time is also slower as the GenApi XML must be downloaded. Also a lot of acquisition related values are read.

1 Like

The firewall was on, but I’ve just turned it off and apparently no difference.
Same thing for NICs, I’ve disable all except the cameras (and my remote LAN connection), no dice.
I’ve also unsuccessfully tried a couple of different timeouts.

Is there a trace log anywhere I could look at? Or would dropping down to P-Invoke shed any light on the problem?

You can try the LogGUI application:


Double click on the default setting in Configuration and select trace. Then click on the disk symbol above it to apply the setting. Then you can click the play button and start your application.

Best send the log to support:

https://www.stemmer-imaging.com/en-de/request-support/

Hi Ben,

try to run the solution with x64 in the ConfigurationManager and tell us if this fixed the problem.

YES that’s it.

Thanks so much…

1 Like

I still have no Idea what is going on there, we will look into this.
For other users with the same problem it would be great if you could mark my answer as solution :wink:

Cheers Chris