ユーザ用ツール

サイト用ツール


raspberrypiでwifi

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
raspberrypiでwifi [2020/04/18 19:20] nabezoraspberrypiでwifi [2020/06/30 23:00] (現在) – [環境確認] nabezo
行 3: 行 3:
 /etc/modprobe.d/8192cu.conf /etc/modprobe.d/8192cu.conf
   options 8192cu rtw_power_mgnt=0   options 8192cu rtw_power_mgnt=0
 +
 +====== wlan1でアクセスポイント ======
 +
 +https://hawksnowlog.blogspot.com/2019/08/create-access-point-on-raspberrypi.html
 +
 +https://qiita.com/n-yamanaka/items/e329e05b32207b43522a
 +
 +
 +===== 2台目のアダプタの追加方法 =====
 +==== 環境確認 ====
 +  iwconfig
 +wlan0が既存の物、wlan1がusbのものとする
 +
 +
 +デフォルトではhostapdはマスクされている。アンマスクしたうえで、有効化。
 +  sudo systemctl unmask hostapd
 +  sudo systemctl enable hostapd
 +
 +
 +RaspberryPiでは2つのWiFiアダプタ両方共インターネット接続に設定されてしまう場合がある。
 +インターネット接続させたいアダプタwlan0に関して
 +/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
 +に設定しておけばwpa_supplicantはwlan0だけを設定するので、
 +勝手にwlan1を掴んでしまう事は無いようだ。
 +
 +/etc/network/interfaces
 +  allow-hotplug wlan1
 +  iface wlan1 inet manual
 +
 +/etc/default/hostapd
 +  DAEMON_CONF="/etc/hostapd/hostapd.conf"
 +  DAEMON_OPTS="-dd -t -f /home/pi/hostapd.log"
 +
 +/etc/hostapd/hostapd.conf
 +  interface=wlan1
 +  driver=nl80211
 +  ssid=<ssid>
 +  hw_mode=g
 +  channel=7
 +  wmm_enabled=1
 +  macaddr_acl=0
 +  auth_algs=1               # 1=wpa, 2=wep, 3=both
 +  ignore_broadcast_ssid=0   # 1-->SSID stealth
 +  wpa=2                     # WPA2 only
 +  wpa_passphrase=<password>
 +  wpa_key_mgmt=WPA-PSK
 +  wpa_pairwise=TKIP
 +  rsn_pairwise=CCMP
 +  ctrl_interface=/var/run/hostapd
 +  ctrl_interface_group=0
 +
 +/etc/dhcpcd.conf
 +  interface wlan1
 +  static ip_address=192.168.130.1/24
 +  static routers=192.168.130.1
 +  static domain_name_servers=192.168.130.1
 +  static broadcast 192.168.130.255
 +
 +/etc/default/isc-dhcp-server
 +  INTERFACESv4="wlan1"
 +
 +
 +/etc/dhcp/dhcpd.conf
 +  authoritative;
 +  subnet 192.168.0.1 netmask 255.255.255.0 {
 +    range 192.168.0.100 10.0.0.254;
 +    option routers 192.168.0.1;
 +    option routers 192.168.0.1;
 +    option subnet-mask 255.255.255.0;
 +    option broadcast-address 192.168.0.255;
 +  }
 +
 +iptables
 +  sudo apt-get iptables-persitat
 +  sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
 +  sudo iptables-save
 +
 +
 +うまく動かない・・・
 +
 +ひょっとしてこれか?  \\
 +Raspberry piでUSB Wifi RTL8188CUSを使ったWifi AP構築の失敗 \\
 +https://netlog.jpn.org/r271-635/2013/04/raspberry_pi_rtl8188cu_hostapd.html
  
raspberrypiでwifi.1587205205.txt.gz · 最終更新: 2020/04/18 19:20 by nabezo