Akio Yasui
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    __[デザイン戦略(インタラクション) / オープンデザイン実践](https://hackmd.io/s/HJVVNqnpZ)__ > __[REMOTE CHIRIMEN](https://hackmd.io/s/rkSDscnab)__ > # Raspberry Pi 3 の IP 確認と SSH 接続手順 (Mac 編) 本チュートリアルでは、インターネット共有機能を用いて Mac と Raspberry Pi 3 (以下 RPi3) を (HDMI ディスプレイなしで) 接続して制御可能にする手順を説明します。 ## 自分のパソコンと有線接続 まずは RPi3 に **microSDカードを挿入** し、**Ethernetケーブルを接続**します。 Ethernetケーブルのもう一端は、手元の自分のパソコンに接続します。 パソコンがEthernetポートを備えていない場合は、USB-Ethernet変換ケーブルを用意してください。 **電源(マイクロUSB)を接続**すると RPi3 が起動しボード上の LED ランプが点灯します。 ## インターネット共有の設定 以下の作業は自分のパソコン上で行います。 また、環境はMac(macOS)を想定しています。 Windowsなどその他のOSを使っている場合はSAに問い合わせてください。 **「システム環境設定」の「共有」を開いてください。** ![](https://i.imgur.com/6jn9Gdw.png) **「共有する接続経路」で、インターネット接続に用いている経路を選択**してください。無線LANでインターネット接続している場合など、ほとんどの場合は「Wi-Fi」になります。 また、**「相手のコンピュータでのポート」では、Raspberry Piと接続している経路を選択してオンに**してください。 パソコンのEthernetポートを使用している場合は「Ethernet」、USB-Ethernet変換ケーブルを用いている場合はその製品により「USB Ethernet」「USB LAN」「Thunderbolt Ethernet」「AX88x72A」などと書いてあるものになります。 複数あって迷う場合は該当しそうなモノをすべてチェックしてしまうか、「システム環境設定」の「ネットワーク」でLANケーブルの抜き差しをしたときに接続状況の表示が変わるポートを確認してください。 ![](https://i.imgur.com/F0mgeoV.png) **共有「インターネット共有」にチェックを入れてください**。 ![](https://i.imgur.com/DnZv8G7.png) 開始するか尋ねるアラートが出ます。「開始」を選択してください。 ![](https://i.imgur.com/WLFXijU.png) ## IPアドレスの確認 **「ターミナル」を起動してください**。どこにあるかわからない場合は、Finderを起動して「アプリケーション」フォルダ内の「ユーティリティ」フォルダ内を探してみてください。 起動したら、**arp コマンドで IP アドレスを確認します**。以下のコマンドを実行してください: ```shell= arp -a | grep b8:27:eb ``` 結果が表示されたら、IPアドレスを確認してどこかに記録しておいてください。下の例の場合、IPアドレスは「`192.168.2.2`」になります。 ![](https://i.imgur.com/aRph9AA.png) なお、このコマンドでは `arp -a` で Ethernet (LAN) 接続されている端末の ARP テーブルを表示し、そのうち Raspberry Pi Foundation の Vendor ID である `b8:27:eb` を含む行を抜き出して RPi3 の情報だけを表示しています。 ## SSH接続 ### RPi3に入る 同じくMacのターミナルで、以下のコマンドを実行し **RPi3 に SSH 接続します**。ただし`192.168.2.2`の部分は先ほど確認したIPアドレスに置き換えてください。 ``` ssh pi@192.168.2.2 ``` `pi@192.168.2.2's password:` などと表示されたら、パスワード `rasp` を入力してEnterキーを押してください(入力した文字列は表示されません)。 `pi@raspberrypi:~ $` と表示されれば接続に成功しています。 ![](https://i.imgur.com/N48RR8G.png) Node.js サーバ側の再起動、ログの確認、I2C デバイスの接続確認など、Raspberry Pi 上のシェルで何か実行したいときにはこのように SSH 接続してから実行してください。 ### RPi3から出る(Macに戻る) SSH 接続した状態(`pi@raspberrypi:~ $`と表示されている状態)で `exit` と入力すると、SSH 接続が終了してMacのターミナルに戻ります。 `<自分のPC名>:~ <自分のユーザ名>` と表示されているのを確認してください。 ### 同時に作業する RPi3にSSH接続したままでも、⌘+Tで新しいタブを開くとMac上で作業できます。 | RPi3 | Mac | | :---: | :---: | | `pi@raspberrypi:~ $` | `<自分のPC名>:~ <自分のユーザ名>` | ターミナルの操作時にはローカル (Mac) で作業しているか、リモートのサーバ (RPi3) で作業しているか意識するようにしましょう。 ## トラブルシューティング ### IPアドレスが169.....になる IPアドレスが正しく振られていません。 以下の二つを試してみて下さい。 * ネットワーク環境設定から共有先のインターフェースのIPv4設定を無効化する * ネットワーク共有から、共有先インターフェースが正しく選択されているか確認する ### `arp -a`しても出てこない RPi3を再起動・差し直しして、RPi3側のイーサネットアダプタのオレンジと緑のLEDが点灯しているか確認して下さい。 ### そのほか Remote CHIRIMEN ページ末尾のトラブルシューティングを参照してください: https://hackmd.io/s/rkSDscnab

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully