[SOLVED] Can't enable arping nor dhcp listening for Network binding

Hi,

I’m running Openhab 2.5.10 with Network binding 2.5.10 on a RPi3b with Raspbian Buster. I want to use the Network binding for precense detection, but I can’t get arping to work nor can I get the port forwarding commands to work in order to use DHCP listening, it looks like this in PaperUI:

Let’s start with the arping problem.

I’ve followed the instructions in the documentation for the network binding (I think) and installed arping on the pi and I’m able to call the devices from shell by using

/usr/sbin/arping 192.168.1.xxx

I think the permissions are correct, they look like this when I run

ls -l /usr/sbin/arping
-rwsr-xr-x 1 root root

my configuration file (network.cfg) looks like this:

binding.network:allowSystemPings=true
binding.network:allowDHCPlisten=true
binding.network:arpPingToolPath=arping
binding.network:cacheDeviceStateTimeInMS=2000
uses_arp_pings=yes

This is where I think I might have the problem. Should I type the full path to apring “/usr/sbin/arping” or is what I’ve stated enough? I’ve tried adding the full path, but I’m not sure about the syntax (quotes or not etc.). Also, I’m not sure what the documentation is referring to when it says PATH environmet variable “arping and cannot be found in the PATH environment variable”. Should I change something there?

When it comes to the port forwarding for DHCP listening I get stuck when trying to run the commands using iptables. I just get the below error

iptables/1.8.2 Failed to initialize nft: Protocol not supported

I’ve googled it and it seems like something has changed in Linux Buster and it uses the nftables framework, but it’s above my understanding what i means and even less what I can do about it. So if someone could help me out here it would be much appreciated :slight_smile:

In your case use:

binding.network:arpPingToolPath=/usr/sbin/arping

That means in case the openhab user cannot find arping by searching the directories that are listed in the PATH variable.
arping

Did you have a look to https://superuser.com/questions/1480986/iptables-1-8-2-failed-to-initialize-nft-protocol-not-supported/1482397 ?

Have a look at


that toolset can be used to translate iptables syntax to nft syntax.

Thanks for your replys Wolfgang. Regarding the aprping I changed the path, restarted openhab, but still no luck. The thing properties still states “arp_state Disabled”. Is there anything else I could try?

Regarding the iptables I had actually another error where nothing worked and a reboot solved it when I found this: https://raspberrypi.stackexchange.com/questions/108161/problem-with-iptables-on-buster-neither-legacy-or-nft-work

Now I was able to use the commands listed in the documentation and I have this rule now:

The thing propery still states “No access right for port 67. Bound to port 6767 instead. Port forwarding necessary!”. Is there someway that I can confirm that it’s working or not?

Now I got the dhcp listening to work. I gave openhab permissions to bind to lower ports.

Now the arping issue is still left to solve. It’s mainly due to my wife’s iphone that goes to deep sleep and can’t be detected. If arping is hard to get working is there another way of detecting the iphone?

Now everything works. I think the arping has worked the whole time, but shows disabled in Paper UI. I started TRACE logging on the Network binding and found that it was doing Arpings (and didn’t when I changed the config).