This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3100MOD: Cannot receive IP from DHCP when using Wi-Fi Direct P2P

Part Number: CC3100MOD
Other Parts Discussed in Thread: CC3100

Hello community!

I'm working on an older project that uses the CC3100MOD for Wi-Fi communication. I have to implement Wi-Fi Direct (P2P) communication, so the device can communicate with a PC or a Smartphone. So far the discovery of the device (I used the P2P example for reference) is working and i can find it on my PC and my Phone as well. But my Problem is, that when i try to connect to it, i either get a SL_WLAN_CONNECTION_FAILED_EVENT or i never get an IP-Address so i stay in the while-loop that is waiting for the IP-Address for ever. Static IP also doesn't work. The Negotiation Request on the other hand does work and i get that event. DHCP on the PC is enabled!

Has someone had similar problems or does anyone know what i might be doing wrong?

My current config is: 

- Wlan Connection Policy = Fast and Auto

- Wlan P2P Policy = Negotiate and Initiator Random Backoff

- Device Type = 1-0050F204-1

- Security Type = Pin Display

- DHCP enabled

For Testing i have used the UWP Wi-Fi Direct Sample from Microsoft.

  • Does the PC becomes the group owner?

    What was the issue with the static IP?

    Does it work between 2 CC3100 devices? (does the final product requires connecting the a PC?)

    Please provide logs: terminal log from the application, NWP log (see chapter 19 of https://www.ti.com/lit/pdf/SWRU368C) and/or air sniffer (e.g. wireshark) log.

  • Today i managed to connect the device to a Smartphone using Push Button, so maybe it has something to do with my security type. When i try to connect with Display Pin Security and use my own in the device defined Key the connection always fails. 

    When i use Display Pin i can define a Key in my device and when i try to connect using a PC, i have to enter the Key on the PC or did i got this wrong? I'm a little bit confused, because it seems that i can define a Key for Push Button as well.

    Does the PC becomes the group owner?

    How do i check this?

    What was the issue with the static IP?

    After i receive the Negotiation Request I'm stuck in an endless loop where my device waits for the IP_AQUIRED or IP_LEASED Event.

    Does it work between 2 CC3100 devices? (does the final product requires connecting the a PC?)

    I don't have access to a second CC3100 device. The final product already exists. I'm just testing Wi-Fi direct functionality on it. It needs to connect to either PC or Smartphone.

    Please provide logs: terminal log from the application, NWP log (see chapter 19 of https://www.ti.com/lit/pdf/SWRU368C) and/or air sniffer (e.g. wireshark) log.

    A cannot access the UART Pins because the PCB is inside a case. And when i use wireshark i don't really now for what packets i should look for. My PC has 2 Wi-Fi Direct Network Adapters. When i look at the MAC Address that is requesting the Negotiation on my CC3100 in Debug Mode it says the MAC Address of the first Adapter. But when i look at it on Wireshark no traffic is shown at all on this Adapter. When i look on the second Adapter much more traffic is shown but this one has a different MAC Address.

  • Where is the PIN being displayed? Do you have a display panel on your device? if the key is displayed on the PC, you will need to use the PIN_KEY method.

    The key in the wlanconnect command should be ignored (but better set it to 0) in case of PBC.

  • I don't have a display panel on my device. I thought that the key that i specified at the wlanconnect function will be used. I have a key stored in the flash of the device and i want to use this key as a security key that i have to type in when i want to connect to it, is that possible? 

    Also i think there is a bug in the UWP WiFi Direct Sample from Microsoft because sometimes i am able to connect my device to the pc and sometimes it doesn't work. When i try to connect to my smartphone it nearly always works.

    Another strange thing is that when i want to connect to my device through the Windows add device dialog i never receive a Negotiation request. Do you know why this could be?

  • I believe the answer to your question is yes, just use the SL_WLAN_SEC_TYPE_P2P_PIN_KEYPAD.

  • The thing is that I already tried this and was never able to connect to the device. Until now it only worked when using Push Button.

    Do you know why i don't get a negotiation request when i try to connect using the Windows add Device dialog? I read something about Persistent Group Owner and that windows skips the negotiation request and sends an Invitation directly. Is that the case here?

  • I remember some issues with the negotiation request but nothing specific regarding windows or the persistent group owner.

    The Wi-Fi direct is not very popular so we don't deal with these issue frequently.

    I will try to find oud more details from previous issues.