3

I installed a command line tool which accepts genicam packets from a device as input into a docker image. If I use the option --network host in the run command for the container the packets are received. If I use -p 3956:3956/udp to expose the Genicam default port 3956 (e.g. stated here: RoboRealm - GenICam - Instructions) in the run command of the container I don't get packets. What did I wrong? Could the port be different from the default? How could I get the changed port then?

thinwybk
  • 131
  • 5
  • I am trying to adapt this solution for Basler cameras, which rely on the Genicam standard. Has anyone experience with that? I tried to adapt the compose config with no result as per today. – Bonito Jan 17 '24 at 13:29

3 Answers3

1

Here is a plug and play solution in docker compose for it, however please check your container for vulnerabilities. If you do not use docker networks you can use network mode host instead.

version: '3.7'

services: your_container: image: your_image container_name: your_container #network_mode: host networks: - camera_vlan

networks: camera_vlan: driver: macvlan driver_opts: parent: enp2s0 # your adapter name goes here ipam: driver: default config: - subnet: "your.device.ip.goes/here" ```

Gornoka
  • 11
  • 1
0

Because Genicam will actually use another 2 random ports to establish the connection. You are supposed to be able to force those to a specific value but that's not well documented. The way I tried to solve it was by creating a macvlan network. https://docs.docker.com/network/macvlan/

If you are networking with unfamiliar protocols Wireshark is always a good place to start. It lets you see every single packet that passes in/out/between your computer.

0

The solution by @Gornoka works well. There is no need to add UDP port to detect the Genicam GigE camera. If multiple networks are to be used, something like below can be used

version: "3.7"

networks: some_net: ipam: config: - subnet: 172.20.0.0/24 camera_vlan: driver: macvlan driver_opts: parent: enp4s0 # adapter name changes as per deployment computer ipam: driver: default config: - subnet: 192.168.3.0/24
services:
some_service: image: image_name networks: some_net: ipv4_address: 172.20.0.8 camera_vlan: ipv4_address: 192.168.3.150

It might be worth specifying a static ip-address to the camera_vlan network so that there is no ip-address conflict with other devices on the network.