Re: Problem on starting Wireless TCP communication from server
- From: "Zeno Loco" <info@xxxxxxxxx>
- Date: 18 Oct 2006 09:31:16 -0700
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.
"Zeno Loco" <info@xxxxxxxxx> wrote in message
news:1161156825.168648.247370@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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
.
- Follow-Ups:
- Re: Problem on starting Wireless TCP communication from server
- From: Paul G. Tobey [eMVP]
- Re: Problem on starting Wireless TCP communication from server
- References:
- Problem on starting Wireless TCP communication from server
- From: Zeno Loco
- Re: Problem on starting Wireless TCP communication from server
- From: Paul G. Tobey [eMVP]
- Problem on starting Wireless TCP communication from server
- Prev by Date: Re: 2 applications communicating on Windows Mobile 5
- Next by Date: Re: 2 applications communicating on Windows Mobile 5
- Previous by thread: Re: Problem on starting Wireless TCP communication from server
- Next by thread: Re: Problem on starting Wireless TCP communication from server
- Index(es):
Relevant Pages
|