• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » WLAN Applications Forum » No valid IP received after WiFi device has a connection to AP
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

No valid IP received after WiFi device has a connection to AP

This question is not answered
James Li
Posted by James Li
on Mar 02 2012 14:07 PM
Intellectual550 points

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

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Eyal a
    Posted by Eyal a
    on Mar 04 2012 16:09 PM
    Genius9240 points

    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

    Regards,

    Eyal

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elad Raz92038
    Posted by Elad Raz92038
    on Mar 05 2012 04:26 AM
    Expert1580 points

    Hi James,

    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

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • James Li
    Posted by James Li
    on Mar 05 2012 15:53 PM
    Intellectual550 points

    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 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 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?

    Regards,

    James

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elad Raz92038
    Posted by Elad Raz92038
    on Mar 06 2012 08:58 AM
    Expert1580 points

    Hi James,

    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.

    - Elad Raz

    CTO

    www.integrity-project.com

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • James Li
    Posted by James Li
    on Mar 06 2012 12:01 PM
    Intellectual550 points

    Hi 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.0

    Frame 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?

    Regards,

    James

    1376.ce6_capture.txt

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elad Raz92038
    Posted by Elad Raz92038
    on Mar 11 2012 06:06 AM
    Expert1580 points

    Hi James,

    I'm not sure, maybe it's routing table issue.

    In any case it's no longer Wifi issue.

    - Elad

    - Elad Raz

    CTO

    www.integrity-project.com

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use