Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem detecting Web connection

1 view
Skip to first unread message

smoody

unread,
Feb 4, 2003, 4:16:39 PM2/4/03
to
Hi,

I have an application that synchronizes data from a web site to the pocket
pc. Within the application I have the following method to determine if there
is an available internet connection from the device.

internal bool isConnected() {
bool myValue = false;

//detect IIS connection
TcpClient tcp = new TcpClient();
try {
tcp.Connect(this.myServer, 8080);
myValue = true;
}
catch {}
finally {
tcp.Close();
}
return myValue;
}

This works correctly if either, the device is in the cradle or I am
connected via a wireless connection. However, when I am in the cradle and
have the wireless connection turned on, this routine always returns false.

Does anyone have any ideas on how to resolve this problem. Any suggestions
would be appreciated.


Paul G. Tobey [eMVP]

unread,
Feb 4, 2003, 4:38:04 PM2/4/03
to
Have you tried something similar with C? What is the value of this.myServer
(IP address, name for DNS lookup)? What do you know about the IP addresses
assigned to the wireless endpoint and to the cradle connection?

Paul T.

"smoody" <smo...@smoody.com> wrote in message
news:OWX$ULJzCHA.2916@TK2MSFTNGP09...

smoody

unread,
Feb 4, 2003, 5:09:29 PM2/4/03
to
Paul,

I have not tried this w/ C.
The value of myServer is a name for DNS lookup.
I do not have any information about the IP addresses assigned to the
wireless endpoint or the cradle connection.


"Paul G. Tobey [eMVP]" <ptobey...@instrument.com> wrote in message
news:OKf9tXJzCHA.2648@TK2MSFTNGP11...

Paul G. Tobey [eMVP]

unread,
Feb 4, 2003, 5:12:58 PM2/4/03
to
You'll need to start collecting some of that information to debug this
problem. Try, rather than a name, an IP address first. I would guess that
it won't work, either, but, if it does, that's tells us something. You
should be able to get the IP address of the wireless card, either through
the Network control panel applet on the device or by using IPCONFIG on it.
IPCONFIG may even give you the IP information for the cradle connection.

I'd suggest that you try this in C, so that the .NET CF can be eliminated as
the source of the problem, too.

Paul T.

"smoody" <smo...@smoody.com> wrote in message

news:OJj1wnJzCHA.1712@TK2MSFTNGP10...

Neil Cowburn [MVP]

unread,
Feb 4, 2003, 5:37:52 PM2/4/03
to
Firstly, to perform an ipconfig on a Pocket PC you need to install
PocketConsole, PocketCMD and NetTools from this website:

http://www.symbolictools.de/public/pocketconsole/applications/nettools/

The IP address of the cradled interface will be in the 192.168.55.x subnet,
as this is what ActiveSync uses.

Smoody,
Are you using a fully qualified domain name (FQDN) for the DNS lookup (i.e.
www.foo.com), or are you using a NetBIOS machine name (i.e. foo)?


--
Neil Cowburn
Technologist/Microsoft Windows Embedded MVP
Content Master Ltd.


"Paul G. Tobey [eMVP]" <ptobey...@instrument.com> wrote in message

news:Oza8PrJzCHA.2188@TK2MSFTNGP10...

smoody

unread,
Feb 4, 2003, 5:39:13 PM2/4/03
to
Paul,

Using an IP address didn't work as you suspected. I am not familiar w/
IPCONFIG for the Pocket PC. If this utility does exist for the PocketPC
where can I get it?

I was able to get the IP address for the wireless card. So far I have not
been able to get the assigned IP address for the active sync connection.

Scott


I was able to get the IP address for the wireless connection, the IP address
for both the wireless and activesync


"Paul G. Tobey [eMVP]" <ptobey...@instrument.com> wrote in message

news:Oza8PrJzCHA.2188@TK2MSFTNGP10...

smoody

unread,
Feb 4, 2003, 5:49:38 PM2/4/03
to
Neil,

Thanks for the information. I am using just the NetBios machine name and not
the fully qualified domain name.

Scott


"Neil Cowburn [MVP]" <ne...@online.cowburn.me.uk> wrote in message
news:OAQaD4JzCHA.2916@TK2MSFTNGP09...

Alex Feinman

unread,
Feb 4, 2003, 9:41:36 PM2/4/03
to
You should be using FDQN as NetBIOS name resolution might not work.

"smoody" <smo...@smoody.com> wrote in message

news:O9hhK#JzCHA.2648@TK2MSFTNGP11...

0 new messages