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.

WiFi direct in GO autonomous mode dont connect with tablet

Hi,

I follow the below link to connect my board and samsung tablet.

iw phy `ls /sys/class/ieee80211/` interface add p2p0 type managed
wpa_supplicant  -iwlan0 -Dnl80211 -c/etc/wpa_supplicant.conf -N -ip2p0 -Dnl80211 -c/etc/p2p_supplicant.conf &
wpa_cli -ip2p0
p2p_group_add
wpa_cli -ip2p-p2p0-0
wps_pbc

From the tablet I select the displayed device and it shows connecting. In the terminal I could see the below messages.

p2p-p2p0-0: WPS-PBC-ACTIVE

OK

<3>WPS-PBC-ACTIVE

> P2P-PROV-DISC-PBC-REQ 16:b4:84:0c:45:bc p2p_dev_addr=16:b4:84:0c:45:bc pri_dev_type=10-0050F204-5 name='LCC Lennox Contro (SM-' config_methods=0x188 dev_capab=0x25 group_capab=0x0

<3>WPS-ENROLLEE-SEEN 16:b4:84:0c:c5:bc 4c3575ed-8f06-5b79-94e4-9463b16560c4 0-00000000-0 0x2148 4 1 [ ]

<3>WPS-ENROLLEE-SEEN 16:b4:84:0c:c5:bc 4c3575ed-8f06-5b79-94e4-9463b16560c4 0-00000000-0 0x2148 4 1 [ ]

<3>WPS-ENROLLEE-SEEN 16:b4:84:0c:c5:bc 4c3575ed-8f06-5b79-94e4-9463b16560c4 0-00000000-0 0x2148 4 1 [ ]

<3>WPS-ENROLLEE-SEEN 16:b4:84:0c:c5:bc 4c3575ed-8f06-5b79-94e4-9463b16560c4 0-00000000-0 0x2148 4 1 [ ]

<3>WPS-ENROLLEE-SEEN 16:b4:84:0c:c5:bc 4c3575ed-8f06-5b79-94e4-9463b16560c4 0-00000000-0 0x2148 4 1 [ ]

<3>WPS-ENROLLEE-SEEN 16:b4:84:0c:c5:bc 4c3575ed-8f06-5b79-94e4-9463b16560c4 0-00000000-0 0x2148 4 1 [ ]

> p2p-p2p0-0: CTRL-EVENT-EAP-STARTED 16:b4:84:0c:c5:bc

<3>CTRL-EVENT-EAP-STARTED 16:b4:84:0c:c5:bc

> p2p-p2p0-0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1

<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1

> p2p-p2p0-0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254

<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254

> p2p-p2p0-0: WPS-REG-SUCCESS 16:b4:84:0c:c5:bc 4c3575ed-8f06-5b79-94e4-9463b16560c4

<3>WPS-REG-SUCCESS 16:b4:84:0c:c5:bc 4c3575ed-8f06-5b79-94e4-9463b16560c4

> p2p-p2p0-0: WPS-PBC-DISABLE

<3>WPS-PBC-DISABLE

> p2p-p2p0-0: WPS-SUCCESS

<3>WPS-SUCCESS

> p2p-p2p0-0: CTRL-EVENT-EAP-FAILURE 16:b4:84:0c:c5:bc

<3>CTRL-EVENT-EAP-FAILURE 16:b4:84:0c:c5:bc

> p2p-p2p0-0: AP-STA-CONNECTED 16:b4:84:0c:c5:bc p2p_dev_addr=16:b4:84:0c:45:bc

<3>AP-STA-CONNECTED 16:b4:84:0c:c5:bc p2p_dev_addr=16:b4:84:0c:45:bc

> AP-STA-CONNECTED 16:b4:84:0c:c5:bc p2p_dev_addr=16:b4:84:0c:45:bc

After a while the tablet shows the device with tab here to connect and in the terminal below is displayed.

<3>WPS-ENROLLEE-SEEN 44:91:db:03:31:41 311be49c-9aed-55f8-ba32-7a9f9c5ce056 10-0050F204-5 0x4288 0 0 [A093]

> p2p-p2p0-0: AP-STA-DISCONNECTED 16:b4:84:0c:c5:bc p2p_dev_addr=16:b4:84:0c:45:bc

<3>AP-STA-DISCONNECTED 16:b4:84:0c:c5:bc p2p_dev_addr=16:b4:84:0c:45:bc

> AP-STA-DISCONNECTED 16:b4:84:0c:c5:bc p2p_dev_addr=16:b4:84:0c:45:bc

But if I configure my device as below

p2p_find
p2p_peers
p2p_connect 84:dd:20:66:a8:59 pbc freq=2412

Now a popup is displayed in the samsung tablet asking to connect and on giving connect the connect is successful.

Why is it failing in the autonomous mode?

Regards,
Johncy.

  • Hi Johncy,

    Can you try: "p2p_group_add freq=2412" and see if it helps?

    Regards,
    Gigi Joseph.
  • Hi Gigi,
    Thanks. What I did now is by giving p2p_group_add freq=2412, my device is seen in the tablet in the WiFi Networks with the ssid which is generated for p2p_group_add result. I select the displayed ssid and give the password which is generated for p2p_group_add result. Now I am able to connect the tablet and my device. But I wanted to give my SSID and password. So I followed by your previous post reply as given below.
    e2e.ti.com/.../1292502
    Added in p2p_supplicant.conf
    network={
    ssid="Direct-xy-ABCD"
    psk="wifidirect"
    }
    and gave p2p_group_add freq=2412 persistent=0
    But I get as below,
    > p2p_group_add freq=2412 persistent=0
    OK
    <3>P2P-GROUP-STARTED p2p-p2p0-2 GO ssid="DIRECT-rW" freq=2412 passphrase="woD9YX2u" go_dev_addr=78:a5:04:22:67:1b
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan
    <3>AP-STA-CONNECTED 14:b4:84:0c:45:bc
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan
    <3>AP-STA-DISCONNECTED 14:b4:84:0c:45:bc
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan
    <3>CTRL-EVENT-SCAN-RESULTS
    <3>WPS-AP-AVAILABLE
    <4>Failed to initiate sched scan

    How do I give my ssid and password?

    Regards,
    Johncy.
  • I tried adding the below in p2p_supplicant.conf and still the ssid and password mentioned here is not taken.
    network={
    mode=3
    disabled=2
    ssid="DIRECT-AB-example"
    key_mgmt=WPA-PSK
    proto=RSN
    pairwise=CCMP
    psk="12345678"
    }
    Also tried adding this in wpa_supplicant.conf file alone and still the same issue.
  • Hi,

    Please share the config files...

    Regards,
    Gigi Joseph.
  • #wpa_supplicant.conf
    ##### wpa_supplicant configuration file template #####
    #
    # This option can be used to allow wpa_supplicant to overwrite configuration
    # file whenever configuration is changed (e.g., new network block is added with
    # wpa_cli or wpa_gui, or a password is changed). This is required for
    # wpa_cli/wpa_gui to be able to store the configuration changes permanently.
    # Please note that overwriting configuration file will remove the comments from
    # it.
    update_config=1
    ctrl_interface=/var/run/wpa_supplicant
    # IEEE 802.1X/EAPOL version
    # wpa_supplicant is implemented based on IEEE Std 802.1X-2004 which defines
    # EAPOL version 2. However, there are many APs that do not handle the new
    # version number correctly (they seem to drop the frames completely). In order
    # to make wpa_supplicant interoperate with these APs, the version number is set
    # to 1 by default. This configuration value can be used to set it to the new
    # version (2).
    eapol_version=1
    # AP scanning/selection
    # By default, wpa_supplicant requests driver to perform AP scanning and then
    # uses the scan results to select a suitable AP. Another alternative is to
    # allow the driver to take care of AP scanning and selection and use
    # wpa_supplicant just to process EAPOL frames based on IEEE 802.11 association
    # information from the driver.
    # 1: wpa_supplicant initiates scanning and AP selection; if no APs matching to
    # the currently enabled networks are found, a new network (IBSS or AP mode
    # operation) may be initialized (if configured) (default)
    # 0: driver takes care of scanning, AP selection, and IEEE 802.11 association
    # parameters (e.g., WPA IE generation); this mode can also be used with
    # non-WPA drivers when using IEEE 802.1X mode; do not try to associate with
    # APs (i.e., external program needs to control association). This mode must
    # also be used when using wired Ethernet drivers.
    # 2: like 0, but associate with APs using security policy and SSID (but not
    # BSSID); this can be used, e.g., with ndiswrapper and NDIS drivers to
    # enable operation with hidden SSIDs and optimized roaming; in this mode,
    # the network blocks in the configuration file are tried one by one until
    # the driver reports successful association; each network block should have
    # explicit security policy (i.e., only one option in the lists) for
    # key_mgmt, pairwise, group, proto variables
    # When using IBSS or AP mode, ap_scan=2 mode can force the new network to be
    # created immediately regardless of scan results. ap_scan=1 mode will first try
    # to scan for existing networks and only if no matches with the enabled
    # networks are found, a new IBSS or AP mode network is created.
    ap_scan=1
    # EAP fast re-authentication
    # By default, fast re-authentication is enabled for all EAP methods that
    # support it. This variable can be used to disable fast re-authentication.
    # Normally, there is no need to disable this.
    fast_reauth=1
    device_name=Blaze
    manufacturer=TI
    model_name=Wilink
    model_number=wl18xx
    serial_number=12345
    driver_param=use_multi_chan_concurrent=1 use_p2p_group_interface=1
    # Timeout in seconds to detect STA inactivity (default: 300 seconds)
    #
    # This timeout value is used in P2P GO mode to clean up
    # inactive stations.
    p2p_go_max_inactivity=60
    p2p_go_ht40=1
    disassoc_low_ack=1
    concurrent_sched_scan=1
    p2p_disabled=1

    #p2p_supplicant.conf
    ctrl_interface=/var/run/wpa_supplicant
    update_config=0
    device_name=TI-SITARA-P2P
    device_type=1-0050F204-1
    config_methods=virtual_push_button physical_display keypad
    p2p_go_intent=0
    country=US
    driver_param=use_multi_chan_concurrent=1 use_p2p_group_interface=1
    p2p_go_max_inactivity=60
    p2p_go_ht40=1
    disassoc_low_ack=1
    concurrent_sched_scan=1
    network={
    mode=3
    disabled=2
    ssid="DIRECT-AB-example"
    key_mgmt=WPA-PSK
    proto=RSN
    pairwise=CCMP
    psk="12345678"
    }
  • Hi Johncy,

    I don't see any issue when I try it on my setup.
    Please see below:


    > p2p_group_add persistent=0 freq=2412
    OK
    > Using interface p2p-p2p0-0 with hwaddr d2:39:72:65:9e:a3 and ssid "DIRECT-AB-example"
    p2p-p2p0-0: interface state UNINITIALIZED->ENABLED
    p2p-p2p0-0: AP-ENABLED
    p2p-p2p0-0: CTRL-EVENT-CONNECTED - Connection to d2:39:72:65:9e:a3 completed (auth) [id=0 id_str=]
    P2P-GROUP-STARTED p2p-p2p0-0 GO ssid="DIRECT-AB-example" freq=2412 passphrase="12345678" go_dev_addr=d0:39:72:65:9e:a4 [PERSISTENT]
    <3>P2P-GROUP-STARTED p2p-p2p0-0 GO ssid="DIRECT-AB-example" freq=2412 passphrase="12345678" go_dev_addr=d0:39:72:65:9e:a4 [PERSISTENT]

    I believe you have to keep the order of the parameters...

    Regards,
    Gigi Joseph.
  • Thanks Gigi.

    It worked with changing the order of parameters.