qshinoの日記

Powershell関係と徒然なこと

Rhaspberry Pi Zero W

安いね

Pi zero W 送料150円込みで約1,500円。Headerなし版。

何に使う?

WifiBluetoothが付いている一方、有線LANなし。まずは、どちらかでネットワークに接続したい。

取り敢えず、Bluetooth経由でネットワーク接続してみる。

Bluetooth network

基本的にはBlueZのPAN。

client の設定。

sudo hciconfig hci0 up
sudo bluetoothctl
 
pairing on
scan on (you should see the name of the system you named previously here)
scan off
devices (you should see the name of the system you named previously here)
agent on
pair xx:xx:xx:xx:xx:xx (enter the pin for pairing here, and a window should pop up on the computer asking for the same one)
trust xx:xx:xx:xx:xx:xx
connect xx:xx:xx:xx:xx:xx (will fail, but you will get a list of available services here)

# ここで、APにペアリングポップアップ。

# ペアリングの後で

sudo hciconfig hci0 up
sudo /usr/share/doc/bluez-test-scripts/examples/test-network 00:16:93:01:00:2C nap
sudo dhclient bnep0


ref

http://redtreerobotics.com/ip-over-bluetooth-with-linux/