So, good, we can ignore any possible coding errors on your end. For
now,
I've ignored your code completely and will just address trying to get
ping
to work at least the majority of the time.
And the device, when you are trying to ping it at 192.168.1.101, is
*statically* assigned that IP address or assigned that address by some
DHCP
server? I suppose that the same question probably applies to the
desktop.
When the ping from the PC fails, you might try to verify that the device
*is* in fact connected to the wireless network, that it *does* have the
IP
that you're expecting, and that the subnet mask is correct. It's
possible
that this is a subnetting problem on one end or the other (probably on
the
device end, given the symptoms).
Paul T.
Paul,
I know my english is terrible, I'll try to explain.
The test I have done, are not using code but trying to reach the mobile
device using the command ping from cmd windows.
When I ping the device from my desktop (ping 192.168.1.101), I often
receive the "Request timed out" response.
On the other way, when I call the desktop from the device (using
192.168.1.2 IP address from the Dell Wlan Utility of my device), the
connection is immediately on.
And my impression is that, when the device is contacting the desktop
(and so when the wireless activity is on in the device) the desktop can
reach the device very easily (the 4 ping responses are "Reply from...")
.
Code implication are, in this situation, that messages sent from the
device to the desktop always arrive to destination but in the opposite
direction, from desktop to device, the following ConnectCallbak
routines :
Private Sub ConnectCallback(ByVal ar As IAsyncResult)
Dim client As Socket = CType(ar.AsyncState, Socket)
Try
client.EndConnect(ar) <--- here is the exception
mCommunicationLayer.Display(String.Format("Connesso a
{0}", client.RemoteEndPoint.ToString()))
Catch exc As SocketException
If exc.SocketErrorCode = 10061 Then
mCommunicationLayer.SndFailed("Il server non è
raggiungibile", True)
Else
mCommunicationLayer.SndFailed(exc.Message, True)
End If
client.Close()
Catch exc As Exception
mCommunicationLayer.SndFailed(exc.Message, True)
End Try
ConnectDone.Set()
End Sub
raise the exception "A connection attempt failed because the connected
party did not properly respond after a period of time, or established
connection failed because connected host has failed to respond"
Finally, in some "magic" moments all seems to work properly (ping and
code are OK).
Paul G. Tobey [eMVP] wrote:
No, no ideas. Ping isn't a reliable delivery protocol. I'd be happy
to
have 3 out of 4 ping packets dropped if the processor time is needed
for
something more important. This fragment, in particular, does not
describe
something that I understand, "if it fails continues to fail and
sometimes
I
have to force a ping from client for re-activate client side pinging."
Huh?
I think that we need a clear description of what's actually going on,
who
is
sending what to whom, and what your code is doing during all of this.
Paul T.
Hi,
I am testing an application that must manage Wireless data
communication between a server and mobile devices.
Both, clients and server, have a background TCP socket.
My problem is that, server side, I found big difficulties to begin
the
connection with clients.
I observe the same results pinging the client (in my test a Dell
Axinm)
from server.
Sometimes the ping succeed but often (the majority) it fails; if it
succeed, for a period, continues to succeed, if it fails continues
to
fail and sometimes I have to force a ping from client for
re-activate
client side pinging.
It seems to me that there is in the device a mechanism of wireless
comm
sleeping and waking up.
On the other side if the TCP connection is started by the mobile
dervice, it always works propwerly.
Any idea?
Thanks