Raspberry PiをWifi中継器にする
ここからはRaspberry Pi 3Bを用いている。このラズパイはWifiは2.4GHzのみ対応
Wifiインターフェイスの追加
基板上のWifiチップはwlan0というインターフェイスになっている。これは最初の設定でうちのWifiルータに接続されている。DHCPで割り振られたIPアドレスは192.168.11.35である
$ ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.11.35 netmask 255.255.255.0 broadcast 192.168.11.255
inet6 240b:11:15e0:2800:2d13:4ee:74a2:ad85 prefixlen 64 scopeid 0x0<global>
inet6 fe80::8a0f:ff7d:cafd:cf11 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:9b:2a:f2 txqueuelen 1000 (イーサネット)
RX packets 18457 bytes 1350771 (1.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7427 bytes 4105346 (3.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
USBポートに刺したWifi USBドングル(2.4GHzのみ対応)は何も設定していないのでこうなっていた。
$ ifconfig wlan1
wlan1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 06:15:f8:20:90:f1 txqueuelen 1000 (イーサネット)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ちなみに周辺のアクセスポイントのリストは次のコマンドで表示できる
$ sudo iwlist wlan0 scan | grep ESSID