hostapd 関連

wifi の速度

11ac(wifi-5)

帯域 1x1 2x2 3x3
20MHz 86.7Mbps 173.3Mbps 288.9Mbps
40MHz 200Mbps 400Mbps 600Mbps
80MHz 433.3Mbps 866.7Mbps 1300Mbps

11n(wifi-4)

帯域 1x1 2x2 3x3
20MHz 72.2Mbps 144.4Mbps 216.7Mbps
40MHz 150Mbps 300Mbps 450Mbps

https://support.eonet.jp/connect/net/multi_bbr/eo-rt100/first/wireless_std.html

AP mode に対応しているか

iw list で該当する NIC の Supported interface modesAP があるか –
最近は気にしなくても大丈夫?

NetworkManager の管理から外す(必須!!)

これを設定しないと udev で設定した IP に対するルーティングが消える

/etc/NetworkManager/conf.d/99-unmanaged-devices.conf

[keyfile]
#unmanaged-devices=interface-name:wlan0
unmanaged-devices=mac:xx:xx:xx:xx:xx:xx

ランダム MAC を設定していると unmanaged-devices=mac:xx:xx:xx:xx:xx:xx は使えない。

アクセスポイント用のデバイスを作る

iw devphyX を確認

/etc/udev/rules.d/99-ap0.rules

SUBSYSTEM=="ieee80211", ACTION=="add|change", ATTR{macaddress}=="xx:xx:xx:xx:xx:xx", KERNEL=="phy0", \
  RUN+="/sbin/iw phy phy0 interface add ap0 type __ap", \
  RUN+="/bin/ip link  set ap0 address $attr{macaddress} up"
  RUN+="/bin/ip addr  add 192.168.xx.254/24 dev ap0"

debug mode

hostapd -dd /etc/hostapd/hostapd.conf

dhcp server

isc-dhcp-server.service