-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UDP bind error: Address family not supported by protocol #126
Comments
Hi, I just tested it on my machine with nearly the same setup:
The r2000 yaml is also set to the scanners IP, transport protocol is set to udp. I tested 2 scenarios:
In both cases the driver started successfully. I got the following Questions:
In order to get a better understanding what is happening on your side, I would add a print statement to find out what is going on: In the file: src/pf_driver/src/pf/http_helpers/curl_resource.cpp add the following into line #37 Like this:
Then the you would need to build the driver again (catkin build). After the driver is launched, we will be able to see all the requests that are sent from the host to the scanner. |
Hi Patrick, thanks for the support. I answer your questions:
Just before of that line, I have a print statement like
which results in runtime:
So the error seems to appear before stablishing any connection, even if the statement
appears just before the crash. |
Hi Patrick! Setting transport to "tcp" works ok ... Since I guess data transfer through tcp adds some extra traffic. please, let me know why "udp" is the default transport setting and which implications may have to set it to "tcp" THanks Andreu |
Hi, I just added your print statement to compare the output. This is my yaml:
My host IP is Besides your print statement, I also added one for the local_endpoint:
The driver is starting, this is the log:
If you could also post the whole log from console, we could compare the what is happening. |
Nice to hear that tcp is working. I would still like to find the issue that you are facing when using udp as protocol. |
Hi The print statement of the Local Endpoint seems very suspicious:
|
it is really strange that the local enpoint is set to an IPv6 address. could you try the following: replace this line in udp_transport.cpp: |
Similar output with
|
Is it possible that the host machine is preferring IPv6 or using dualstack? I would check the IPv6 settings and try to disable it if it is not
|
My output:
Seems everything related to ipv6 is set to false |
I think this shows that it is enabled. Could you run those commands to disable ipv6? Afterwards I would reconnect the sensor and check the driver again. (To disable it persistently, refer to https://askubuntu.com/questions/1300253/disable-ipv6-on-ubuntu-20-04)
|
|
Thank you for testing those settings. From what we have seen the issue is coming from the local_endpoint. I will discuss this with @ipa-vsp to track down why you are receiving IPv6 address for your local endpoint. |
ok! thanks! |
As @ipa-vsp is not available this week I would try this last idea:
With the definition of ipv4_any we should receive the 0.0.0.0 address for your local endpoint. I tested the code on my side, which is still working:
If this still does not fix the issue, it would be helpful to provide the full log of the ros console. Thanks in advance |
Hi!
which is something I felt weird ... and effectively it is risky ,since depending on what is executing first, things can be wrong. It is like : Split it better as:
or , second option, in one line:
and everything works ! You may come back to the initial version and just fix that line. Please let me know when you fix it to the main branch. Thanks for the support |
Hi ,
Context
Host Machine:
Device:
Ping
ISSUE
From the host machine, I do:
roslaunch pf_driver r2000.launch
It seems there is a problem at socket binding, but the provided IP address seems to be correct v4, so I do not understand the message "Address family not supported by protocol".
Any help will be highly appreciated,
Thanks,
Andreu
The text was updated successfully, but these errors were encountered: