Hi, I am trying to apply new profile to D211.
1. At the begining, D211 has a static IP.
2. I prepare a new profile which will config D211 as a DHCP client.
3. I use the function call Req_Prof_Apply() to apply new profile.
4. The function returns PROF_STATUS_CARDRESTARTED.
5. I remove the card and insert it then.
6. After 10 seconds, the status of the card is still on searching.
I can't get new IP address for the DHCP server.
On the other hand, if the D211 is a DHCP client at the begining,
I can get new IP address after applying new prepared profile.
I don't know how to deal with such problem.
Thank you for your help.
I tested this on Windows CE 3.0. Initially the card was in WLAN mode with static IP address. I then run a test program which applied another WLAN profile (prepared beforehand) with dynamic IP address. It worked fine every time. It seems that either your program is doing something wrong or this is a device-specific problem. Which CE device are you using? Make also sure that the network name in the applied profile is correct.
This is what the test program does:
// open IPC pipe
// apply the profile
I test it on iPAQ H3800. Initially, the card is with static IP.
// open IPC pipe ...
pProfile = CreateProfile ();
pProfile->SetText (MIB_PROF_NAME, ProfileName);
pProfile->SetDword (MIB_PROF_FLAGS, ROF_FLAG_MODE_WLAN);
pProfile->SetBool (MIB_PROF_WLAN_OPMODE, TRUE);
pProfile->SetData (MIB_PROF_WLAN_NETNAMES, strlen(ssid), ssid);
pProfile->SetBool (MIB_PROF_TCPIP_DHCP, TRUE);
Req_Prof_Add (hIpc, pProfile);
Req_Prof_Find(hIpc, ProfileName, &dwIndex);
// remove the card ...
// close the IPC pipe ...
// re-insert the card and wait 10 sec ...
The card is DHCP-enabled, but it keeps on searching network. It doesnt get new IP.
If the card is with dynamic IP initially:
If I remove and reinsert the card, it can't get new IP later and it keeps on searching network; if I doesn't remove the card, it can get new IP instead.
Thank you for your help again.
Does it work any better if you change from a profile with a static IP address to a profile with a dynamic IP address using the D211 Manager window?
Are you absolutely sure that the network name in the profile you are trying to apply is correct?
You say that the card gets a new IP address, if you don't remove the card after applying the profile. Do you mean that this happens even if you have called Req_Ctl_StopCard() after applying the profile?
You could also try if updating the CE drivers for D211 helps. The latest drivers can be downloaded from the D211 product support website.