0
0

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.

RaspberryPi Zero Wのセットアップ

Last updated at Posted at 2019-06-23

概要

RaspberryPi Zero Wのセットアップを外部ディスプレイやキーボードがない環境で行う必要がありました。その際に、手元のPCとRaspberryPiをUSBケーブルのみで接続し、初期設定を行った時のメモです。
最終的に下記のような手順を踏みました。

  1. RaspberryPiの起動時にSSHが起動するように設定する。
  2. RaspberryPiのIPアドレスを固定する。
  3. RaspberryPiがCOMで認識された場合は、RPI Driver OTGを設定する。
  4. sshで固定IPに接続する。

環境

  • PC: Windows10
  • Raspberry Pi Zero W

手順

  1. Raspbian OSをインストールしたSDカードを用意します。
  2. RaspberryPiにSDカードを挿入する前に、下記の設定を行います。
    1. boot内容を書き換えOTG(On the go)を有効にする。

      $ touch /boot/ssh
      $ vi /boot/cmdline.txt
      
      dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_ether quiet init=/usr/lib/raspi-config/init_resize.sh quiet splash plymouth.ignore-serial-consoles
      
    2. IPアドレスの固定。実際のIPなどは適時変更してください。

      $ vi /etc/dhcpcd.conf
      
      interface eth0
      static ip_address=192.168.10.100/24
      static routers=192.168.10.1
      static domain_name_servers=192.168.10.1
      
  3. RaspberryPiにSDカードを挿入し、PCとUSBで接続します。
    • 電源側ではないほうに接続します。
  4. デバイスマネージャでRaspberryPiをCOMとして認識した場合は、RPI Driver OTGを設定する。
  5. ssh pi@192.168.10.100で接続する。

その他

Bonjour

幾つかのサイトを確認するとBonjourが必要と書かれていますが、おそらく固定IPにしてしまえば不要と思います。
もし必要であった場合は、Bonjourをインストールし、ファイアーウォールでUDP5353の通信を許可してください。

RPI Driver OTG

ドライバがあるサイトは非常にドライバの探し方が難しいです。私の場合は、下記の手順でドライバのダウンロードページへのアクセスリンクを見つけられました。

  1. 検索窓で、rpi driver otgと入力します。
  2. Pi Zero OTG Ethernetというページが検索できるのでクリックします。
  3. 真ん中あたりにTélécharger les drivers suivant: RPI Driver OTGとあってRPIドライバのダウンロードページへのリンクがあります。

windows環境下でのext3の書き換え

windows環境ではext3でフォーマットされていると読み書きができません。幾つかのソフトがありますが、ext2fsdではマウントできなかったので、Paragon soft]lfswinのお試し版でマウントしました。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?