Re: TcpClient Problem



OK, but why did the other device work - it obviously managed to interpret
the string as an IP address!

Andy

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:uh$6A1zDIHA.4228@xxxxxxxxxxxxxxxxxxxxxxx
When you pass a string, that's interpreted as a host name, *NOT* an IP
address.

Paul T.

"Andy Baker" <abaker@xxxxxxxxxxxxxxxxxx> wrote in message
news:13h6vil22tnev53@xxxxxxxxxxxxxxxxxxxxx
I have got it working. I have changed the code to create the TcpClient
first, then connect using an IPAddress rather than a string i.e.
Dim ParsedIPAddress as IPAddress
ParsedIPAddress = IPAddress.Parse("192.168.1.10")
client = New TcpClient
client.Connect(ParsedIPAddress, PORT_NUM)
and it works as it did before on the previous WiFi card/CE combination. I
don't know why it should work with one and not the other, but at least it
gets me out of trouble. Thanks for your help.

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message news:O03dFFeAIHA.1204@xxxxxxxxxxxxxxxxxxxxxxx
No. Connectivity is all you need. Maybe you specified the wrong port
number or something. As Simon said, try plain sockets, if that doesn't
seem to be the problem...

Paul T.

"Andy Baker" <abaker@xxxxxxxxxxxxxxxxxx> wrote in message
news:13fpe5sjrsuab40@xxxxxxxxxxxxxxxxxxxxx
It seems to be more complicated than that. I should have said that I
can ping the host PC from the device successfully using the same IP
address as I am using in the TcpClient I have checked the wireless
configuration settings and they seem to be identical. Under the
'Wireless Information' tab it reports it as being connected and IP
information / subnet mask is correct. Are there any more settings that
I am not aware of?

Andy Baker

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message news:eT89yKSAIHA.968@xxxxxxxxxxxxxxxxxxxxxxx
It sounds like there is no network path from you, on the device, to
the PC. That's probably not a feature of what sort of an adapter is
used, but whether it's actually connected to the right access
point/wireless network. You should compare the wireless configurations
on the two devices...

Paul T.

"Andy Baker" <abaker@xxxxxxxxxxxxxxxxxx> wrote in message
news:13fn9a8lt4cr925@xxxxxxxxxxxxxxxxxxxxx
I have a VB.NET 2003 application that has been running successfully on
a device running CE.NET 4.2. I have recently been supplied with the
latest version of the device, which runs CE.NET 5, and also has a
different WiFi adapter to my original version. The application
connects to a desktop PC using a TcpClient as follows:-

Private client as TcpClient
client = New TcpClient(IPAddress, PORT_NUM)

where IPAddress is 192.169.1.10 (the address of the host PC) and
PORT_NUM is a constant - the number of the port I want to use for the
connection (10000 in this case). The application on the host PC has a
listener object waiting for a connection on the same port number. On
the CE 4.2 device it works fine, on the new one I get the error
message 'No such host is known' after a few seconds (on the New
TcpClient line above). Is this likely to be a CE problem or a WiFi
adapter problem (or something else), and what can I do about it?
Thanks in advance.

Andy Baker













.



Relevant Pages

  • Re: TcpClient Problem
    ... Paul T. ... can ping the host PC from the device successfully using the same IP ... address as I am using in the TcpClient I have checked the wireless ... the connection. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: TcpClient Problem
    ... I've not been able to get them to interpret a string ... Paul T. ... can ping the host PC from the device successfully using the same IP ... address as I am using in the TcpClient I have checked the wireless ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: TcpClient Problem
    ... When you pass a string, that's interpreted as a host name, *NOT* an IP ... Paul T. ... Dim ParsedIPAddress as IPAddress ... as I am using in the TcpClient I have checked the wireless configuration ...
    (microsoft.public.dotnet.framework.compactframework)
  • TcpClient Problem
    ... Private client as TcpClient ... The application on the host PC has a listener object waiting ... for a connection on the same port number. ... problem or a WiFi adapter problem, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: TcpClient Problem
    ... ping the host PC from the device successfully using the same IP address as I ... am using in the TcpClient I have checked the wireless configuration settings ... adapter to my original version. ... object waiting for a connection on the same port number. ...
    (microsoft.public.dotnet.framework.compactframework)