Hi All,
I migrated WL1271 CE6 device driver to CE7 and the device driver is loaded properly when the OS launches. The Wireless Configuration windows pops up and WiFi device detects several APs in the area. I try to connect to an AP with correct encryption info and key value. Then the driver scans, authenticates, associates, and connects to the AP. However, when I click on IP Information tab, I find IP Address is 169.254.218.88, Subnet Mask is 255.255.0.0, and Default Gateway is 0.0.0.0. The same source code I built for CE6 works fine. I have traced the code a little bit and everything looks OK for me. The packet received is 802.11 format and it is converted to 802.3 format and passed to NDIS using NdisMIndicateReceivePacket function. The NdisMIndicateReceivePacket returns NDIS_STATUS_PENDING. I also notice that in CE6, after a new connection is established, the WiFi devices receives a DATA packet which is packet type 2. However, in CE7, even though the device seems having a connection to AP, it never receives DATA packet. I check the AP and find that AP assigns an IP to my device.
Could anyone point out where I should look for?
Any advice is appreciated.
Regards,
James
Hi James,
Sorry however we don’t have experience with Windows CE, we do mainly support Linux driver in that forum so I will neo be able to assist, hope that some other e2e member that has experience with CE will be able to assist
Eyal
There is a big gap between CE6 and CE7 which is the NDIS version that is being used.
The different in the NDIS is at the data-path (one example is that the packets are 802.3 in NDIS 5 and 802.11 in NDIS 6.1) and all OIDs...
However, CE7 have emulation mode (unofficial btw) which allows NDIS 5 drivers to operate under.
But, you shouldn't changed the version of the NDIS at the "NdisMRegisterMiniport".
NdisMInitializeWrapper(&NdisWrapper, pDriverObject, pRegistryPath, NULL); /* Set up the characteristics structure */ NdisZeroMemory(&Chars, sizeof(Chars)); Chars.MajorNdisVersion = 5; Chars.MinorNdisVersion = 1;
Thanks,
Elad.
- Elad Raz
CTO
www.integrity-project.com
Hi Elad,
Thanks for your reply.
Microsoft's document mentions that CE7 still supports legacy NDIS driver, but maybe not fully from what I see. I didn't change the Ndis versions in DriverEntry function. They are still 5.1. I notice one thing interesting. When I use static IP for the WiFi STA, after STA connects to AP, I can ping AP and AP can ping my device also. However if STA uses DHCP to get IP, it gets 169.254.64.168 and 0.0.0.0 for default gateway. It seems that STA never gets the packet containing valid IP from AP or the packet has wrong format.
In CE6, after STA is associated with AP, it sends
00 14 60 f4 60 87 08 00 28 32 66 66 88 8e 01 01 00 00
00 14 60 f4 60 87 08 00 28 32 66 66 88 8e 01 03 00 77 fe 01 09 00 00 00 00 00 00 00 00 10 e4 06 14 01 55 5b ac 32 69 8c ea 96 1a fa 83 ae 48 4a 86 f4 e6 7d 8a 55 ec f5 29 d6 3f f3 44 bf d2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ce f6 b0 c2 5b 63 3e df f1 44 45 4b a7 e5 02 93 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
00 14 60 f4 60 87 08 00 28 32 66 66 88 8e 01 03 00 5f fe 01 09 00 00 00 00 00 00 00 00 10 e5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fe 0f 50 2b c8 c0 f1 43 03 4c 3b a6 56 2e 27 0e 00 00
In CE7, after STA is associated with AP, it sends
00 14 60 f4 60 87 08 00 28 32 66 66 88 8e 01 03 00 77 fe 01 09 00 00 00 00 00 00 00 00 10 54 e6 e4 95 f1 e0 bc d0 89 10 09 14 c9 32 fd 61 fa 5c e6 9b b1 3a 8a 9a 10 8c f7 91 98 94 ab 9f 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ee 25 b1 20 bc 34 b4 ad db 97 52 08 19 d9 77 87 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
00 14 60 f4 60 87 08 00 28 32 66 66 88 8e 01 03 00 5f fe 01 09 00 00 00 00 00 00 00 00 10 d2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 72 a3 dd 3e 36 09 da 81 b4 9d b2 bf 14 49 77 6b 00 00
I haven't been able to figure out what the differences are between CE6 and CE7.
BTW, do you know any good WiFi sniffer which I can use to analyze WiFi packets?
Yes, it's very hard to understand the DHCP packets from these logs. So let me answer the sniffer question first.
There is a very good sniffer I saw at customers - OmniPeek that works on Windows system. It has many drivers (Wildpacket driver) to work with USB adapters. But it's very expensive.
The free software - Wireshark works perfectly on Linux. And with some effort you can find drivers for Windows.
It will be great if you couldn't please send me a sniffer log so I can understand the DHCP packets
- Elad.
I installed Wireshark and it works fine with me so far.
Please find attached file which captures packets after STA has a connection to AP in CE6.
In CE6, you can see that STA sends DHCP discover packet (TYPE 0800 which is IP type). The router broadcasts to find who has 192.168.0.196. If nobody is using 912.168.0.196, it is assigned to STA which is the packet DHCP Offer. The STA sends DHCP Request packet and router returns with DHCP ACK packet. After STA has the lease of that IP and router binds MAC and that IP address.
However in CE7, after STA has a connection to AP, it doesn't send DHCP discover packet. It sends ARP packet asking who has 169.254.137.84 instead. The default gateway is 0.0.0.0 which shows in "Tell 0.0.0.0". I pasted that packet here:
No. Time Source Destination Protocol Length Info 20 15.235271 TexasIns_32:66:66 Broadcast ARP 42 Who has 169.254.137.84? Tell 0.0.0.0Frame 20: 42 bytes on wire (336 bits), 42 bytes captured (336 bits) Arrival Time: Mar 5, 2012 15:47:34.850329000 Pacific Standard Time Epoch Time: 1330991254.850329000 seconds [Time delta from previous captured frame: 0.613601000 seconds] [Time delta from previous displayed frame: 0.613601000 seconds] [Time since reference or first frame: 15.235271000 seconds] Frame Number: 20 Frame Length: 42 bytes (336 bits) Capture Length: 42 bytes (336 bits) [Frame is marked: False] [Frame is ignored: False] [Protocols in frame: eth:arp] [Coloring Rule Name: ARP] [Coloring Rule String: arp]Ethernet II, Src: TexasIns_32:66:66 (08:00:28:32:66:66), Dst: Broadcast (ff:ff:ff:ff:ff:ff) Destination: Broadcast (ff:ff:ff:ff:ff:ff) Address: Broadcast (ff:ff:ff:ff:ff:ff) .... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast) .... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default) Source: TexasIns_32:66:66 (08:00:28:32:66:66) Address: TexasIns_32:66:66 (08:00:28:32:66:66) .... ...0 .... .... .... .... = IG bit: Individual address (unicast) .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default) Type: ARP (0x0806)Address Resolution Protocol (request)
What could be the reason that in CE7 STA doesn't send DHCP discover packet if it is configured to use DHCP?
1376.ce6_capture.txt
I'm not sure, maybe it's routing table issue.
In any case it's no longer Wifi issue.
- Elad