Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
2,372 Views

Wifi p2p connection

Hi,

I've been working on getting a P2P connection up for some time. I'd like to recompile the kernel with p2p commands accessible through wpa_cli which I think is realistic. I believe that I have to add:

CONFIG_CTRL_IFACE=y

CONFIG_P2P=y

CONFIG_AP=y

CONFIG_WPS=y

to defconfig. If this is correct can I get a pointer to which one as I change it in several defconfig's before the bitbake command. It was my understanding that defines in defconfig are equivalent to individual package .config (which I should be putting these in wpa_cli's .config). Is this correct?

Is there a way through

bitbake linux-yocto -c menuconfig

I see the mac80211 mesh networking support under networking support > Wireless

Thanks,

Jeff

Tags (1)
0 Kudos
8 Replies
Highlighted
Employee
15 Views

Re: Wifi p2p connection

Hi Maaaah,

I've not done this procedure before but I believe those are the correct options. I'm not sure if you can change those options on the defconfig directly, I believe you have to do it using the menuconfig option. Regarding the package, any changes made to these files has to be done at a kernel level and will not affect the package itself.

Regards

Sergio

Highlighted
15 Views

Re: Wifi p2p connection

latest Edison beta image just released seems to support WiFi direct. Maybe give it a try?

0 Kudos
Highlighted
New Contributor I
15 Views

Re: Wifi p2p connection

Flashed the new image and going through the steps. Hopefully I'll have a detailed breakdown on getting Edison to handshake with the Wifi p2p android sdk application posted back to the forum soon.

0 Kudos
Highlighted
New Contributor I
15 Views

Re: Wifi p2p connection

There's still problems. Has anyone been able to get wifi p2p to work with Edison? With the new image flashed this is what I get

# Turn off wpa_supplicant that comes up on boot to connect to my AP

> killall wpa_supplicant

> wpa_supplicant -I wlan0 -c /etc/wpa_supplicant/p2p_supplicant.conf -Dnl80211 &

> wpa_cli

now in wpa_cli

(Search for devices on Android > Settings > Wifi > Wifi Direct)

> p2p_find

<3>P2P-DEVICE-FOUND XX:XX:XX:XX:XX:XX p2p_dev_addr=XX:XX:XX:XX:XX:XX pri_dev_type=10-0050F204-5 name='Trellabs3' config_methods=0x188 dev_capab=0x24 group_capab=0x0

> p2p_connect XX:XX:XX:XX:XX:XX pbc go_intent=0

P2P-FIND-STOPPED

OK

<3>P2P-FIND-STOPPED

(Android comes up with a connect to DeviceName prompt and Peer Devices > DeviceName switches to Invited)

(The about 30 seconds later)

> > P2P-GO-NEG-FAILURE status=-1

<3>P2P-GO-NEG-FAILURE status=-1

P2P-DEVICE-LOST p2p_dev_addr=XX:XX:XX:XX:XX:XX

<3>P2P-DEVICE-LOST p2p_dev_addr=XX:XX:XX:XX:XX:XX

connecting through pin, go_intent=7 or go_intent=15 still doesn't change the GO-NEG failure. Using p2p_group_add before hand does not change this behaviour either. I seem to remember on TI's CC3200 there was a way to force the Group Owner Negotiation, they're different beasts of course, is there a way to skip this step?

Thanks,

Jeff

0 Kudos
Highlighted
15 Views

Re: Wifi p2p connection

That feature was just implemented in R2. The doc describing it is at:

Let me know if you still have issues with getting it to work, and we'll debug from there.

0 Kudos
Highlighted
New Contributor I
15 Views

Re: Wifi p2p connection

Hi MPayne, yes the document is correct for setting up a connection with Android's OS. I'll be checking the SDK example too shortly. Here's the short walkthrough (while in depth is provided by Intel: )

 

All these commands will be from Edison

 

> reboot

> systemctl status wpa_supplicant

● wpa_supplicant.service - WPA supplicant service

Loaded: loaded (/lib/systemd/system/wpa_supplicant.service; enabled)

Active: active (running) since Mon 2015-02-09 18:09:19 UTC; 7min ago

Process: 276 ExecStartPost=/bin/systemctl start wpa_supplicant_p2p_event (code=exited, status=0/SUCCESS)

Process: 210 ExecStartPost=/bin/systemctl start wpa_supplicant_wlan0_event (code=exited, status=0/SUCCESS)

Main PID: 209 (wpa_supplicant)

CGroup: /system.slice/wpa_supplicant.service

└─209 /usr/sbin/wpa_supplicant -u -c/etc/wpa_supplicant/wpa_suppli...

Feb 09 18:09:19 Vitaliti002 systemd[1]: Started WPA supplicant service.

> wpa_cli -iwlan0 interface

Available interfaces:

p2p-dev-wlan0

wlan0

# click search for devices on Wi-Fi Direct tab on Phone

> wpa_cli -ip2p-dev-wlan0 p2p_find

OK

> wpa_cli -ip2p-dev-wlan0 p2p_peers

a2:0b:ba:c6:ba:a9

> wpa_cli -ip2p-dev-wlan0 p2p_peer a2:0b:ba:c6:ba:a9

a2:0b:ba:c6:ba:a9

pri_dev_type=10-0050F204-5

device_name=Trellabs3

manufacturer=

model_name=

model_number=

serial_number=

config_methods=0x188

dev_capab=0x24

group_capab=0x0

level=-33

age=0

listen_freq=2412

wps_method=not-ready

interface_addr=00:00:00:00:00:00

member_in_go_dev=00:00:00:00:00:00

member_in_go_iface=00:00:00:00:00:00

go_neg_req_sent=0

go_state=unknown

dialog_token=0

intended_addr=00:00:00:00:00:00

country=XX

oper_freq

req_config_methods=0x0

flags=[REPORTED]

status=0

wait_count=0

invitation_reqs=0

> wpa_cli -ip2p-dev-wlan0 p2p_connect a2:0b:ba:c6:ba:a9 pbc persistent go_intent=15

OK

# Click pop up on phone to get to Connected

> wpa_cli -ip2p-dev-wlan0 interface

Available interfaces:

p2p-wlan0-1

p2p-dev-wlan0

wlan0

> reboot

# It doesn't automatically reconnect on login, on start-up in the future I'll use

> wpa_cli -ip2p-dev-wlan0 p2p_listen

0 Kudos
Highlighted
15 Views

Re: Wifi p2p connection

So just to be sure - you've moved past the initial blocking issue you had? Do you need additional clarification?

0 Kudos
Highlighted
New Contributor I
15 Views

Re: Wifi p2p connection

Yep, the document and the new release got me up and connecting.

j

0 Kudos