diff --git a/assets/images/ether-linux1.png b/assets/images/ether-linux1.png new file mode 100644 index 0000000..2521a53 Binary files /dev/null and b/assets/images/ether-linux1.png differ diff --git a/assets/images/ether-linux2.png b/assets/images/ether-linux2.png new file mode 100644 index 0000000..6007361 Binary files /dev/null and b/assets/images/ether-linux2.png differ diff --git a/assets/images/ether-linux3.png b/assets/images/ether-linux3.png new file mode 100644 index 0000000..0fc3bf2 Binary files /dev/null and b/assets/images/ether-linux3.png differ diff --git a/assets/images/ether-win1.png b/assets/images/ether-win1.png new file mode 100644 index 0000000..2fd61c5 Binary files /dev/null and b/assets/images/ether-win1.png differ diff --git a/assets/images/ether-win2.png b/assets/images/ether-win2.png new file mode 100644 index 0000000..c75d2f3 Binary files /dev/null and b/assets/images/ether-win2.png differ diff --git a/assets/images/ether-win3.png b/assets/images/ether-win3.png new file mode 100644 index 0000000..64e4c70 Binary files /dev/null and b/assets/images/ether-win3.png differ diff --git a/assets/images/ether-win4.png b/assets/images/ether-win4.png new file mode 100644 index 0000000..7abe6e4 Binary files /dev/null and b/assets/images/ether-win4.png differ diff --git a/assets/images/ether-win5.png b/assets/images/ether-win5.png new file mode 100644 index 0000000..24b3524 Binary files /dev/null and b/assets/images/ether-win5.png differ diff --git a/assets/images/ether-win6.png b/assets/images/ether-win6.png new file mode 100644 index 0000000..de52ab8 Binary files /dev/null and b/assets/images/ether-win6.png differ diff --git a/assets/images/ether-win7.png b/assets/images/ether-win7.png new file mode 100644 index 0000000..0c1b28f Binary files /dev/null and b/assets/images/ether-win7.png differ diff --git a/assets/images/ether-win8.png b/assets/images/ether-win8.png new file mode 100644 index 0000000..71c5ba7 Binary files /dev/null and b/assets/images/ether-win8.png differ diff --git a/assets/images/ether-win9.png b/assets/images/ether-win9.png new file mode 100644 index 0000000..cf860c9 Binary files /dev/null and b/assets/images/ether-win9.png differ diff --git a/collections/_tips/usb-ethernet-gadget.md b/collections/_tips/usb-ethernet-gadget.md index 719d1dd..8a7dd54 100644 --- a/collections/_tips/usb-ethernet-gadget.md +++ b/collections/_tips/usb-ethernet-gadget.md @@ -121,9 +121,9 @@ sudo reboot ``` -# Brain に Ethernet Gadget を喋らせる +# Ethernet Gadget を有効化する -sysfs のファイル操作により Ethernet Gadget を有効化します。 +sysfs のファイル操作により Brain 上で Ethernet Gadget を有効化します。 Brainux バージョン 2023-07-29-024604 以降では有効化処理が起動時に自動で実行されます。もし手動で有効化したい場合は以下の手順を参照してください。 1. 以下のスクリプトを vi や nano でホームディレクトリに保存します @@ -167,9 +167,127 @@ Brainux バージョン 2023-07-29-024604 以降では有効化処理が起動 ``` -# PC側の対応作業 +# PC 側の対応作業 -Windows / Mac / Linux すべてで利用可能です。(注: 2021年2月23日現在、上記スクリプトでは Windows と macOS で認識しないことを確認しており、修正予定です) +Windows / macOS / Linux すべてで利用可能です。 -PCを通してインターネットへ出るために、ネットワーク接続の共有設定が必要になります。OS ごとに設定方法は異なりますので、別途設定してください。 +## Windows 10 / 11 の設定 + +1. USB コントローラの動作モードが `peripheral` に変更された Brain を PC に接続して Gadget を有効化します + +2. Windows と Brain を USB ケーブルで接続します + + Brain の Ethernet Gadget が認識されていれば、デバイス マネージャーの「ほかのデバイス」グループに「RNDIS」が列挙されます。 + +3. 「RNDIS」を右クリックしてコンテキストメニューを表示し「ドライバーの更新」を選択します + + + +4. 「ドライバーの検索方法」ダイアログで「コンピューターを参照してドライバを検索」を選択します + + + +5. 「共通ハードウェアの種類」から「ネットワーク アダプター」を選択します + + + +6. 製造元「Microsoft」からモデル「リモート NDIS 互換デバイス」を選択し「次へ」をクリックします + + 以降はセットアップ完了まで画面の指示に従ってください。 + + + +7. 「ネットワーク接続」からアダプターの設定を変更します + + - 設定にて「ネットワークとインターネット」→「ネットワークの詳細設定」→「アダプターのオプションを変更する」を選択します (Windows 10) + + + + - 設定にて「ネットワークとインターネット」→「ネットワークの詳細設定」→「ネットワーク アダプター オプションの詳細」を選択します (Windows 11) + + + + + +8. Windows がインターネットの接続に使用しているアダプタ(Wi-Fi / イーサネット)を選択し「プロパティ」を開きます + + + +9. インターネットの共有設定をします + + 「共有」タブから「ネットワークのほかのユーザーに、このコンピューターのインターネット接続を通しての接続を許可する」を選択します。 + 加えて、「ホーム ネットワーク接続」プルダウンメニューで Ethernet Gadget に対応するアダプタを選択します。 + + + +10. Brain からインターネットへの疎通を確認します + + Brain からインターネットに `ping` などで到達できるか確認してください。 + + +## macOS の設定 + +**注意**: 以下に記載する方法で Brain を接続する場合、macOS の システム整合性保護 (SIP) を解除する必要があります。システム整合性保護は、Mac 上の保護されたファイルを改ざんしようとする悪質なソフトウェアからデータを守るセキュリティ技術です。詳しくは、[Mac のシステム整合性保護について - Apple サポート](https://support.apple.com/ja-jp/HT204899) などを参照し、十分に理解してから実行してください。 +{: .notice--warning} + +1. macOS でカーネル拡張機能 (kext) を利用可能にします + + 2023年8月現在 Apple がサポートしている macOS では、kext の読み込みを有効化するために特別な設定が必要です。主な設定内容は以下の通りですが、詳細は macOS のバージョンにより異なるため、お使いの macOS に合わせた手順を検索して設定してください。 + + - csrutil による SIP の無効化 + - システム拡張機能のユーザーによる管理の許可 + - システム設定におけるシステム拡張機能の許可 + +2. HoRNDIS をビルドします + + ビルドに必要な Git や Xcode を事前に適宜インストールしてください。Xcode の初回起動では以下のコマンドが必要な場合があります。 + + ```sh + xcodebuild -license + xcodebuild -runFirstLaunch + ``` + + ターミナルを使って、以下の手順でビルドします。 + + ```sh + git clone https://github.com/thpryrchn/HoRNDIS.git -b BigSur + cd HoRNDIS + make + ``` + +3. HoRNDIS をインストールします + + `build/pkg` に `HoRNDIS-kext.pkg` が作成されているので、ダブルクリックして、指示に従いインストールします。 + +4. USB コントローラの動作モードが `peripheral` に変更された Brain を PC に接続して Gadget を有効化します + +5. システム設定で、Brain に対応するネットワークインターフェースに対してインターネット共有を有効化します + +6. Brain からインターネットへの疎通を確認します + + Brain からインターネットに `ping` などで到達できるか確認してください。 + +## Linux の設定 + +作業手順とスクリーンショットは Ubuntu を例として紹介します。 + +1. USB コントローラの動作モードが `peripheral` に変更された Brain を PC に接続して Gadget を有効化します + +2. Ethernet Gadget のネットワーク設定を開きます + + Ethernet Gadget が認識されていると、トップバー右のシステムメニューに「USB Ethernet」 もしくは 「Ethernet」 という名前の項目で列挙されます。その項目をクリックし、「Wired Settings」 をクリックします。 + + + +3. 歯車のアイコンをクリックします + + + +4. 「IPv4」タブにある「Shared to other computers」を選択します + + + +5. Brain からインターネットへの疎通を確認します + + Brain からインターネットに `ping` などで到達できるか確認してください。