まとめ
Paragon ExtFS for Windowsを使用して、raspbianのmicroSDをWindowsにマウントして、dhcpd.confやらwpa_supplicant.confを編集する。
環境
- Windows 7 64bit
- Raspbian:
2016-05-10-raspbian-jessie-lite.img - Raspberry Pi 2(+8192cuベースのWifiドングル) と Raspberry Pi 3で確認した。
- wpa_passphrase.exe(windows版): ビルドしました https://github.com/mt08xx/files/raw/master/wpa_passphrase.exe
手順
インストール: Paragon ExtFS for Windows (For personal use only)
- ダウンロード: ダウンロードページ https://www.paragon-software.com/home/extfs-windows/download.html
- 緑色のDownload Nowをおして、download.cnet.comのほうに飛ばされる
- また、緑色のDownload Nowを押す。
- =>
Paragon_ExtFS_for_Windows_2.1.440.exe取得
- キーの取得: Registrationページ http://www.paragon-software.com/registration/extfs-windows.html
- 起動すると Product keyと Serial numberを要求される
- [Registration]ボタンを押すと、上記ページへとぶ。
- Title/First Name/Last Name/Email/Country/Languageを記入で、ポチっと。
- Emailで、おとどけ。
- あとは、
[Next]=>[I agree]=>[Next]=>[Install]=>[Close]とすすめて、再起動[Yes] -
Paragon ExtFS for Windowsアイコンがデスクトップに。
Static IPの設定
- jessieをmicroSDへ焼く
- 一応、SDを抜き差し。
- マウント:
-
Paragon ExtFS for Windowsアイコン、ダブルクリック - => タスクバー通知領域
- 右クリックで、緑●がついて、どこかのドライブへアサインされてるハズ
- そいつをクリックすると、アンマウントされる
-
- 設定ファイルをいじる
-
eth0の場合-
/etc/dhcpcd.confを編集。
/etc/dhcpcd.conf -
-
interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
2. `wlan0`の場合 ()
- cmd.exeをひらいて、`wpa_passphrase.exe`を実行して、設定取得
```txt
C:\>wpa_passphrase.exe SSID himitsu_no_password
network={
ssid="SSID"
#psk="himitsu_no_password"
psk=d85d483a206f5446ed113fe3ca842f319c4ff560679e2833e96190eb43a88535
}
C:\>
- `/etc/wpa_supplicant/wpa_supplicant.conf` を編集。
```txt:/etc/wpa_supplicant/wpa_supplicant.conf
country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
以下追加する.
$ wpa_passphrase SSID password での出力。素のフレーズは消しておく.
network={
ssid="SSID"
network={
ssid="SSID"
psk=d85d483a206f5446ed113fe3ca842f319c4ff560679e2833e96190eb43a88535
}
- `/etc/dhcpcd.conf` を編集。
```txt:/etc/dhcpcd.conf
interface wlan0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
- アイコン右クリ、該当ドライブ選択して、アンマウント。
- らずぱいへ挿して、起動。
- Windowsで、
ping -t 192.168.0.10でもしながら、待つ
その他メモ
-
ExtFSでマウントしたら、ファイルのパーミッションに関係なく見れる。(ぉ
-
/etc/network/interfaceの編集ではない
Please note that this file is written to be used with dhcpcd
For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
=> `man dhcpcd.conf`しろと...
3. Windowsで、manファイルを見る(要Cygwin)
D:ドライブにアサインされてるとして、
`% gzip -dc D:/usr/share/man/man5/dhcpcd.conf.5.gz | groff -mandoc -T utf8 | less -R`
<br>で、↓のが見つかる。
```txt
static value
Configures a static value. If you set ip_address then dhcpcd
will not attempt to obtain a lease and just use the value for the
address with an infinite lease time.
Here is an example which configures a static address, routes and
dns.
interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
- メモ: wpa_passphrase.exeのビルド
- Visual Studio 2015
- ソースコード: https://w1.fi/releases/wpa_supplicant-2.5.tar.gz
- 手順
- wpa_supplicant-2.5/wpa_supplicant/vs2005/wpa_supplicant.sln を開く
- wpa_passphrase以外のプロジェクトを削除(Delキー)
-
Releaseに変更 -
CONFIG_NO_STDOUT_DEBUG;CONFIG_CRYPTO_INTERNALをC/C++のプリプロセッサの設定に追加 - Static Linkするため、Code Generationの Runtime Library を "Multi threaded(/MT)" へ変更
- とりあえずビルド(CTRL+SHIFT+b)
- エラーにパッチを当てる(2箇所) : "(args...)" => "(args, ...)"とカンマを入れる
- ビルド => 完成
wpa_supplicant-2.5/wpa_supplicant/vs2005/Release/wpa_passphrase.exe