Hi Harry,
hiermit kannst du ja mal den Wiznet Ping testen
miparo
hiermit kannst du ja mal den Wiznet Ping testen

miparo
Code
Writeln(wSerOut, '-- E-LAB DNS Demo .. --');
mdelay(2000); // Wait for Switch/Hub to see Phy !
BeepOut(250, 20);
HostName:= 'e-lab.de';
WzSetDNSserver(wzTINADNSServer);
if wzDNSQueryHost(@HostName, SearchIP) then
Writeln(wSerOut, #13 + #10 + '-- search IP = ' + IpToStr(SearchIP));
else
Writeln(wSerOut, 'DNS Error');
endif;
if WzPingReq(SearchIP, 100, ATime) then
Writeln(wSerOut, '-- Ping Test OK to: ' + IpToStr(SearchIP) + ',' + IntToStr(ATime) + ' ms');
else
Writeln(wSerOut, '-- Ping Test fails');
endif;
Result:
-- DNS search IP = 87.230.17.144 ; E-Lab.de
-- Ping Test OK to: 87.230.17.144, 30 ms
mdelay(2000); // Wait for Switch/Hub to see Phy !
BeepOut(250, 20);
HostName:= 'e-lab.de';
WzSetDNSserver(wzTINADNSServer);
if wzDNSQueryHost(@HostName, SearchIP) then
Writeln(wSerOut, #13 + #10 + '-- search IP = ' + IpToStr(SearchIP));
else
Writeln(wSerOut, 'DNS Error');
endif;
if WzPingReq(SearchIP, 100, ATime) then
Writeln(wSerOut, '-- Ping Test OK to: ' + IpToStr(SearchIP) + ',' + IntToStr(ATime) + ' ms');
else
Writeln(wSerOut, '-- Ping Test fails');
endif;
Result:
-- DNS search IP = 87.230.17.144 ; E-Lab.de
-- Ping Test OK to: 87.230.17.144, 30 ms