Re: Problem on starting Wireless TCP communication from server



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


.



Relevant Pages

  • Re: Problem on starting Wireless TCP communication from server
    ... The PC subnet mask is 255.255.255.0 ... the wireless connection is almost always ... I've ignored your code completely and will just address trying to get ping ... Dim client As Socket = CType ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Problem on starting Wireless TCP communication from server
    ... Paul G. Tobey wrote: ... the wireless connection is almost always ... And the device, when you are trying to ping it at 192.168.1.101, is ... Dim client As Socket = CType ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Problem on starting Wireless TCP communication from server
    ... And the subnet mask of the PC with which you are trying to communicate? ... the wireless connection is almost always ... I've ignored your code completely and will just address trying to get ping ... Dim client As Socket = CType ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Sharing Modem
    ... right click the local area network connection ... >> DNS Server = none ... On the client computer, right click the local area network ... >> ping 192.168.0.1 ...
    (microsoft.public.windowsxp.network_web)
  • Re: Problem on starting Wireless TCP communication from server
    ... The settings of the wireless adapter in the device ... the wireless connection is almost always ... I've ignored your code completely and will just address trying to get ping ... Dim client As Socket = CType ...
    (microsoft.public.dotnet.framework.compactframework)