How to Connect Raspberry Pi to Wireless LAN


I connected my Raspberry Pi to WiFi (Wireless LAN).

Environment

I used Raspberry Pi B+, but almost of all Raspberry Pi may work in the same way.

Raspberry Pi には OS が既にインストールされているものとして話を進めます。 私が OS をインストールしたときの手順は Raspberry Pi B+ に RASPBIAN JESSIE LITE をインストールした方法 に記載しています。

And, USB keyboard and HDMI display are necessary. (クロスケーブルでPCと直接つないで作業することもできると思いますが、 I connected USB keyboard and display directly.)

Wireless LAN Adapter の決め手

Why I used PLANEX GW-USNANO2A.

PLANEX 無線LAN子機 (USBアダプター型) 11n/g/b 150Mbps MacOS X10.10対応 GW-USNANO2A (FFP)

This product is over 1000 yen, and not the lowest price, but power consumption is really low, 1.3 W. And Amazon reviews describe that it is stable than other products. And other web site also say so.

wireless LAN Configuration

Connect PLANEX GW-USNANO2A to Raspberry Pi USB socket and turn on Raspberry Pi.

First, switch to root user.

And execute the following command. Change YOUR_SSID and YOUR_PASSPHRASE to yours. If the SSID contains bracket, surround it by double quotes (“).

Then, it will work. 他のサイトには他の手続きも書かれていますが、これだけでつながります。

Now, let’s reboot with the following command. It will connect to wireless LAN automatically, if wireless router is working and the Raspberry Pi is in the wireless LAN range.

Check Configuration

you can check configuration with the following command.

If google server respond it, the configuration is completed. Exit with Ctrl + C.

At last, execute the following command and shutdown the Raspberry Pi.