Wifi direct (P2P) has been implemented in WLAN drivers and wpa_supplicant. I would like to work on 2 machines connected each through wifi direct.

Documentation

Like mentioned in the comments I was only able to bring it to work with openSUSE 12.3. I got two laptops with the wifi card Atheros Communications Inc. AR9485 Wireless Network Adapter (rev 01).

Intel Wireless cards, at least the older ones, doesn't seem to be usable for Wifi Direct [yet].

Howto for 12.3:

All steps need to be run on both machines!

Since Network Manager and its own wpa_supplicant daemon could interfere it should be disabled. Switch in yast2 lan to the traditional network method.

wpa_supplicant (>= 2.0) needs to be compiled with the following options:

CONFIG_DEBUG_FILE=y

CONFIG_DRIVER_NL80211=y

CONFIG_CTRL_IFACE=y

CONFIG_WPS=y

CONFIG_WPS2=y

CONFIG_P2P=y

CONFIG_AP=y

For 12.3 and 13.1 I have created a forked package with these options: https://build.opensuse.org/package/show/home:thardeck:branches:openSUSE:13.1/wpa_supplicant

A configuration file for wpa_supplicant is required with the following content:

ctrl_interface=/var/run/wpa_supplicant

update_config=1

ap_scan=1

device_name=DEVICE-NAME

device_type=1-0050F204-1

p2p_go_ht40=1

wpa_supplicant has to be started as a daemon: wpa_supplicant -Dnl80211 -c <configuration_file> -f /var/log/wpa_supplicant -i wlan0 -ddt -B

The following commands need to be run in wpa_cli

p2p_find

p2p_stop //run after the opposite client was found

p2p_connect MAC pbc go_intent=1

Last but not least the network device has to be configured with something like: ifconfig p2p-wlan0-0 192.168.1.<number> netmask 255.255.255.0 up

Findings with openSUSE 13.1

  • I have used the same wpa_supplicant package just compiled against 13.1.
  • Finding the p2p device does work but the connect does always fail because it is unable to switch the wireless mode. http://pastebin.suse.de/8001
  • To test if it is just a driver issue/kernel regression I have installed the 12.3 Kernel in 13.1 but the result was the same. So I would suspect that the udev name changes might interfere in the process. I have already informed two udev guys if they have a clue if this might be the reason or how to address the issue.

Future

Matt Chen is planning to integrate the functionality in NetworkManager so it would be much easier to set up a direct connection. This might make it pretty easy to share information between Android and Linux but I haven't tested the Android Wifi Direct functionality yet.

Links

http://processors.wiki.ti.com/index.php/OMAP\_Wireless\_Connectivity\_NLCP\_WiFi\_Direct\_Configuration\_Scripts http://wireless.kernel.org/en/developers/p2p/howto

Source git

git://w1.fi/srv/git/hostap.git (wpa_supplicant)

git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git (wireless testing kernel)

Looking for hackers with the skills:

Nothing? Add some keywords!

This project is part of:

Hack Week 10

Activity

  • about 7 years ago: thardeck disliked this project.
  • about 7 years ago: thardeck disliked this project.
  • about 10 years ago: StefanBruens liked this project.
  • over 10 years ago: thardeck started this project.
  • over 10 years ago: thardeck liked this project.
  • over 10 years ago: matt680209 originated this project.

  • Comments

    • joeyli
    • thardeck
      over 10 years ago by thardeck | Reply

      The wpa_supplicant in OpenSUSE 12.3 isn't compiled with Wi-Fi Direct support but 13.1 is shipped with it enabled and also the NetworkManager of this version seems to have an option for for this setting (ap-mode?). But according to the NM log my Centrino N-6300 wifi card doesn't support Access Point mode so I don't really have hardware to test it.

    • thardeck
      over 10 years ago by thardeck | Reply

      I have found a laptop with an Atheros chip which seems to support ap mode. The required wpasupplicant build options are there in the wpasupplicant config of 13.1 but they are commented out so the package needs to be rebuild manually. https://build.opensuse.org/package/show/home:thardeck:branches:openSUSE:13.1/wpa_supplicant

    • thardeck
      over 10 years ago by thardeck | Reply

      So I got it working on 12.3, 13.1 does result in problems probably because of the network device renaming. In 13.1 wpa_supplicant is unable after the p2p negotiation to set the device to master mode.

      For 12.3 wpa_supplicant needs to be updated and there is an issue that ifconfig doesn't show the full device name because of space limitation. The correct name for the p2p device is p2p-wlan0-0, then the ping does work.

    • thardeck
      over 10 years ago by thardeck | Reply

      Copying a file with scp did work but it looks more like a 802.11g instead of an 802.11n connection although I have added p2pgoht40=1 to the wpasupplicant conf which is supposed to enable 802.11n. http://processors.wiki.ti.com/index.php/OMAPWirelessConnectivityNLCPWiFiDirectConfigurationScripts#P2P_usecases The transfer rates where around 1.6 - 1.8 MB/s but stayed quite stable even four rooms away.

      I am using two laptops with a AR9485 Wireless Network Adapter.

    • matt680209
      over 10 years ago by matt680209 | Reply

      I am using AR9462 and with the most recent kernel, v3.12-rc3, to work. I am running openSUSE 12.3 with the latest wpa_supplicant followed the configuration as described. Also apply ip command to set up the P2P interface would work to me and now I am able to ping and ssh login each when 2 machines are connected.

      Next step to add very general functions in NM is my plan.

    • revida
      10 months ago by revida | Reply

      Peer-to-peer, or Wifi Direct, has been included into WLAN drivers and wpa_supplicant. It enables direct WiFi connection between two devices. On OpenSUSE, Wifi Direct implementation can be a little challenging.

      revida marcos https://www.multispanindia.com

    Similar Projects

    This project is one of its kind!