3 Replies Latest reply on Dec 10, 2019 1:13 AM by RaktimR_11

    WiFi direct group owner fails on some devices

    WoKi_4454086

      I am having issues connecting to the CYW4343W using WiFi direct on some devices. The wifi chip is from Murata, type 1DX. I have tested 6 devices of which 4 work all the time and 2 almost never work.

      In all cases the Wiced stack shows that the connection setup was successful but the phones stop connecting after a certain amount of time. I have copied the log from the Wiced device below, the first log shows a connection setup that is completed successfully.

      Connection Request from: AA:96:75:04:EB:9E Moto status=02

      Starting registrar in PBC mode

      PBC overlap detection window start 0

      Starting WPS Registrar

       

      WPS enrollee associated:  AA:96:75:04:EB:9E

       

      WPS completed successfully

      connection_p2p_wps_result_handler: WPS completed successfully

       

      WPA2 client associated:  AA:96:75:04:EB:9E

       

      And in the next case the connection fails.

      Connection Request from: 32:C7:AE:46:5A:BE [Phone] Samsung status=02

      Starting registrar in PBC mode

      PBC overlap detection window start 0

      Starting WPS Registrar

       

      WPS enrollee associated:  32:C7:AE:46:DA:BE

      Received probe request asserting PBC mode from last enrollee

       

      WPA2 client associated:  32:C7:AE:46:DA:BE

      WPS completed successfully

      connection_p2p_wps_result_handler: WPS completed successfully

      And after a while:

       

      P2P device disassociated:  32:C7:AE:46:DA:BE

      The main difference i see is that the message: 'Received probe request asserting PBC mode from last enrollee' is only shown in the failing example. But I also have seen another device where this message is shown during the connection phase but that device connects normally.

       

      So my first question is: Does the 'Received probe request asserting PBC mode from last enrollee' message indicate a problem in the setup stage?

      The second question is: Why does the Wiced stack say connection success while the phone does not indicate having a connection?

       

      I have also gathered logs from the android devices and one thing I noticed is that there are some messages that are unhandled for example:

      D/WifiP2pService: GroupNegotiationState{ what=131213 }

      D/WifiP2pService: GroupCreatingState{ what=131213 }

      D/WifiP2pService: P2pEnabledState{ what=131213 }

      D/WifiP2pService: DefaultState{ what=131213 }

      E/WifiP2pService: Unhandled message { what=131213 }

      I don't see these Errors on devices where the connection always works.

       

      My third question is: What causes the messages being lost and why does the Wiced stack not handle them?

      Any other advice on improvements are appreciated.

       

      Finally I would like to share the settings of the WiFi direct module:

      static besl_p2p_device_detail_t p2pDetails =

      {

          .wps_device_details =

          {

              .device_name = "DIRECT-P2P",

              .manufacturer = "Manufacturer",

              .model_name = PLATFORM,

              .model_number = "Model",

              .serial_number = "12345670",

              .device_category = WICED_WPS_DEVICE_COMPUTER,

              .sub_category = 7,

              .config_methods = WPS_CONFIG_PUSH_BUTTON | WPS_CONFIG_VIRTUAL_PUSH_BUTTON | WPS_CONFIG_DISPLAY | WPS_CONFIG_VIRTUAL_DISPLAY_PIN | WPS_CONFIG_KEYPAD,

              .authentication_type_flags = WPS_OPEN_AUTHENTICATION | WPS_WPA_PSK_AUTHENTICATION | WPS_WPA2_PSK_AUTHENTICATION,

              .encryption_type_flags = WPS_NO_ENCRYPTION | WPS_MIXED_ENCRYPTION,

          },

          .listen_channel =

          {

              .country_string = "XX\x04",

              .operating_class = 81,

              .channel = 1,

          },

          .operating_channel =

          {

              .country_string = "XX\x04",

              .operating_class = 81,

              .channel = 6,

          },

          .channel_list =

          {

              .country_string = "XX\x04",

              .p2p_channel_list_table =

              {

                  { 81, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, },

                  { 115, 36, 40, 44, 48, },

                  { 124, 149, 153, 157, 161, },

              },

          },

          .group_owner_intent = 15,

          .go_configuration_timeout = 100,    // 1000 milliseconds (Units of 10 milliseconds)

          .client_configuration_timeout = 50, // 500 milliseconds

          .device_password_id = WPS_DEFAULT_DEVICEPWDID,

          .peer_device_timeout = 60000, // For timing devices out of the p2p peer list (in milliseconds)

          .group_formation_timeout = 30000, // For timing out a group formation attempt (in milliseconds)

          .p2p_capability = 0x0820, // Intra BSS Distribution, Invitation Procedure

      };

      And the android devices that where used:

      • Samsung Galaxy S5 mini - android 6.0.1 - Does not work
      • Google Pixel 4 - android 10 - Does not work
      • Samsung Galaxy Tab S2 - android 7.0 - Does work
      • Motorola G5 Plus - android 8.1.0 - Does work
      • Xiaomi mi pad 4 - android 8.1.0 - Does work
      • LG Nexus 5 - android 6.0.1 - Does work