9

I attempted to make a wifi p2p connection between Ubuntu 14.04(kernel 3.13) and Android 4.4 Kitkat(Samsung Galaxy Note 2)

In Ubuntu
I use wpa_supplicant v2.1 which is built in to Ubuntu 14.04(/sbin/wpa_supplicant) and Netis WF2120 wifi dongle(rtl8192cu chipset). Ubuntu is group owner.

The following is my execute sequence in Ubuntu.

  1. After Ubuntu was booted, I allocate an IP address(192.168.22.1) to wlan2 interface to use p2p(Netis wifi dongle).

  2. Run dhcpd wlan2 command

  3. Run wpa_cli command to connect wpa_supplicant, which runs in boot time (meaning I did not run wpa_supplicant myself)

  4. Run p2p_group_add command in wpa_cli prompt

  5. Generate new wps pin number using wps_pin any command

Then wait for Android peer connection


In Android

  1. Run built in wifi direct app and find peer, then find Ubuntu peer without problems.

  2. Connect to Ubuntu peer with pin number which is generated by the wps_pin any command

Then connect to Ubuntu without any issues. I confirm that Android has received the IP address(192.168.22.100) from Ubuntu's dhcpd, so ping test is also normal.

The problem is Ubuntu and Android are connected to each other, but then after a few seconds(within 10s), Android's wifi turns off automatically and wifi p2p is disconnected.

I think problem is in Ubuntu.

So I was ran wpa_supplicant directly with my config file.

ctrl_interface=/var/run/wpa_supplicant
device_name=testest
device_type=1-0050F204-1
p2p_go_intent=15

and then I ran this next command

wpa_supplicant -Dnl80211 -c <config file path> -i wlan2 -dt

But the result is the same.

Is there any problem in my configuration? Or any other problem?

2
  • 1
    hardware/OS, not SW
    – KevinDTimm
    Jun 10, 2014 at 12:48
  • Hi, this is a long shot, but do you have any update? I'm trying to basically do the same thing.
    – broody
    Oct 30, 2015 at 5:35

1 Answer 1

0

The group needs to be created as a persistent group so that your connection doesn't drop. You should be able to do that in the autonomous GO scenario with p2p_group_add persistent.

In the negotiated GO scenario try:

p2p_connect <peer device address> <pbc|pin|PIN#|p2ps> [display|keypad|p2ps] persistent go_intent=15

See the wpa_supplicant README-P2P for further details: https://w1.fi/cgit/hostap/plain/wpa_supplicant/README-P2P.

You must log in to answer this question.