Closed kikass13 closed 3 years ago
Hi, it looks like your initial setup seems to be working. You can ping the sensor as well? If there is a timeout exception the TCP connection can not be established. Can you see if the driver is communicating with the sensor via a TCP connection.
And could you post the complete error, including error code which should appear.
Are any firewalls or other things present which might block TCP connections and let UDP connections through?
Hi, thanks for the reply
You can ping the sensor as well?
~/ros2_ws$ ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=0.340 ms
64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=0.327 ms
64 bytes from 192.168.1.2: icmp_seq=3 ttl=64 time=0.324 ms
^C
--- 192.168.1.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2039ms
rtt min/avg/max/mdev = 0.324/0.330/0.340/0.007 ms
Are any firewalls or other things present which might block TCP connections and let UDP connections through?
I did
ufw allow 6060 && ufw allow 6061 && ufw enable
so the ports should be free and there is no other firewall or host in between.
This ICMP package pops up periodically when i start the driver
3197 41.209861060 192.168.1.1 → 192.168.1.2 ICMP 590 Destination unreachable (Port unreachable)
3198 41.214809352 192.168.1.2 → 192.168.1.1 UDP 1502 6060 → 6060 Len=1460
3197 41.209861060 192.168.1.1 → 192.168.1.2 ICMP 590 Destination unreachable (Port unreachable)
This means the network participant is not reachable for your driver. There should be a few TCP messages popping up at startup since there will be some configs exchanged. without that you will not be able to use the driver.
On the sensor port 2021 will always be used for TCP connections. So I am guessing you can not connect to that port. So yes it sounds like there is an issue with your network or firewall configuration.
If you have more questions please ask, otherwise I would be happy if you could post what the issue was in the end.
Hello,
after playing around I can see some messages from the driver (shortly after i start it)
9389 60.122845684 192.168.1.20 → 192.168.1.1 UDP 554 6060 → 6060 Len=512
9390 60.124726570 JetwayIn_0d:6d:b3 → Sick_24:16:fd ARP 42 Who has 192.168.1.21? Tell 192.168.1.1
9391 60.124764050 JetwayIn_0d:6d:b3 → Sick_24:16:f7 ARP 42 Who has 192.168.1.20? Tell 192.168.1.1
9392 60.125091279 Sick_24:16:f7 → JetwayIn_0d:6d:b3 ARP 60 192.168.1.20 is at 00:06:77:24:16:f7
9393 60.125344684 Sick_24:16:fd → JetwayIn_0d:6d:b3 ARP 60 192.168.1.21 is at 00:06:77:24:16:fd
9394 60.137868248 192.168.1.21 → 192.168.1.1 UDP 1502 6061 → 6061 Len=1460
9395 60.143141848 192.168.1.21 → 192.168.1.1 UDP 1502 6061 → 6061 Len=1460
9396 60.147229551 192.168.1.21 → 192.168.1.1 UDP 554 6061 → 6061 Len=512
9397 60.153830802 192.168.1.20 → 192.168.1.1 UDP 1502 6060 → 6060 Len=1460
and the devices already repond to my ping icmp requests. there is nothing in between the host and the devices. I also allowed port 2021 but that should be irrelevant, because it is an outgoing tcp connection (there cannot be a firewall in between). The two sensors a plugged directly into the ethernet port of my host ...
The sensors are configured to "just stream" udp data as soon as they are turned on (which they do), there is no need for the the driver to establish a tcp connection in the first place (only for setting fields and stuff at runtime). Disregarding the fact that tcp should work because there is nothing blocking anything, is there a way to use the decoding part of the driver to just use the udp socket (which already exists) manually?
to add to my confusion:
$ nmap -p 2021 192.168.1.20
Nmap scan report for 192.168.1.21
Host is up (0.00069s latency).
PORT STATE SERVICE
2021/tcp filtered servexec
Nmap done: 1 IP address (1 host up) scanned in 0.25 seconds
i re-enabled the port 2021 for outgoing conenctions
$ sudo ufw allow out 2021
Rule added
Rule added (v6)
$ sudo ufw enable
and checked nmap again, it is not my computer that is not allowing tp connections ... the sensor is is not receiving anything on port 2021
$ nmap -p 2021 192.168.1.21
Starting Nmap 7.80 ( https://nmap.org ) at 2021-05-07 18:12 UTC
Nmap scan report for 192.168.1.21
Host is up (0.0013s latency).
PORT STATE SERVICE
2021/tcp closed servexec
Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds
... a telnet connection on that port does nothing as well
$ telnet 192.168.1.20 2021
Trying 192.168.1.20...
telnet: Unable to connect to remote host: Connection refused
And the sensors are happy and stream their data:
Okay, if the sensor does not receive anything. are there maybe any configurations you can change in the safety designer? On the sensor side I am not that familiar with all the possible options. But if the sensor does not receive anything on that port that sounds weird. That should not be the case
The sensors are configured to "just stream" udp data as soon as they are turned on (which they do), there is no need for the the driver to establish a tcp connection in the first place (only for setting fields and stuff at runtime). Disregarding the fact that tcp should work because there is nothing blocking anything, is there a way to use the decoding part of the driver to just use the udp socket (which already exists) manually?
For this you need to go in the code and comment out all the command requests. There should be on getting the name, the type code and one passing a configuration in the setup.
Okay, if the sensor does not receive anything. are there maybe any configurations you can change in the safety designer? On the sensor side I am not that familiar with all the possible options. But if the sensor does not receive anything on that port that sounds weird. That should not be the case
I am not really sure. All I have done was go through every category in the designer and "tick all the boxes" until I was through all of them. There seems to be a category which defines "inputs"and I have selected "no input" . Is the configuration part of the sensor auch an 'input' ? I am not really sure but I can try it out next week :)
The sensors are configured to "just stream" udp data as soon as they are turned on (which they do), there is no need for the the driver to establish a tcp connection in the first place (only for setting fields and stuff at runtime). Disregarding the fact that tcp should work because there is nothing blocking anything, is there a way to use the decoding part of the driver to just use the udp socket (which already exists) manually?
For this you need to go in the code and comment out all the command requests. There should be on getting the name, the type code and one passing a configuration in the setup.
Thanks 👍 I'll take a look next week. Then I can see /usethe data at least, which is fine for now :)
I am not really sure. All I have done was go through every category in the designer and "tick all the boxes" until I was through all of them. There seems to be a category which defines "inputs"and I have selected "no input" . Is the configuration part of the sensor auch an 'input' ? I am not really sure but I can try it out next week :)
As I said, I am not sure about all possible configurations of the SafetyDesigner. However it sounds like it should be working.
I'll take a look next week. Then I can see /usethe data at least, which is fine for now :)
If you need help figuring out which lines exactly let me know and I will have a look
Did you manage to resolve the issue?
@puck-fzi I was unable to do something with the driver, because the last week was full of stuff to do :)
If the answer to this problem is to comment out the important part of the driver, you can close this issue. I will probably post my working driver code here later.
But I can probably do that in the coming two weeks :)
Since the sensor does not receive anything on port 2021 as you mentioned, it appears to be more of a network problem then an actual driver problem. So yes I think i Will close it here, but please if you find any solution post it here, maybe it helps others as well. Or maybe you need to contact SICK directly to resolve the non accepting port 2021, since they will have more knowledge on the sensor side.
If there are any other troubles or insights please reopen or open a new issue.
Hello,
i am using two sick lidars (https://cdn.sick.com/media/docs/3/63/763/product_information_outdoorscan3_safety_laser_scanner_en_im0082763.pdf) and the driver crashes with a timeout exception.
I have configured both the sensors (daisy chain) like this:
and the driver wont work accordingly.
I have configured the driver as follows:
and the sensor is sending data on the port i have configured (6060):
what can I do to troubleshoot this problem?