LoginSignup
11
11

More than 5 years have passed since last update.

Raspberry pi zero Wのwifi設定

Posted at

wifiルータを新しくする際、Raspberry Piのwifi設定をしようとしたらハマったのでメモ。
他にもたくさん記事があるのだが、Raspbianの設定が最近変わったせいか、
なかなか接続できなかったので参考になれば幸いである。

接続先のネットワーク設定

  • ステレスSSID
  • WPA2-PSK[AES]

設定箇所

以下の2ファイル。

  • /etc/network/interfaces
  • /etc/wpa_supplicant/wpa_supplicant.conf

interfaces

auto wlan0
allow-hotplug wlan0       #ここは消さなくてもよい?
iface wlan0 inet dhcp     #dhcpで試した。
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf    #wpa-roamとなっている記事もあったがconfでうまく行った。

wpa_supplicant.conf

country=JP                     #これをつけてから繋がったので重要かもしれない。
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev       #この2行はいじってない。
update_config=1

network={
  ssid="*****"                 #SSID
  proto=RSN                    #WPA2だとRSNらしい。WPAとしている記事やWPA2としている記事もあった。
  key_mgmt=WPA-PSK             #WPA2-PSKとするとダメでした。
  pairwise=CCMP                #CCMP TKIPとする、という記事もあった。
  group=CCMP                   #
  auth_alg=OPEN
  scan_ssid=1
  psk=******
}

参考

11
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
11