1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[メモ] (らずぱい)Windows上から固定IP設定 (Raspberry Pi Static IP)

1
Last updated at Posted at 2016-06-08

まとめ

Paragon ExtFS for Windowsを使用して、raspbianのmicroSDをWindowsにマウントして、dhcpd.confやらwpa_supplicant.confを編集する。

環境

手順

インストール: Paragon ExtFS for Windows (For personal use only)

  1. ダウンロード: ダウンロードページ 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 取得
  2. キーの取得: Registrationページ http://www.paragon-software.com/registration/extfs-windows.html
    • 起動すると Product keyと Serial numberを要求される
    • [Registration]ボタンを押すと、上記ページへとぶ。
    • Title/First Name/Last Name/Email/Country/Languageを記入で、ポチっと。
    • Emailで、おとどけ。
  3. あとは、[Next] => [I agree] => [Next] =>[Install] => [Close] とすすめて、再起動 [Yes]
  4. Paragon ExtFS for Windowsアイコンがデスクトップに。

Static IPの設定

  1. jessieをmicroSDへ焼く
  2. 一応、SDを抜き差し。
  3. マウント:
    • Paragon ExtFS for Windowsアイコン、ダブルクリック
    • => タスクバー通知領域
    • 右クリックで、緑がついて、どこかのドライブへアサインされてるハズ
    • そいつをクリックすると、アンマウントされる
  4. 設定ファイルをいじる
    1. 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
  1. アイコン右クリ、該当ドライブ選択して、アンマウント
  2. らずぱいへ挿して、起動。
  3. Windowsで、ping -t 192.168.0.10 でもしながら、待つ

その他メモ

  1. ExtFSでマウントしたら、ファイルのパーミッションに関係なく見れる。(ぉ

  2. /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
  1. メモ: wpa_passphrase.exeのビルド
    • Visual Studio 2015
    • ソースコード: https://w1.fi/releases/wpa_supplicant-2.5.tar.gz
    • 手順
      1. wpa_supplicant-2.5/wpa_supplicant/vs2005/wpa_supplicant.sln を開く
      2. wpa_passphrase以外のプロジェクトを削除(Delキー)
      3. Releaseに変更
      4. CONFIG_NO_STDOUT_DEBUG;CONFIG_CRYPTO_INTERNALをC/C++のプリプロセッサの設定に追加
      5. Static Linkするため、Code Generationの Runtime Library を "Multi threaded(/MT)" へ変更
      6. とりあえずビルド(CTRL+SHIFT+b)
      7. エラーにパッチを当てる(2箇所) : "(args...)" => "(args, ...)"とカンマを入れる
      8. ビルド => 完成

        wpa_supplicant-2.5/wpa_supplicant/vs2005/Release/wpa_passphrase.exe
1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?