Will iputils arping will work in my version (which version do you use)?
I’ve installed it:
[15:07:31] openhabian@openHABianPi:~$ arping -Vn
arping utility, iputils-s20121221
[15:07:38] openhabian@openHABianPi:~$ arping
Usage: arping [-fqbDUAV] [-c count] [-w timeout] [-I device] [-s source] destination
-f : quit on first reply
-q : be quiet
-b : keep broadcasting, don't go unicast
-D : duplicate address detection mode
-U : Unsolicited ARP mode, update your neighbours
-A : ARP answer mode, update your neighbours
-V : print version and exit
-c count : how many packets to send
-w timeout : how long to wait for a reply
-I device : which ethernet device to use
-s source : source ip address
destination : ask for what ip address
[15:07:45] openhabian@openHABianPi:~$
ARPING(8) System Manager's Manual: iputils ARPING(8)
NAME
arping - send ARP REQUEST to a neighbour host
SYNOPSIS
arping [-AbDfhqUV] [-c count] [-w deadline] [-s source] -I interface destination
DESCRIPTION
Ping destination on device interface by ARP packets, using source address source.
OPTIONS
-A The same as -U, but ARP REPLY packets used instead of ARP REQUEST.
-b Send only MAC level broadcasts. Normally arping starts from sending broadcast, and
switch to unicast after reply received.
-c count
Stop after sending count ARP REQUEST packets. With deadline option, arping waits
for count ARP REPLY packets, until the timeout expires.
-D Duplicate address detection mode (DAD). See RFC2131, 4.4.1. Returns 0, if DAD suc‐
ceeded i.e. no replies are received
-f Finish after the first reply confirming that target is alive.
-I interface
Name of network device where to send ARP REQUEST packets.
-h Print help page and exit.
-q Quiet output. Nothing is displayed.
Manual page arping(8) line 1 (press h for help or q to quit)
Correct, iputils arping. Could this be a root cause for my problem?
Presence detection never guarantees a correct answer. Please always try the command line first with the given tools (ping, arping). If those fail, the binding will fail.
We should be on-par with hping3 though. That was the goal with the recent additions.
I have been following along your conversation and with my current (brand new) system set up, I am also on the old verson 2.14 of Thomas’ arping. How can I update arping to the latest supported version 2.19? If the answer is “compiling yourself”, I would need some instructions since I did not set up my pi other than installing OpenHAB (the Pi’s sole purpose).
Here are my specs (running on Raspbian Stretch Lite):
## Release = Raspbian GNU/Linux 9 (stretch)
## Kernel = Linux 4.9.41-v7+
$ which arping
> /usr/sbin/arping
$ arping
> ARPing 2.14, by Thomas Habets <thomas@habets.se>
I have tested thomas arping as well, but the iphone detection is not great here as well. same issue. The iphone gets detected, but goes to status OFFLINE quite quickly after the iphone goes to sleep modus.
I am back now to the 2.1.0 network binding and here the detection of the iphone works perfectly fine as it was before. It stays ONLINE as long as in range of the network, even in sleep modus. The enhancements in SNAPSHOT 2.2.0 are unfortunately not working for me right now. I will continue to follow the conversation for further development and happy to test at a later stage.
Thanks to all for your time and effort to work on the projects. Much appreciated.
So is the arping reply interval of up to 94s as expected?
I also did the port 67 forwarding described in the binding doc, but uses_dhcp_listen is still a: no
When I check top (-V) I can see ping being run regularly, but never arping.
My toolpath is set to /usr/sbin/arping and the openhab user given privilege in sudoers:
edit: showing now after one additional restart of openhab
however i still have the same problem as @OMR in regards to the DHCP_state. all settings in regards to port forwarding are done as mentioned in the binding doc, but still getting the “No Access …” message.
Got it working and it seems to work really reliable for my P10plus.
however i noticed that in the config nothing is showing for the “Presence _detection_type”
is there a reason for that? (runninh lates bundel 2.2.0.201709102120)
I am using RPI-3B with openhabian-jessie lite version,
I have installed ARPing with 2.19 version,
I have use sudo visudo and add below line,
openhab ALL=NOPASSWD: /usr/sbin/arping
but openhab still don’t have access right,
I set a rule for test purpose, run command as below
var String arping = executeCommandLine("arping -c 1 -I eth0 192.168.xxx.xx", 120*1000)
Result:
17:58:45.908 [INFO ] [clipse.smarthome.model.script.AirCon] - result:arping: libnet_init(LIBNET_LINK, eth0): libnet_open_link(): UID/EUID 0 or capability CAP_NET_RAW required
arping: you may need to run as root
I’m pretty sure the openhab user is the right user in this case. OH runs as openhab, not openhabian, so openhab is the one that needs the permission to run arping.