Re: Advanced WinINet - Please HELP!



1. You'd have to actually verify that DHCP packets are making it through the
access point and so on. Right now, we can't tell if you have no valid
connection to an AP (which might certainly generate that error dialog), or
what. If the unit is associated with the AP all the time and you eventually
get the message anyway, capture the packets from your device on the Ethernet
side of the AP and verify that DHCP requests are making it through. If they
are, verify that a DHCP server is replying. If not, the problem is with
your server.

If a server is replying, there could, conceivably be a problem with DHCP on
the unit or with the AP. Make sure that the OS in the device is fully
updated with the latest QFEs. You might also check the length of the lease
on an IP address that is given by the server. That error message is caused
when the lease expires without the device being able to renew it first.
Renewal attempts begin 1/2 way through the lease so, if a 1 hour lease is
assigned, the device will try to renew 1/2 hour after the lease is given.
If, when the hour is up, the lease has not been renewed by the server, you
get that message. If there's no more information to had, you'll just have
to live with it.

There's not going to be any retry after that dialog, even if you could
silence it (I'm not aware of a registry setting to do so, however). You'd
have to unbind and rebind the adapter to get DHCP to ever run again.

3. You can detect that a connection has changed and terminate your current
session and start a new one, if you want. I've previously posted how to
capture change-of-state information about a network adapter. When you get
one of those from your target adapter, you'd notify (however you do that),
all of your FTP threads that they should terminate whatever operation
they're doing. Then, if the change that was signalled was a connect (new AP
or whatever), you could trigger the FTP process, again.

Paul T.


"EvaBerzbach" <EvaBerzbach@xxxxxx> wrote in message
news:O9OtraFcFHA.2420@xxxxxxxxxxxxxxxxxxxxxxx
> hello paul!
>
> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
> schrieb im Newsbeitrag news:OG26r8CcFHA.3184@xxxxxxxxxxxxxxxxxxxxxxx
>
>> 1. You'll have to research this a *lot* more and tell us what is really
>> going on before we can tell you anything. We have *no* information on
>> the
>> problem, at this point.
>
> [ dhcp error message box sometimes pops up when using wlan ]
>
> ;) well i don't really know where to look at.
> 1) there is no low-level manipulation, only usage of high-level wininet
> api
> 2) im always connecting to the same ftp server, via ip address. im using
> a very basic set of wininet functions - just connect/disconnect and ftp
> get/put & setdir.
> 3) the conditions are not clear. there is no specific access point, device
> etc.
> which provokes the behaviour - that's why i called it 'random'; it just
> happens sometimes.
>
> 3) yet prevented the problem from being analysed properly. it is not known
> which call
> to wininet functions triggers it (e.g. does it occur when trying a new
> connect, or only when
> an existing, valid handle is used in subsequent (get/put) calls on a
> connection which became
> (physically) unavailable recently).
>
> it seems to me, however, that the problem is that for some reason (access
> point user overflow,
> wlan driver problem, internal ce internet handling, whatever) the system
> sometimes can not obtain a client ip address although there is an
> otherwise
> working connection to the internet.
> i guess it would be possible to avoid it by using some kind of static ip
> mechanism
> - but i also guess that would not be a very good idea due to the
> complexity
> and
> heterogeny of the networks communicating with the client.
>
> i would be happy, anyway, if i knew a simple method (e.g. registry
> configuration) to
> just make the system shut up, fail the corresponding function silently,
> and
> let me retry the
> connection without disturbing my application's gui/users. :)
>
>>
>> 2. You can rebind the network adapter using IOCTL_NDIS_REBIND_ADAPTER
>> (you
>> can look it up in the help or in the archives of this newsgroup or
>> microsoft.public.windowsce.platbuilder).
>
> thank you for the hint, i will try to use that.
>
>> 3. No, you can't do this specifically for FTP. You can change the global
>> TCP/IP behavior, but that's all (there's a *good* reason for that, too,
>> so
>> you'll need a much better reason for wanting to change things).
>
> hmmm, just as i guessed. :/
> maybe there is a general tcp/ip (registry) setting which indirectly
> controls
> the timeout for ftp get/put?
> well there is a good reason i would like to have some control over the
> maximum time
> a network operation (like ftp get) takes in a clean way, without the need
> for unfriendly
> thread kills. :)
> there is also the problem that the application is used in a rapidly
> changing
> wireless network
> environment, so i don't want connections to hang for minutes - i'd like to
> disconnect the current one (probably that access point is out of reach now
> anyway) and try a new one.
>
> thank you for your reply,
> kind regards,
> patrick
>
> ----
> if replying via email, please mailto: ragingbender@xxxxxx
>
>


.



Relevant Pages

  • Re: dhcp-client cleanup
    ... Internet Systems Consortium DHCP Client V3.0.3 ... when the client gets it's first lease. ... and leaves me in a "funny" state where further attempts to bring up the connection manually just fail..otoh as I mentioned earlier.. ...
    (comp.os.linux.networking)
  • Re: DHCP too slow - trying to cache
    ... wi-fi television remote control designed to be used in the home. ... the wi-fi connection is to be kept off as much as possible ... I'm seeing 30 seconds or more when DHCP is ... Even if you've reconnected before the lease expires, ...
    (microsoft.public.windowsce.app.development)
  • Re: DHCP too slow - trying to cache
    ... So, when you *don't* use DHCP, the connection is 20-30 seconds faster? ... > wi-fi television remote control designed to be used in the home. ... Even if you've reconnected before the lease expires, ...
    (microsoft.public.windowsce.app.development)
  • Re: DHCP too slow - trying to cache
    ... The dhcp spec does specify that a dhcp client should wait a random time ... > connection to the AP and another 7 or so to get the address. ... >> wi-fi television remote control designed to be used in the home. ... Even if you've reconnected before the lease expires, ...
    (microsoft.public.windowsce.app.development)
  • Re: Router install problem
    ... that's the Internet (the Wide Area ... LAN side of the router is ... "Internet Connection Wizard" are relevant to the way I was trying to ... and 5 buttons on the left (Wizard, Wireless, WAN, LAN, DHCP). ...
    (microsoft.public.windowsxp.network_web)