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.

CC3551E: WiFi Direct connections inconsistent

Part Number: CC3551E

Hello,

I have a customer who is testing the WiFi Direct P2P mode, with 2 launchpads, and he noticed that sometimes the connection will fail unless the launchpads are in a specific orientation in relation to each other. Both LP are just being desk tested so they are right next to each other.

Any suggestions on things they can try to make the connection more stable?

Munan

  • Hi Munan,

    Can you please share all commands entered on both launchpads, as well as the errors given that confirm failure? Any sort of log file should be suitable, and this will help me best understand why the connection is unstable to recommend next steps. 

    Can you also please help to confirm which version of the SDK is being used? This way I can try to replicate on my side to troubleshoot.

    Best Regards,

    Josh Prushing

  • Hey Josh,

    I'll let the customer update here with log outputs, but the commands he followed should be what was provided here:

    CC3551E: WiFi Direct connection with 2 Launchpads - Wi-Fi forum - Wi-Fi - TI E2E support forums

    They should be on 9.21.00.15 of the SDK

    Munan

  • Hi Munan,

    I look forward to receiving the log outputs!

    For further clarification, was this error only seen after implementing the patch?

    Best Regards,

    Josh Prushing

  • Hi, I'm the customer in this case. Had a pretty busy week, and couldn't get a response out. But essentially what I'm seeing at a high level is that if the devices cannot find each other within the first few seconds of the connection attempt, then they're pretty much guaranteed to never connect and timeout instead. Doesn't really matter the length of the timeout (I have shortened it from the default for this reason).

    Haven't confirmed yet, but I believe that the current draw will drop very low if it's not going to connect, like it's stopped searching far before a timeout, but I could be imagining that. Was quite tired when testing last week. Will see about getting some captures today or tomorrow if I am able to confirm it.

    There's nothing in the logs really, other than the eventual timeout error.

    At first, I thought it was orientation related, but after testing last week I don't think that makes much of a difference.

  • Hi Ian,

    I haven't been able to re-create this issue yet, I'll keep trying to reproduce this alongside the other 5GHz investigation.

    Just to confirm, is the timeout occurring after the p2p_connect -m <> -w 0 -p 0 command or the p2p_find -n 10 command?

    Best Regards,

    Josh Prushing

  • Yes, it is happening after the p2p_connect commands.

    This is a successful connect. I've using current-sense-resistors on the 1.8V rail (Yellow trace) and the 3.3V rail (Green trace) to monitor current consumption. The initial activity is doing the role up and initial connect command. Then there's a pause, and then the connection is successful with more clear activity. I stopped the capture early, since there was no reason to continue.

    In the log you can see it go through every step appropriately, with the P2P connect command executing and then several WLAN EVENT HANDLER lines about the connection associating and then being successful.

    R btn!
    Starting WLAN
    
    cme: osi_ThreadCreate
    Event_Thread: thrd is running
    
    Starting software download.....
    
    received ROM init complete.....
    R btn!R btR !RbR btn!-------------- Download First CMD
    -------------- Download IniParams
    -------------- Wait for IniParams complete
    
    Wlan start success!
    Starting Device with p2p params: operational channel=6, listen channel=6, goInte                                                                      nt=4
    operational regulatory class=81, listen regulatory class=81
    
    CME :CmeDeviceFlowSmValidateTransitionUserEvent: Valid state :1, ENUM(Cme_STA_ev                                                                      ents_e, 0) current state ENUM(Cme_DEVICE_states_e, 0)
    P2P Role Up
    
    Connecting P2P
    
    CME  roleType sta or p2p client doesn't exists
    [WLAN EVENT HANDLER]P2P Scan completed event arrived
    
    
    [WLAN EVENT HANDLER] WLAN_EVENT_DISCONNECT
    [WLAN EVENT HANDLER] Device disconnected from the AP: ,
    BSSID: 0:0:0:0:0:0, reason code :200
    P2P connect, peer address: 2e:d3:ad:a8:5a:86 security-type:6 pin:0 pin_len:0
    
    [WLAN EVENT HANDLER] WLAN_EVENT_CONNECTING, STA is connecting
    
    [WLAN EVENT HANDLER] WLAN_EVENT_ASSOCIATED, STA associated
    
    [WLAN EVENT HANDLER] WLAN_EVENT_CONNECTING, STA is connecting
    
    [WLAN EVENT HANDLER] WLAN_EVENT_ASSOCIATED, STA associated
    [WLAN EVENT HANDLER] P2P GROUP STARTED
    
    Ip address was not received!!
    
     link_callback==UP starting DHCP
     DHCP is 0
    
    [WLAN EVENT HANDLER] WLAN_EVENT_P2P_GROUP_STARTED
     P2P ,ROLE CLIENT connected. GO Bssid: 2c:d3:ad:a8:5a:85 on Channel :6
    
    [p2p_connect app] : connected !!!!
    status_callback==UP, local interface IP is 10.0.0.4
    

    This is the scope capture of the power rails when the connection never completes and then times out. You can see the initial activity at the beginning, then the 3.3V rail drops to no current and the 1.8V has a low pulse. It's almost like it thinks it's found something, and then it gives up when it should be connecting.

    The log looks like it follows that pattern. The line "P2P Scan completed event arrived" happens, then a "WLAN_EVENT DISCONNECT" and the P2P Connect line, like above. Then it sits there until it times out and proves the "Timeout expired" line.

    R btn!
    Starting WLAN
    
    cme: osi_ThreadCreate
    Event_Thread: thrd is running
    
    Starting software download.....
    
    received ROM init complete.....
    R btn!R btn!-------------- Download First CMD
    -------------- Download IniParams
    -------------- Wait for IniParams complete
    
    Wlan start success!
    Starting Device with p2p params: operational channel=6, listen channel=6, goIntent=8
    operational regulatory class=81, listen regulatory class=81
    
    CME :CmeDeviceFlowSmValidateTransitionUserEvent: Valid state :1, ENUM(Cme_STA_events_e, 0) current state ENUM(Cme_DEVICE_states_e, 0)
    P2P Role Up
    
    Connecting P2P
    
    CME  roleType sta or p2p client doesn't exists
    [WLAN EVENT HANDLER]P2P Scan completed event arrived
    
    
    [WLAN EVENT HANDLER] WLAN_EVENT_DISCONNECT
    [WLAN EVENT HANDLER] Device disconnected from the AP: ,
    BSSID: 0:0:0:0:0:0, reason code :200
    P2P connect, peer address: 2e:d3:ad:a8:5a:86 security-type:6 pin:0 pin_len:0
    
    [p2p_connect app] : Timeout expired connecting WiFi-Direct: 6
    
    [WLAN EVENT HANDLER] WLAN_EVENT_P2P_GROUP_REMOVED! RoleType=3

    I have also seen where the pulses continue on the green ages, but it still doesn't connect. This capture is on a much shorter time scale though.

    Another timeout capture:

    A capture featuring a successful connection and then I restart both boards and attempt a new connection that times out:

    I kind of hard coded some commands to do all this with a button press, so it's possible there's session info that is normally added as part of entering it as a terminal command that I'm missing. Something that wouldn't cause a compilation error but might make connections more unstable.

  • Hi Ian,

    Outside of the automation of the commands, were there any other edits to the example that I should be aware of? Since your p2p_role_up command is using 2.4GHz channels, I assume that the sta_wifi_band is still set to BOTH here (or 2.4GHz only).

    Since I have not run into this with the default example, I am wondering if there is some power saving setting that somehow got toggled and is causing this.

    One other question - just to confirm the test setup, are you using two cc35xx devices that are connecting to each other? I see in the first log that this is a cc35xx device being connected in STA mode (isn't the group owner), so I was curious if there was anything on the AP (group owner) side that could give some evidence as to what is going on.

    Best Regards,

    Josh Prushing

  • Yeah, it's using the BOTH setting in my case. Haven't tried with only 2.4 selected. Will see if I can test that tomorrow. Trying to get my files diffed from the template to see if I can find some power settings or something. Forgot to set it up with git at the beginning.

    I added a time delay between role up and connect to see if that changes it, but that didn't fix it.

    Looking at the logs, it's the same output on the AP side. No errors or anything that are different. Only thing that changes between trials is the goIntent variable in the role up command. I use rng to choose it (just so both don't have the same intent if possible), which device has the higher priority doesn't seem to matter as far as connection success.

  • Also, to answer your initial question all the way at the top, if I remember correctly, I couldn't connect P2P at all before the patch referenced in the other thread, so I suppose you could say I don't think I saw any of this before the patch Laughing

    Can't remember if I saw this using just keyboard inputs, I'll go back and reconfigure stuff tomorrow to test that as well. If it works well there then it's likely some support data I'm leaving out of my commands that's breaking stuff.

  • Hi Ian,

    Thanks for all the info! 

    If you're able to confirm that the keyboard inputs work for you, I think that is indicative of something in the push button script throwing things off and we can take a deeper look at that to see what specifically is going on there.

    I've still been unable to reproduce the issue using my keyboard inputs, are you able to share your script so that I can understand how it is interacting with the device? I'll take a look at this early next week to see if I see the same timeout.

    Best Regards,

    Josh Prushing

  • Okay, sorry for the long wait, had some trouble suddenly getting my code to actually upload due to a missing launch config in other examples that I didn't realize was important.

    So slight correction to what I said above. Before the fixes from the other thread, I could actually connect with P2P, it was running iPerf that wouldn't work. I tested this by removing those two fixes and was still able to connect.

    Secondly, I tried again with a clean example with 0 changes, so just the keyboard inputs, and I'm still getting failure to connect. It feels less common than with the push button, but that might be because I have to enter everything with the keyboard every time, so it's much slower between attempts. Still running version 9.21.00.15 of the SDK, not version 9.22.00.15 of the SDK. Looking at that changelog I don't think there was anything related to this, but who knows. Haven't tried that version.

    It also very well could be a strange hardware issue with one of my boards. I have a third one for backup that I could perhaps try, but since I've finished up the testing I needed for this project I'm moving on to another, which limits the time I have to investigate this.

  • Hi Ian,

    No worries, thanks for your patience on this! 

    I think the quickest way for us to identify the root cause now is to take both firmware and sniffer logs. If we are able to get these logs for a scenario where the devices connect vs when they don't, I can compare to what I am seeing on my side and that should make it clear what is causing these devices to not connect!

    In addition, can you answer the questions below? I don't think these would be root cause but good to double check!

    • Do you have 2 USB-C cables plugged into the CC3551E + XDS110 Debugger?
      • Are these confirmed working cables?
    • When you say clean example with 0 changes, was this a cleanly flashed device from toolbox running an unedited network terminal example?
      • If so - which toolbox version?
    • What are you connecting the CC3551E to?
      • I want to ensure that the changing goIntent value isn't causing any issues - for instance if the CC3551E has a higher goIntent value and the other device is expecting to be the Group Owner, maybe that could be causing an issue? Again, I don't think this is the case but just want to confirm there's nothing with the other device that could be impacting this.
    • Do the jumpers on the CC3551E match the image on page 4 of the LaunchPad User's Guide?

    Best Regards,

    Josh Prushing