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?

OpenWrt ELECOM WRH-300CR

Last updated at Posted at 2025-05-25

:flag_jp: Japanese notation

OpenWrt_icon.png

はじめに

初心者対応構成

検証環境

  • Windows11 バージョン24H2

トピック

SDカードスロット
USB

デバイス

ELECOM WRH-300CR

デバイスホームページ

WRH-300CRBK

WRH-300CRWH


OpenWrt

OpenWrt Project へようこそ

320.logo.png

仕様

Techdata


The UCI system
LuCI web interface

WHR-300CR.png


インストール

ファームウェア

デバイス用のOpenWrtファームウェアをダウンロード

イメージのダウンロード > FACTORY をダウンロード

インストールされたパッケージ、初回起動時のスクリプトのカスタマイズ

インストールされたパッケージ

リリースビルド

base-files ca-bundle dnsmasq dropbear firewall4 fstools kmod-gpio-button-hotplug kmod-leds-gpio kmod-nft-offload kmod-rt2800-soc libc libgcc libustream-mbedtls logd mtd netifd nftables odhcp6c odhcpd-ipv6only opkg ppp ppp-mod-pppoe procd-ujail swconfig uci uclient-fetch urandom-seed urngd wpad-basic-mbedtls kmod-usb2 kmod-usb-ohci luci

"snapshot" ビルド

apk-mbedtls base-files ca-bundle dnsmasq dropbear firewall4 fstools kmod-gpio-button-hotplug kmod-leds-gpio kmod-nft-offload kmod-rt2800-soc libc libgcc libustream-mbedtls logd mtd netifd nftables odhcp6c odhcpd-ipv6only ppp ppp-mod-pppoe procd-ujail swconfig uci uclient-fetch urandom-seed urngd wpad-basic-mbedtls kmod-usb2 kmod-usb-ohci luci

初回起動時に実行されるスクリプト (uci-defaults)


管理画面

フラッシュ

http://192.168.2.1
ファームウェアの更新からFACTORY.binをフラッシュ


RNDIS

パッケージ

WAN接続にはRNDIS USBドングルを使用する

mod-usb-net-rndis
kmod-usb-core kmod-usb-ehci kmod-usb2
kmod-usb-net-cdc

これで、デバイスをDUMBでDHCP化させても、デバイスが迷子にならない。

初期設定ツール

デバイスアクセス

デバイスアクセス(UCI)

パワーシェルでアクセス

PowerShellの開始

  • キー入力:Win+x > a > はい

UCI(SSH)アクセス

powershell:初期設定用
ssh -o StrictHostKeyChecking=no -oHostKeyAlgorithms=+ssh-rsa root@192.168.1.1
  • root@192.168.1.1's password:初期値:パスワード無し
SSHログイン出来ない場合:exclamation:
  • %USERPROFILE%\.ssh\known_hosts ※Windows隠しファイル
powershell
Clear-Content .ssh\known_hosts -Force 
OpenSSHのインストールが無い場合:exclamation:
  • 機能の確認
    ※Windows 10 Fall Creators Update(1709)以降標準搭載
powershell
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
  • 機能のインストール
powershell
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

LuCi

ブラウザーでアクセス

初期設定

パスワード

初期値から変更
passwd

Changing password for root
New password:

passwd:入力モード
任意のパスワード

Retype password:

passwd:入力モード
再入力

passwd: password for root changed by root

exit

ホストネーム

ホストネーム(openwrt)を変更
#!/bin/sh
HOSTNAME='openwrt' # デバイス名
uci set system.@system[0].hostname=${HOSTNAME}
uci commit system
/etc/init.d/sysntpd restart

タイムゾーン

タイムゾーンを変更
#!/bin/sh
TIMEZONE='JST-9'
ZONENAME='Asia/Tokyo'
uci set system.@system[0].timezone=${TIMEZONE}
uci set system.@system[0].zonename=${ZONENAME}
uci commit system
/etc/init.d/sysntpd restart

NTP

NTPサーバーを変更
#!/bin/sh
POOL='jp'
uci delete system.ntp.server
uci add_list system.ntp.server=0.${POOL}.pool.ntp.org
uci add_list system.ntp.server=1.${POOL}.ppl.ntp.org
uci add_list system.ntp.server=2.${POOL}.pool.ntp.org 
uci add_list system.ntp.server=3.${POOL}.pool.ntp.org
uci commit system
/etc/init.d/sysntpd restart
NTPサーバーを有効
#!/bin/sh
uci set system.ntp.enable_server='1' # NTPサーバー有効
uci set system.ntp.use_dhcp='0'
uci set system.ntp.interface='lan'
uci commit system
/etc/init.d/sysntpd restart

SSH

WANからのアクセスを遮断
uci set dropbear.@dropbear[0].Interface='lan'
uci commit dropbear

パッケージ

母国語サポート

LuCiの言語パッケージをインストール
  • 対応言語検索
#! /bin/sh
opkg update
opkg list luci-i18n-base\*
  • 設定
#! /bin/sh
I18N='ja'
opkg update
opkg install luci-i18n-base-${I18N}
opkg install luci-i18n-firewall-${I18N}

UCI(TTYD)

ブラウザーでUCIにアクセス
#! /bin/sh
I18N='ja'
opkg update
opkg install luci-i18n-ttyd-${I18N}
uci set ttyd.@ttyd[0].ipv6='1'
uci set ttyd.@ttyd[0].command='/bin/login -f root' #自動ログイン
uci commit ttyd
/etc/init.d/rpcd restart

ファイラー(SFTP)

WinSCPでファイルにアクセス
#! /bin/sh
opkg update
opkg install openssh-sftp-server

クライアント設定(Windows)

  • 手動インストール
  • 自動インストール
    • キー入力:Win+x > a > はい
    • 最新版ソフトウェアのインストール
powershell:クライアントPC
$psVersion = $PSVersionTable.PSVersion.Major
$LINKS = Invoke-WebRequest "https://winscp.net/eng/download.php"
$LINKS_VERSION = $LINKS.Links | Where-Object {$_.href -like "*WinSCP-*-Setup.exe*"} | Select-Object -ExpandProperty href
$VERSION = ($LINKS_VERSION -split '/')[-2] -replace "WinSCP-([0-9]+\.[0-9]+\.[0-9]+).*", '$1'
Write-Host "Version to install: $VERSION"
$downloadUrl = "https://jaist.dl.sourceforge.net/project/winscp/WinSCP/$VERSION/WinSCP-$VERSION-Setup.exe?viasf=1"
Write-Host "Downloading from: $downloadUrl"
$ONAMAE = (whoami).Split('\')[1]
$destinationPath = "C:\Users\$ONAMAE\Downloads\WinSCP-$VERSION-Setup.exe"
Invoke-WebRequest -Uri $downloadUrl -OutFile $destinationPath
Write-Host "Installing WinSCP..."
Start-Process -FilePath $destinationPath -ArgumentList "/VERYSILENT /NORESTART" -Wait
Invoke-Expression "C:\Users\$ONAMAE\AppData\Local\Programs\WinSCP\WinSCP.exe"
  • 警告 > 強制的に貼り付け

  • WinSCP設定

    • セッション
      • ホスト名:192.168.1.1
      • ユーザー名:root
      • パスワード:設定したパスワード
      • ログインをクリック

BusyBoxフルバージョン

インストール

OpenWrtバージョン

#!/bin/sh
opkg update
opkg install coreutils

CPU負荷分散

インストール
#! /bin/sh
opkg update
opkg install irqbalance
uci set irqbalance.irqbalance=irqbalance
uci set irqbalance.irqbalance.enabled='1'
uci commit irqbalance
/etc/init.d/irqbalance start

ネットワーク統計インターフェイス

インストール
#! /bin/sh
I18N='ja'
opkg update
opkg install luci-i18n-statistics-${I18N}
/etc/init.d/collectd enable
/etc/init.d/rpcd restart
  • プラグイン検索
#! /bin/sh
opkg update
opkg list collectd-mod\*

追加テーマ

インストール
#! /bin/sh
opkg update
opkg install luci-theme-openwrt
opkg install luci-theme-material

トラブル

既知の問題


初期化

ファクトリーリセット(初期化)

リセット
# 要注意
firstboot && reboot now

This will erase all settings and remove any installed packages. Are you sure? [N/y]

初期化:入力モード
y

デバイスリセットボタン

デバイスのリセットボタンを10秒(LEDが点滅するまで)押し続ける

http://10.10.10.254 でブラウザを開く

スクリーンショット 2025-06-28 111007.jpg

  • factory をアップロード
  • 数分待つ

あとがき

個人的にとても気に入りました!
長さはラズパイZEROと同等です
小さくて、Wi-FiとRJ45 があり、しかもUSBとSDカードスロットまである
フラッシュ8MB、メモリー64MBあるから、24.10が入る👍
リセットボタンがあるのが何気に助かる

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?