Connecting to Gige camera via IP address broken on Ubuntu 18.01 and Centos
See original GitHub issueI’ve done some troubleshooting on Ubuntu 18.01 and Centos and I’ve found that attempting to connect and use a camera by specifying IP is broken and will timeout on RetrieveResult calls. This is true for both the Python and C++ API.
Wireshark session caps show the camera attempting to establish a udp session back to the host on 0.0.0.0:34950 which will not work since 0.0.0.0 isn’t a real IP. Netcat on the host reports that the pylon driver opened up port 39450 for that session on the host adapters of which there are several.
192.168.3.209 is the camera.
192.168.3.219 is the host running pylon.
netcat output
udp 0 0 0.0.0.0:34950 0.0.0.0:* 5414/./CalibrationT
I’ve had to roll all of my code back to grabbing the first device with a matching serial number.
To me it seems like something is being done to detect the interface on the host and that address is being reported incorrectly to the camera so it can never establish a proper udp session for data transfer.
Here is the c++ api code I’ve been testing with although this is reproducable with pypylon as well.
TIFactory = &CTlFactory::GetInstance();
pTI = TIFactory -> CreateTl(CBaslerGigEInstantCamera::DeviceClass());
bdi = new CBaslerGigEDeviceInfo(pTI->CreateDeviceInfo());
bdi->SetIpAddress(String_t(ip));
std::shared_ptr<CBaslerGigEInstantCamera> camera1(new CBaslerGigEInstantCamera(pTI->CreateDevice((CDeviceInfo)*bdi), Cleanup_Delete));
camera = camera1;
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:13
Hey I’m on Ubuntu 19.04 and I found a solution that worked for me:
Go to the internet settings of the ethernet adapter which your GigE camera is connected to and set both the IPv4 and IPv6 methods in their tabs to “local link only” option.
I also did what thiesmoeller said before. That didn’t work by itself but it might be necessary along with this step.
I’m wondering if I was running into the same issue.
When connecting to a random device with the pypylon sample code such as
grab.py
I was able to capture images. But, when I attempt to attach to a specific IP address using the method described here https://github.com/basler/pypylon/issues/19 I am unable to pull an image.I seem to have stumbled upon an undocumented way to select a specific device from the
CreateFirstDevice
method by passing in an info object. Using this approach, I am able to pull images.Maybe this info will be useful for you.