LoginSignup
17
14

More than 5 years have passed since last update.

Raspberry Pi Wifi接続設定方法まとめ(WPA/WEP)

Last updated at Posted at 2017-08-13

Raspberry PiのWi-Fi設定をしていて、別のWi-Fiにつなごうとしたら何故かつながらない!とハマってしまいました。
原因は暗号化の形式がWPAとWEPで設定が違ったためでした。
それぞれの設定方法を備忘録としてここにまとめておきます。

使用モデル

  • Raspberry Pi3 Model B

設定方法

どちらも /etc/wpa_supplicant/wpa_supplicant.conf を編集します。

sudo vi /etc/wpa_supplicant/wpa_supplicant.conf

WEPの設定もここに書いてうまく動きました。:thinking:

WPA

country=JP
ctrl_interface=DIR/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="SSID"
    psk="PASSWORD"
}

WEP

country=JP
ctrl_interface=DIR/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="SSID"
    key_mgmt=NONE
    wep_key0="PASSWORD"
}

Rebootする

Raspberry PiをRebootします
sudo reboot

インターネットに接続されたか確認する

ping

ping で適当なWebサイトに繋いでインターネットに接続されたか確認できます
ping www.google.co.jp

ifconfig

ifcongig でRaspberry PiのIPアドレスを見ることが出来ます。
インターネットにつながると、Raspberry PiのIPアドレスが表示されるので、表示されたらインターネット接続に成功しています。
ifconfig
しかしifconfigは現在非推薦になっているようです:scream:

ip addr

ip addr で ifconfig と同様にRaspberry PiのIPアドレスを確認する事ができます。
ifconfigが非推薦になっているようなので、これを使うのが良いのかと思います。
ip addr

17
14
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
17
14