question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connecting to Gige camera via IP address broken on Ubuntu 18.01 and Centos

See original GitHub issue

I’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.

untitled 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:open
  • Created 5 years ago
  • Reactions:2
  • Comments:13

github_iconTop GitHub Comments

5reactions
YacobBYcommented, Aug 9, 2019

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.

internetSettings

I also did what thiesmoeller said before. That didn’t work by itself but it might be necessary along with this step.

2reactions
supershabamcommented, Feb 2, 2019

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.

from pypylon import pylon

ip_address = '192.168.1.14'
info = pylon.DeviceInfo()
info.SetPropertyValue('IpAddress', ip_address)

camera = pylon.InstantCamera(pylon.TlFactory.GetInstance().CreateFirstDevice(info))

# now use the camera like in grab.py https://github.com/basler/pypylon/blob/master/samples/grab.py

Maybe this info will be useful for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting an IP address for a GigE camera to be recognized in ...
In Ubuntu, open the Network settings window, select the Ethernet connection you are using, and click Configure. Select the IPv4 Settings tab, ...
Read more >
First time to connect a GigE camera to Linux but ... - JAI support
1. Open LAN setting by clicking following icon (in green frame), and then click "Wired Settings": · 2. Click the gear icon: ·...
Read more >
No IP address when connecting gigE camera directly to ...
I got a GigE camera (Allied Vision Prosilica GT1290) that I connect to the Xavier via an ethernet cable. Both the camera and...
Read more >
Netplan static IP on Ubuntu configuration - Linux Tutorials
This tutorial will describe netplan static ip configuration on Ubuntu Linux via networkd daemon or via the GUI NetworkManager.
Read more >
FAQ: GigE Camera Troubleshooting – Answered by Experts
In this video, Applications Engineer Kimberly helps answer some of the most common questions we receive centered on first time setup of GigE...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found