Mini Router

Seeed K.K.の松岡です。
Mini Routerのサンプル品が届いたので、動かしてみました。

左:Raspberry Pi 4, 中央:Mini Router, 右:reTerminal

Mini Routerとは?

Raspberry Pi Compute Module 4を採用した、カスタマイズ可能なルーターです。インターフェースにGigabit Ethernetを2つ搭載していて、OpenWrtをプレインストール済みです。

www.seeedstudio.com

DSI, CSI, GPIO(I2C, SPI)で拡張もできる

ちょっと分かりにくいのですが、Mini Routerのケースの中に入っている基板部分がDual Gigabit Ethernet Carrier Board for Raspberry Pi CM4という製品でして、回路図など技術情報は基板部分の製品のWikiページに書いてあります。もちろん、いつものSeeed製品のように回路図が公開されています。

Mini Routerはルーター用途を想定していますが、回路図を見ると拡張インターフェースが結構有って、他の用途でも利用できそうだなと感じます。

  • Gigabit Ethernet x2
  • USB 3.0 x2
  • micro HDMI
  • DSI Display Port
  • CSI Camera Port
  • x6 GPIO (I2C, SPI)

動かしてみる

それでは動かしてみましょう。
といきたいところですが、残念ながらそのまま電源を入れて動かすわけにはいきません。Mini Routerに内蔵されているRaspberry Pi Compute Module 4はRAM 4GB, eMMC 32GB, with Wirelessのモデルのため技適の適合が必要ですが、Mini Routerは必要な認証を取得していないからです。また、同封のACアダプターも電気用品安全法をパスしていないのでNGです。

というわけなので、Raspberry Pi Compute Module 4をwithout Wirelessのものに交換して、別途用意したACアダプターを使って動かしたいと思います。

CM4換装

Mini Routerを分解して、Raspberry Pi Compute Module 4を換装します。
裏フタのネジ4本を外すと、サクッと基板を取り出すことができました。reTerminalのようにツメで止まっていることもなくて、不安ゼロです。
次に、Compute Module 4を固定しているネジ4本を外しました。これで、Compute Module 4が外せる状態になるので、手持ちのwithout Wirelessのモデルと交換しました。

(写真はCM4換装済み)

OSインストールはreTerminalのeMMC書き換え手順と同様でした。ここではRaspberry Pi OS Lite (32-bit)の最新版をインストールしました。

  1. ブートモードをUSBブートに変更
  2. USB-CでPCに接続してrpiboot起動
  3. Raspberry Pi ImagerでeMMCへ書き込み
  4. ブートモードを戻す

基板上にブートモードを切り替えるスイッチは無く、ピンヘッダーがあるのでそこをショートする操作が必要でした。(ジャンパーピン or ジャンパーワイヤー必要)

Ethernet速度測定

何事もなくRaspberry Pi OSが動きました。(Compute Module 4を使っているので正常に動いて当たり前ですけれども)

ルーター機器ということで、どれくらい通信速度が出るのか気になったのでiperf3でPCとMini Routerとの通信でどれくらいの速度が出るのか確認しました。

Right Ethernet Port:

Connecting to host 192.168.1.107, port 5201
[  5] local 192.168.1.104 port 38700 connected to 192.168.1.107 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   109 MBytes   915 Mbits/sec    0    211 KBytes
[  5]   1.00-2.00   sec   112 MBytes   941 Mbits/sec    0    211 KBytes
[  5]   2.00-3.00   sec   112 MBytes   940 Mbits/sec    0    211 KBytes
[  5]   3.00-4.00   sec   112 MBytes   942 Mbits/sec    0    211 KBytes
[  5]   4.00-5.00   sec   112 MBytes   941 Mbits/sec    0    211 KBytes
[  5]   5.00-6.00   sec   112 MBytes   942 Mbits/sec    0    211 KBytes
[  5]   6.00-7.00   sec   112 MBytes   940 Mbits/sec    0    211 KBytes
[  5]   7.00-8.00   sec   112 MBytes   940 Mbits/sec    0    211 KBytes
[  5]   8.00-9.00   sec   112 MBytes   942 Mbits/sec    0    211 KBytes
[  5]   9.00-10.00  sec   112 MBytes   940 Mbits/sec    0    211 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.09 GBytes   939 Mbits/sec    0             sender
[  5]   0.00-10.00  sec  1.09 GBytes   938 Mbits/sec                  receiver

iperf Done.

Left Ethernet Port:

Connecting to host 192.168.1.107, port 5201
[  5] local 192.168.1.105 port 38726 connected to 192.168.1.107 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.01   sec  62.5 MBytes   518 Mbits/sec    0    133 KBytes
[  5]   1.01-2.02   sec  65.0 MBytes   544 Mbits/sec    0    133 KBytes
[  5]   2.02-3.00   sec  63.8 MBytes   542 Mbits/sec    0    133 KBytes
[  5]   3.00-4.01   sec  65.0 MBytes   541 Mbits/sec    0    140 KBytes
[  5]   4.01-5.02   sec  65.0 MBytes   542 Mbits/sec    0    140 KBytes
[  5]   5.02-6.02   sec  65.0 MBytes   543 Mbits/sec    0    140 KBytes
[  5]   6.02-7.00   sec  63.8 MBytes   543 Mbits/sec    0    140 KBytes
[  5]   7.00-8.01   sec  65.0 MBytes   544 Mbits/sec    0    140 KBytes
[  5]   8.01-9.00   sec  65.0 MBytes   547 Mbits/sec    0    140 KBytes
[  5]   9.00-10.01  sec  66.2 MBytes   551 Mbits/sec    0    140 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.01  sec   646 MBytes   541 Mbits/sec    0             sender
[  5]   0.00-10.01  sec   646 MBytes   541 Mbits/sec                  receiver

iperf Done.

Right Ethernetが1Gbpsくらい、Left Ethernetが650Mbpsくらいでした。

Left Ethernetが遅い🤔

...

ここに情報がありました。Left EthernetはMicrochip LAN7800というチップを使っているが、Raspberry Pi OSに同封されているドライバがアップデートされていないのが原因のようです。

手順に従ってドライバをアップデートしたところ、Left Ethernetも1Gbpsくらいになりました。

$ git clone --depth 1 https://github.com/Seeed-Studio/seeed-linux-dtoverlays.git
$ cd seeed-linux-dtoverlays
$ sudo ./scripts/cm4_lan7800.sh
$ sudo reboot

Left Ethernet Port(Driver updated):

Connecting to host 192.168.1.107, port 5201
[  5] local 192.168.1.105 port 54752 connected to 192.168.1.107 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   113 MBytes   944 Mbits/sec    0    209 KBytes
[  5]   1.00-2.00   sec   112 MBytes   942 Mbits/sec    0    209 KBytes
[  5]   2.00-3.00   sec   112 MBytes   941 Mbits/sec    0    209 KBytes
[  5]   3.00-4.00   sec   112 MBytes   942 Mbits/sec    0    209 KBytes
[  5]   4.00-5.00   sec   112 MBytes   941 Mbits/sec    0    209 KBytes
[  5]   5.00-6.00   sec   112 MBytes   941 Mbits/sec    0    209 KBytes
[  5]   6.00-7.00   sec   112 MBytes   941 Mbits/sec    0    209 KBytes
[  5]   7.00-8.00   sec   112 MBytes   942 Mbits/sec    0    209 KBytes
[  5]   8.00-9.00   sec   112 MBytes   940 Mbits/sec    0    209 KBytes
[  5]   9.00-10.00  sec   112 MBytes   943 Mbits/sec    0    209 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.10 GBytes   942 Mbits/sec    0             sender
[  5]   0.00-10.00  sec  1.10 GBytes   941 Mbits/sec                  receiver

iperf Done.

変更履歴

日付 変更者 変更内容
2022/1/6 松岡 作成