CVBPY, Open by IP

I am developing by CVBPY on Ubuntu and I wonder if it is possible to connect and interact with the cameras using IP-Address of camera?

The reason is I need to use my code in Docker or WSL and in both case I am not able to discover cameras via the code below:

interface_flags = cvb.DiscoverFlags.UpToLevelInterface | cvb.DiscoverFlags.IgnoreGevFD
all_interfaces = cvb.DeviceFactory.discover_from_root(interface_flags)
broadcast_flags = cvb.DiscoverFlags.IgnoreVins | cvb.DiscoverFlags.IncludeInaccessible | cvb.DiscoverFlags.IgnoreGevFD

all_devices = []

for interface in all_interfaces:
    cvb.DiscoveryInformation.set_genapi_feature(interface, "TLInterface", "DisableSubnetMatch", "1")
    cvb.DiscoveryInformation.set_genapi_feature(interface, "TLInterface", "AllowBroadcastDiscoveryResponse", "1")

    found_devices = cvb.DeviceFactory.discover_from_level(interface.access_token, broadcast_flags)

    for dev in found_devices:

Good Morning Fatemeh,
currently we have a lot of people absent due to vacation time. I made a request to answer you questions as soon as possible.


Hi Fatemeh,

Thank you for the question.

I need to use my code in Docker or WSL

I guess it is inevitable to make the network transparent between your guest entity and the real host.

Have you already investigated that point? If you are working on WSL, for example, it offers you to configure the target by a special file called .wslconfig with parameters such as networkingMode or vmSwitch. If the network turns transparent the regular device discovery should work. I could be wrong but “bridged” is a common term that makes the guest entity an individual entity on the given network.

Please do not hesitate to come back here if even the network configuration does not help.

1 Like