Skip to content
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

"hping3" feature (because Ping does not work with iphones and deepsleep modes) #107

Open
Roellen opened this issue Jun 17, 2023 · 6 comments

Comments

@Roellen
Copy link

Roellen commented Jun 17, 2023

Is your feature request related to a problem? Please describe.
Until today there is no adapter available who can reliable detect the presence of an iphone.

I tried these Adapters over the last month:
life360, radar2, TR064, geofency, ping, net tools, unifi....

Describe the solution you'd like
I read that "hping3" is the solution here. Then even iphones will wake up on this ping request and the presence detection will work reliable.

@Apollon77
Copy link
Contributor

Can you provide more infos on "hping3"? Links? What kind of package is it? Available for Linux? Windows? macos?

Makes it battery wise really sense to wake up iphons that often?

But in fact tr-064 and a fritzbox should work - at least it does for my one. Additionally I use geofency to also get infos on that level.

@Roellen
Copy link
Author

Roellen commented Jun 18, 2023

tr-064 might work, but I don't use a fritzbox as a router. (iam using unifi and I never want to switch back)

Battery on iphone 13 lasts ~2 days so it should work. (at least is seems to work of others, too)

Installation is like this: sudo apt-get install hping3

I just found out that someone made a shellscript for it:
https://forum.iobroker.net/topic/56566/probleme-mit-anwesenheitserkennung/13?_=1687096847035&lang=de

But having it in a ping adapter would be easier to maintenence.

@mcm1957
Copy link
Collaborator

mcm1957 commented Jul 7, 2023

I read that "hping3" is the solution here. Then even iphones will wake up on this ping request and the presence detection will work reliable.

hping3 is able to send icmp, tcp, etc. requests and set several options.
ping can only send icmp packets.

Please indicate what kind of "ping" hping3 can / should use to reiable wake up iphones. Can you give a serious reference where you read this info?

@Roellen
Copy link
Author

Roellen commented Jul 7, 2023

I read that "hping3" is the solution here. Then even iphones will wake up on this ping request and the presence detection will work reliable.

hping3 is able to send icmp, tcp, etc. requests and set several options. ping can only send icmp packets.

Please indicate what kind of "ping" hping3 can / should use to reiable wake up iphones. Can you give a serious reference where you read this info?

I read the info about hping3 just in this thread where people successfully used it:
https://forum.iobroker.net/topic/56566/probleme-mit-anwesenheitserkennung/13?_=1687096847035&lang=de

I think they used this:
hping3 -2 -c 10 -p 5353 -i u1 $i -q >/dev/null 2>&1

@GermanBluefox
Copy link
Contributor

This command
hping3 -2 -c 10 -p 5353 -i u1 192.168.1.1
tries to send UDP packet to port 5353 and waits for 1 millisecond for answer. 10 times retry

@mcm1957
Copy link
Collaborator

mcm1957 commented Jan 20, 2024

@Apollon77
Should be labelled enhancement - although to be discussed id we want to implemnt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants