3/03/2014

WIFI P2P/ WIFI Direct 구조 on Android

1. WIFI P2P File 구조 (Android 4.2) 

GO : Group Owner
GC : Group Client 


WIFI Direct API Guide

  http://developer.android.com/guide/topics/connectivity/wifip2p.html

WIFI SDK 

ㆍaddr: frameworks/base/wifi/java/android/net/wifi/p2p/

  files: WifiP2pConfig.java , WifiP2pDevice.java, WifiP2pDeviceList.java ,
         WifiP2pGroup.java ,  WifiP2pInfo.java ,WifiP2pManager.java,
         WifiP2pServiceInfo.java, WifiP2pServiceRequest.java

ㆍaddr: frameworks/base/wifi/java/android/net/wifi/p2p/nsd/

  files: WifiP2pDnsSdServiceInfo.java , WifiP2pDnsSdServiceRequest.java 
         WifiP2pUpnpServiceInfo.java,WifiP2pUpnpServiceRequest.java


  http://developer.android.com/reference/android/net/wifi/p2p/package-summary.html
  http://developer.android.com/reference/android/net/wifi/p2p/nsd/package-summary.html

WIFI Service

  file: frameworks/base/wifi/java/android/net/wifi/p2p/WifiP2pService.java

WIFI JNI

  file: frameworks/base/core/jni/android_net_wifi_Wifi.cpp
  or
  file: frameworks/base/core/jni/android_net_wifi_WifiNative.cpp

WIFI HAL

  file: hardware/libhardware_legacy/wifi/wifi.c  (driver load & control)

WPA_Supplicant Controller

  file: external/wpa_supplicant_8/src/common/wpa_ctrl.c

WPA_Supplicant (wpa_supplicant)

ㆍaddr: external/wpa_supplicant_8/

- Socket control (wlan0)      

  file: wpa_supplicant/ctrl_iface_unix.c

- Network Driver control
  
  file: src/l2_packet/l2_packet_linux.c
                 
- Driver wrapper by using socket

  file: src/drivers/driver_nl80211.c
  file: src/drivers/driver_wext.c
            ......


2. WIFI P2P Android의 전체구조도




그림출처
  http://blog.chinaunix.net/uid-22415790-id-3651048.html



3. Wifi Direct 기본설명 

Wifi Direct , 초기에는 WI-FI P2P라고 불리었으며, 현재 개인들 뿐만 아니라 여러장비들과 서로 통신을 제공을 하고 있습니다
그리고, 여기에 확장 기능들이 들어가고 있습니다.

  • Automated setup
  1. Universal Plug and Play (UPnP), 
  2. Devices Profile for Web Services (DPWS), 
  3. Zero Configuration Networking (ZeroConf)


http://www.wi-fi.org/news-events/newsroom/wi-fi-certified-wi-fi-direct-now-included-in-dlna-interoperability-guidelines

New uses 
위에서 설명했듯이, 개인들과 통신 뿐만아니라 여러장비를 제공을 위해서 새로운 App을 지속적으로 개발 중입니다.

Ref
  http://en.wikipedia.org/wiki/Wi-Fi_Direct

  http://wireless.kernel.org/en/developers/p2p

WIFI Direct Demo
  http://www.androidside.com/docs/resources/samples/WiFiDirectDemo/index.html
  http://hackerj.tistory.com/33

Other Ref. (Spec)
  http://www.wi-fi.org/discover-wi-fi/wi-fi-direct
 


4. RealTek WIFI Direct 



출처:http://dishingtech.blogspot.kr/2012/01/realtek-wi-fi-direct-programming-guide.html


출처:http://dishingtech.blogspot.kr/2012/01/realtek-wi-fi-direct-programming-guide.html


https://5ebe640fc109686c84adf909d706d596a18b3ce0.googledrive.com/host/0B6hvW6XtZ2CdZFlLcjZObjl2YXM/linux/document/RTK_P2P_WFD_Programming_guide.pdf


아래와 같이 one to one or one to multiple 도 가능하다.



출처: http://www.digikey.com/US/EN/techzone/wireless/resources/articles/Wi-Fi-Direct-adds-Peer-to-Peer-Capabilities.html