This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Resident script - IP watchdog
#5
(17.12.2017, 08:08)kenjirosama Wrote: Hi

I have tried using this script to ping an Iphone but I always get back the same result regardless of it's presence in the network or not. The Iphone have a static IP.

Any  ideas?

/K

Hi, The script is good, working.
Here mine looks:
Code:
function socketping(ip, port, timeout)
 port = 80
 local sock = require('socket').tcp()
 sock:settimeout(2)
 local res, err = sock:connect(ip, port)
 sock:close()
 
 return res, err
end


ip1 = '192.168.10.151'
ip2 = '192.168.10.152'
ip3 = '192.168.10.153'
ip4 = '192.168.10.154'
ip5 = '192.168.10.155'
ip6 = '192.168.10.156'
ip7 = '192.168.10.157'

if not socketping(ip1) then grp.write('10/5/1', true)
end
if not socketping(ip2) then grp.write('10/5/2', true)
end
if not socketping(ip3) then grp.write('10/5/3', true)
end
if not socketping(ip4) then grp.write('10/5/4', true)
end
if not socketping(ip5) then grp.write('10/5/5', true)
end
if not socketping(ip6) then grp.write('10/5/6', true)
end
if not socketping(ip7) then grp.write('10/5/7', true)
end

I have an IPAD an I have tried to ping from windows. If it is looked, doesn't reply to ping, if I unlocked start to reply.
Maybe it is a issue of replying to ping of the Iphone.
Reply


Messages In This Thread
Resident script - IP watchdog - by sorin - 09.10.2017, 14:06
RE: Resident script - IP watchdog - by sorin - 09.10.2017, 14:45
RE: Resident script - IP watchdog - by sorin - 17.12.2017, 16:57
RE: Resident script - IP watchdog - by admin - 03.04.2018, 12:01
RE: Resident script - IP watchdog - by Daniel - 06.11.2019, 21:13
RE: Resident script - IP watchdog - by Daniel - 08.11.2019, 08:54
RE: Resident script - IP watchdog - by admin - 08.11.2019, 09:28
RE: Resident script - IP watchdog - by admin - 08.11.2019, 10:53

Forum Jump: