飛行派工作日誌《四》

不知是否因為樹莓派 3B 內建 WiFi 有電源管理問題,或是由於沒有 monitor mode 不能跑 horst 頻譜分析。所以飛行派 BOM 裡有 WiFi  AP dongle 這一項?既然將選用 WiFi USB dongle 來作 Access Point ,當然最好是具有 IEEE802.11  相容模式。如是安裝 hostapd 也比較容易,無須顧慮驅動程式 device driver 的問題!

hostapd: IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator

hostapd is a user space daemon for access point and authentication servers. It implements IEEE 802.11 access point management, IEEE 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS authentication server. The current version supports Linux (Host AP, madwifi, mac80211-based drivers) and FreeBSD (net80211).

hostapd is designed to be a “daemon” program that runs in the background and acts as the backend component controlling authentication. hostapd supports separate frontend programs and an example text-based frontend, hostapd_cli, is included with hostapd.

Supported WPA/IEEE 802.11i/EAP/IEEE 802.1X features

  • WPA-PSK (“WPA-Personal”)
  • WPA with EAP (with integrated EAP server or an external RADIUS backend authentication server) (“WPA-Enterprise”)
  • key management for CCMP, TKIP, WEP104, WEP40
  • WPA and full IEEE 802.11i/RSN/WPA2
  • RSN: PMKSA caching, pre-authentication
  • IEEE 802.11r
  • IEEE 802.11w
  • RADIUS accounting
  • RADIUS authentication server with EAP
  • Wi-Fi Protected Setup (WPS)

 

尚可想想其他的應用︰

MiracleCast – Wifi-Display/Miracast Implementation

The MiracleCast project provides software to connect external monitors to your system via Wi-Fi. It is compatible to the Wifi-Display specification also known as Miracast. MiracleCast implements the Display-Source as well as Display-Sink side.

The Display-Source side allows you to connect external displays to your system and stream local content to the device. A lot of effort is put into making this as easy as connecting external displays via HDMI.

On the other hand, the Display-Sink side allows you to create wifi-capable external displays yourself. You can use it on your embedded devices or even on full desktops to allow other systems to use your device as external display.

Requirements

The MiracleCast projects requires the following software to be installed:

  • systemd: A system management daemon. It is used for device-management (udev), dbus management (sd-bus) and service management. Systemd >= 221 will work out of the box. For earlier versions systemd must be compiled with –enable-kdbus, even though kdbus isn’t used, but only the independent, experimental sd-libraries. required: >=systemd-213
  • glib: A utility library. Used by the current DHCP implementation. Will be removed once sd-dns gains DHCP-server capabilities. required: ~=glib2-2.38 (might work with older releases, untested..)
  • check: Test-suite for C programs. Used for optional tests of the MiracleCast code base. optional: ~=check-0.9.11 (might work with older releases, untested..)
  • gstreamer: MiracleCast relay on gstreamer to show cast its output. You can test if all needed is installed launching res/test-viewer.sh
  • P2P Wi-Fi device Although widespread this days, there are some devices not compatible with Wi-Fi Direct (prior know as Wi-Fi P2P). Test yours with res/test-hardware-capabilities.sh
  • copy the dbus policy res/org.freedesktop.miracle.conf to /etc/dbus-1/system.d/

 

Wireless Display Software For Linux OS (WDS)

WDS is a set of libraries for developers who want to build Wi-Fi Display applications on linux.

WDS consists of:

  • libwds: Main library implements a Wi-Fi Display dialect of RTSP that includes the parser, actual negotiation logic for sink and source, and the related data structures. It is not tied to any specific connection manager, media framework or main loop. This Library is also compatible with MSVC.
  • network: Supports integration with GLib main loop and GStreamer
  • p2p: Supports integration with Connman Wifi P2P features

The source code includes example implementations:

  • sink: Wi-Fi Display sink that depends on Gstreamer, Connman and GLib mainloop
  • desktop_source: Wi-Fi Display source that depends on Gstreamer, Connman and GLib mainloop

More information can be found on the mailing list and the wiki.

Requirements:

WDS test executables have runtime dependencies on just a few things (mostly GStreamer and GLib), but for successful Wi-Fi Display sessions the following are adviced:

  • Wifi adapter from Intel 7260-family or Atheros ath9k
  • wpa_supplicant: version 2.4 or later, built with CONFIG_P2P=y, CONFIG_WIFI_DISPLAY=y and CONFIG_CTRL_IFACE_DBUS_NEW=y
  • connman: version 1.28 (released Feb 1st 2015) or later.
  • gstreamer: either master branch more recent than Feb 3rd 2015 (commit d0a50be2), or 1.4 branch more recent than Feb 3rd 2005 (commit 1ce3260a638d or release 1.4.6 or later).

Test results with other Wifi adapters are very welcome but be warned that in many cases Wifi-P2P has not had the testing it needs on linux: you may run into problems in surprising places.

……

 

因是擇取或可補足者也。

# WiFi USB dongle
Wiphy phy1
	max # scan SSIDs: 4
	max scan IEs length: 2257 bytes
	Retry short limit: 7
	Retry long limit: 4
	Coverage class: 0 (up to 0m)
	Device supports RSN-IBSS.
	Supported Ciphers:
		* WEP40 (00-0f-ac:1)
		* WEP104 (00-0f-ac:5)
		* TKIP (00-0f-ac:2)
		* CCMP (00-0f-ac:4)
		* 00-0f-ac:10
		* GCMP (00-0f-ac:8)
		* 00-0f-ac:9
	Available Antennas: TX 0 RX 0
	Supported interface modes:
		 * IBSS
		 * managed
		 * AP
		 * AP/VLAN
		 * WDS
		 * monitor
		 * mesh point

# raspberry pi 3B WiFi
Wiphy phy0
 max # scan SSIDs: 10
 max scan IEs length: 2048 bytes
 Retry short limit: 7
 Retry long limit: 4
 Coverage class: 0 (up to 0m)
 Device supports T-DLS.
 Supported Ciphers:
 * WEP40 (00-0f-ac:1)
 * WEP104 (00-0f-ac:5)
 * TKIP (00-0f-ac:2)
 * CCMP (00-0f-ac:4)
 * CMAC (00-0f-ac:6)
 Available Antennas: TX 0 RX 0
 Supported interface modes:
 * IBSS
 * managed
 * AP
 * P2P-client
 * P2P-GO
 * P2P-device