follow me

MZK-SN300N2はOpenWRT化可能です。

Wi-Fiメディアサーバ|MZK-SN300N2のOpenWRT化についての話です。
この小型ルータですが、Realtekチップ搭載な為、OpenWRT化できないと云われていた物になる訳ですが、実はOpenWRT化が可能になってました。
OpenWRT化ができないのが永かったので、RTL819Xの成果物でカスタマイズされていた方は多いのではないでしょうか。
RTL819Xも2013-01-04のrtl819x-SDK-v3.2.3が最新の様ですが、少し癖があったりするので、v3.2.3でビルドできないとか悩んだ人も居るのではないでしょうか。
RTL819Xについては機会があれば書きたいと思いますが、今回はOpenWRT化について書いていきます。

餌食となったのはMZK-SN300N2な訳ですが、ジャンク品を拾ってきました。


付属CD-ROMと並べると、本体サイズがわかると思います。
そこそこ小さいですね。
USB付きな点は嬉しいですね。いざとなればUSBメモリでrootfsをデカくできるので。



分解する際は、長いスイッチの棒を折ってしまいそうになるので注意を。
結構簡単に折れるぐらいに細いです。また、開ける時にジャマです。

で、使われているSoCはRealtek RTL8196C、WiFiについてはRealtek RTL8192CEです。
RTL8196Cが使用されている小型ルータでは、この構成がリファレンスであり、PLANEXのMZK-SN300N2も同じになります。
なので、他社Firmwareが書き込めるなどの情報も多く存在します。


SPI Flashは、MX25L6445E(8MB)が使用されておりMX25L12845Eに張替えが可能なのではないかと憶測中です。
まぁ、4MBならすぐに張替えなんですが、8MBなら我慢の範囲内です。
USBもありますし。


ちなみに、Web管理画面から書き込めるかは試していません。
シリアルを引っ張りだしました。
Tx、Rxはパターンが存在するので、そこから線を延ばします。3.3Vなのでレベル変換は必要です。
GNDはパターンに存在しない為、適当に挟んでください。僕はUSBを挟んでました。
これでRealtekのブートローダにアクセスが可能になります。
少し独特なブートローダですが、基本的にはtftp putでファームを流し込む形になります。


まだ、SDK環境の準備周りを整理仕切れていないので、整理してからビルド手順は記載するとして、OpenWRTの起動ログを貼り付けておきます。
---RealTek(RTL8196C)at 2010.08.19-10:51+0800 version v1.1c [16bit](390MHz)
sys checksum error at 00010000!
no sys signature at 00020000!
Jump to image start=0x80500000...


OpenWrt kernel loader for Realtek rtl819xx
Copyright (C) 2011 Gabor Juhos 
Copyright (C) 2013 Roman Yeryomin 
Decompressing kernel to 80000000... done!
Seems kernel_entry address is different from load address, so...
Starting kernel from 80003530...

[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.010000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.030000] Memory: 26212k/32768k available (2829k kernel code, 6556k reserved, 723k data, 100k init, 0k highmem)
[    0.040000] Calibrating delay loop... 389.12 BogoMIPS (lpj=1945600)
[    0.260000] Mount-cache hash table entries: 512
[    1.270000] USB 2.0 PHY Patch Done.
[    1.310000] reg e0=99
[    1.350000] reg e1=a8
[    1.380000] reg e2=98
[    1.420000] reg e3=c1
[    1.460000] reg e4=1
[    1.500000] reg e5=91
[    1.530000] reg e6=98
[    1.570000] reg e7=34
[    1.610000] reg f0=fc
[    1.650000] reg f1=8c
[    1.680000] reg f2=0
[    1.720000] reg f3=11
[    1.760000] reg f4=e3
[    1.800000] reg f5=d2
[    1.830000] reg f6=0
[    1.840000] net_namespace: 780 bytes
[    1.860000] NET: Registered protocol family 16
[    1.910000] bio: create slab  at 0
[    1.920000] usbcore: registered new interface driver usbfs
[    1.930000] usbcore: registered new interface driver hub
[    1.940000] usbcore: registered new device driver usb
[    1.960000] NET: Registered protocol family 2
[    1.970000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    1.980000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    1.990000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    2.000000] TCP: Hash tables configured (established 1024 bind 1024)
[    2.010000] TCP reno registered
[    2.020000] NET: Registered protocol family 1
[    2.040000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.050000] Registering mini_fo version $Id$
[    2.060000] JFFS2 version 2.2. (NAND) c 2001-2006 Red Hat, Inc.
[    2.070000] msgmni has been set to 51
[    2.090000] io scheduler noop registered
[    2.100000] io scheduler cfq registered (default)
[    2.110000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    2.120000] serial8250: ttyS0 at MMIO 0x18002000 (irq = 23) is a 16550A
[    2.140000] PPP generic driver version 2.4.2
[    2.150000] PPP Deflate Compression module registered
[    2.160000] PPP BSD Compression module registered
[    2.170000] MPPE/MPPC encryption/compression module registered
[    2.190000] NET: Registered protocol family 24
[    2.200000] tun: Universal TUN/TAP device driver, 1.6
[    2.210000] tun: (C) 1999-2004 Max Krasnyansky 
[    2.220000] Realtek WLAN driver - version 1.6 (2013-02-21)
[    2.230000]  wlan_index:0  0, 134,0xb9000000,0xb8b10000,11
[    2.240000] =====>>INSIDE rtl8192cd_init_one <<=====
[    2.250000] sizeof(struct rtl8192cd_priv) = 161152 
[    2.560000] 96C - 40MHz Clock Source
[    3.290000] vendor_deivce_id=819110ec
[    3.320000] =====>>EXIT rtl8192cd_init_one <<=====
[    3.330000] =====>>INSIDE rtl8192cd_init_one <<=====
[    3.340000] sizeof(struct rtl8192cd_priv) = 161152 
[    3.350000] =====>>EXIT rtl8192cd_init_one <<=====
[    3.360000] =====>>INSIDE rtl8192cd_init_one <<=====
[    3.370000] sizeof(struct rtl8192cd_priv) = 161152 
[    3.390000] =====>>EXIT rtl8192cd_init_one <<=====
[    3.400000] 
[    3.400000] 
[    3.400000] 
[    3.400000] Probing RTL8186 10/100 NIC-kenel stack size order[3]...
[    3.410000] chip name: 8196C, chip revid: 0
[    3.430000]   Set 8196C PHY Patch OK
[    3.440000] NOT YET
[    3.460000] Set threshould idx 0
[    3.480000] eth0 added. vid=9 Member port 0x1...
[    3.490000] eth1 added. vid=8 Member port 0x10...
[    3.500000] eth2 added. vid=9 Member port 0x2...
[    3.510000] eth3 added. vid=9 Member port 0x4...
[    3.530000] eth4 added. vid=9 Member port 0x8...
[    3.540000] eth5 added. vid=9 Member port 0x0...
[    3.560000] [peth0] added, mapping to [eth1]...
[    3.580000] SPI INIT
[    3.580000]  ========================= Registed SPI Flash Model ========================= 
[    3.590000] |No chipID  Sft chipSize blkSize secSize pageSize sdCk opCk      chipName    |
[    3.600000] | 0 c22017h  0h  800000h  10000h   1000h     100h   50    0   MX6405D/05E/45E|
[    3.610000]  ============================================================================ 
[    3.620000] SPI flash(MX6405D/05E/45E) was found at CS0, size 0x800000
[    3.630000] Creating 4 MTD partitions on "flash_bank_1":
[    3.640000] 0x000000000000-0x000000030000 : "boot+cfg"
[    3.650000] 0x000000030000-0x0000001b0000 : "kernel"
[    3.660000] 0x0000001b0000-0x000000800000 : "rootfs"
[    3.670000] mtd: partition "rootfs" set to be root filesystem
[    3.680000] mtd: partition "rootfs_data" created automatically, ofs=42C000, len=3D4000 
[    3.690000] 0x00000042c000-0x000000800000 : "rootfs_data"
[    3.700000] 0x000000030000-0x000000800000 : "firmware"
[    3.710000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.720000] rtl819x-ehci rtl819x-ehci: Realtek rtl819x On-Chip EHCI Host Controller
[    3.730000] rtl819x-ehci rtl819x-ehci: new USB bus registered, assigned bus number 1
[    3.780000] rtl819x-ehci rtl819x-ehci: irq 10, io mem 0x18021000
[    3.820000] rtl819x-ehci rtl819x-ehci: USB 2.0 started, EHCI 1.00
[    3.830000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.840000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.850000] usb usb1: Product: Realtek rtl819x On-Chip EHCI Host Controller
[    3.860000] usb usb1: Manufacturer: Linux 2.6.30.9 ehci_hcd
[    3.870000] usb usb1: SerialNumber: rtl819x-ehci
[    3.880000] usb usb1: configuration #1 chosen from 1 choice
[    3.890000] hub 1-0:1.0: USB hub found
[    3.900000] hub 1-0:1.0: 1 port detected
[    3.910000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    3.920000] rtl819x-ohci rtl819x-ohci: Realtek rtl819x built-in OHCI controller
[    3.930000] rtl819x-ohci rtl819x-ohci: new USB bus registered, assigned bus number 2
[    3.940000] rtl819x-ohci rtl819x-ohci: irq 10, io mem 0x18020000
[    4.020000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[    4.030000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.040000] usb usb2: Product: Realtek rtl819x built-in OHCI controller
[    4.050000] usb usb2: Manufacturer: Linux 2.6.30.9 ohci_hcd
[    4.060000] usb usb2: SerialNumber: rtl819x-ohci
[    4.070000] usb usb2: configuration #1 chosen from 1 choice
[    4.080000] hub 2-0:1.0: USB hub found
[    4.090000] hub 2-0:1.0: 1 port detected
[    4.100000] nf_conntrack version 0.5.0 (512 buckets, 2048 max)
[    4.110000] CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
[    4.120000] nf_conntrack.acct=1 kernel paramater, acct=1 nf_conntrack module option or
[    4.130000] sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
[    4.140000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    4.150000] TCP cubic registered
[    4.170000] NET: Registered protocol family 17
[    4.180000] Netlink[Kernel] create socket for igmp ok.
[    4.190000] Realtek FastPath:v1.03
[    4.220000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    4.230000] Freeing unused kernel memory: 100k freed
[    4.260000] Warning: unable to open an initial console.
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
[   14.440000] SCSI subsystem initialized
[   14.530000] Driver 'sd' needs updating - please use bus_type methods
[   14.850000] Initializing USB Mass Storage driver...
[   14.860000] usbcore: registered new interface driver usb-storage
[   14.870000] USB Mass Storage support registered.
switching to jffs2
[   35.610000] mini_fo: using base directory: /
[   35.620000] mini_fo: using storage directory: /overlay
- init -

Please press Enter to activate this console. [   37.640000] NET: Registered protocol family 10
[   37.660000] lo: Disabled Privacy Extensions
[   39.200000] xt_time: kernel timezone is -0000
[   40.390000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   41.070000] usbcore: registered new interface driver usblp
[   41.190000] usbcore: registered new interface driver usbserial
[   41.200000] usbserial: USB Serial Driver core
[   41.330000] USB Serial support registered for GSM modem (1-port)
[   41.350000] usbcore: registered new interface driver option
[   41.360000] option: v0.7.2:USB Driver for GSM modems
[   41.700000] u32 classifier
[   41.710000]     Actions configured 
[   41.810000] Mirror/redirect action on
[   54.540000] set_mode = IW_MODE_MASTER
net_cfg=lan
[   58.740000] device eth0 entered promiscuous mode
[   58.760000] br-lan: port 1(eth0) entering learning state
bridge name	bridge id		STP enabled	interfaces
br-lan		[   58.860000] device eth2 entered promiscuous mode
7f[   58.870000] br-lan: port 2(eth2) entering learning state
ff.0022cfa5afa5	no		eth0
vif=cfg033579 bridge=br-lan
tree config_set cfg033579 bridge br-lan
house start_net wlan0 lan
CONFIG_APPEND=''
CONFIG_LIST_STATE=''
CONFIG_NUM_SECTIONS='2'
CONFIG_SECTION='cfg033579'
CONFIG_SECTIONS='wlan0 cfg033579'
CONFIG_cfg02e48a_TYPE='system'
CONFIG_cfg02e48a_hostname='OpenWrt'
CONFIG_cfg02e48a_timezone='UTC'
[   59.020000] device eth3 entered promiscuous mode
[   59.030000] br-lan: port 3(eth3) entering learning state
CONFIG_cfg033579_TYPE='wifi-iface'
CONFIG_cfg033579_bridge='br-lan'
CONFIG_cfg033579_device='wlan0'
CONFIG_cfg033579_encryption='none'
CONFIG_cfg033579_ifname='wlan0'
CONFIG_cfg033579_mode='ap'
CONFIG_cfg033579_network='lan'
CONFIG_cfg033579_ssid='OpenWrt'
CONFIG_ntp_TYPE='timeserver'
CONFIG_ntp_enable_server='0'
CONFIG_ntp_server=''
CONFIG_ntp_server_ITEM1='0.openwrt.pool.ntp.org'[   59.150000] device eth4 entered promiscuous mode

C[   59.160000] br-lan: port 4(eth4) entering learning state
ONFIG_ntp_server_ITEM2='1.openwrt.pool.ntp.org'
CONFIG_ntp_server_ITEM3='2.openwrt.pool.ntp.org'
CONFIG_ntp_server_ITEM4='3.openwrt.pool.ntp.org'
CONFIG_ntp_server_LENGTH=''
CONFIG_wlan0_TYPE='wifi-device'
CONFIG_wlan0_channel='11'
CONFIG_wlan0_ht_capab=''
CONFIG_wlan0_htmode='HT40-'
CONFIG_wlan0_macaddr='00:22:cf:a5:af:a5'
CONFIG_wlan0_phy='wlan0'
CONFIG_wlan0_type='realtek'
CONFIG_wlan0_vifs='cfg033579 '
[   60.770000] br-lan: port 1(eth0) entering forwarding state
[   60.880000] br-lan: port 2(eth2) entering forwarding state
[   61.040000] br-lan: port 3(eth3) entering forwarding state
[   61.170000] br-lan: port 4(eth4) entering forwarding state
[   65.190000] [PHY_ConfigMACWithParaFile][MACPHY_REG_92C]
[   65.190000] ===> Load_92C_Firmware
[   65.190000] <=== Load_92C_Firmware
[   65.190000] 0x55d = 0xff
[   65.200000] device wlan0 entered promiscuous mode
[   65.210000] br-lan: port 5(wlan0) entering learning state
bridge name	bridge id		STP enabled	interfaces
br-lan		7fff.0022cfa5afa5	no		eth0
							eth2
							eth3
							eth4
							wlan0
[   67.220000] br-lan: port 5(wlan0) entering forwarding state
[   69.720000] br-lan: port 5(wlan0) entering disabled state
[   69.750000] rtl_net80211_setparam +++
[   69.750000] rtl8192cd_net80211_ioctl, param = 13, value =0
[   69.750000] rtl_net80211_setparam ---
[   69.770000] rtl_hapd_config +++
[   69.770000] rtl_hapd_config ---
[   69.790000] rtl_net80211_setparam +++
[   69.790000] rtl8192cd_net80211_ioctl, param = 9, value =0
[   69.790000] rtl_net80211_setparam ---
[   69.810000] rtl_net80211_setparam +++
[   69.810000] rtl8192cd_net80211_ioctl, param = 3, value =1
[   69.810000] rtl_net80311_authmode +++
[   69.810000] authtype=0, encmode=0, pskenable=0, dot11802_1x=0 
[   69.810000] rtl_net80211_setparam ---
[   69.830000] rtl_net80211_setparam +++
[   69.830000] rtl8192cd_net80211_ioctl, param = 13, value =0
[   69.830000] rtl_net80211_setparam ---
[   69.850000] 
[   69.850000] Fail: interface not opened
[   69.870000] 
[   69.870000] Fail: interface not opened
[   69.890000] 
[   69.890000] Fail: interface not opened
[   69.910000] 
[   69.910000] Fail: interface not opened
[   69.930000] rtl_net80211_setappiebuf +++
[   69.930000] frametype =0, iebuflen=0 
[   69.930000] WSC: set beacon IE
[   69.930000] rtl_net80211_setappiebuf ---
[   69.960000] rtl_net80211_setappiebuf +++
[   69.960000] frametype =2, iebuflen=0 
[   69.960000] WSC: set probe response IE
[   69.960000] rtl_net80211_setappiebuf ---
[   69.980000] Undefined state... using AP mode as default
[   70.000000] [PHY_ConfigMACWithParaFile][MACPHY_REG_92C]
[   70.000000] ===> Load_92C_Firmware
[   70.000000] <=== Load_92C_Firmware
[   70.000000] 0x55d = 0xff
[   70.050000] br-lan: port 5(wlan0) entering learning state
[   72.060000] br-lan: port 5(wlan0) entering forwarding state



BusyBox v1.19.4 (2014-06-04 22:30:31 JST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r36713)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:/# 
root@OpenWrt:/# 
MZK-SN300N2はOpenWRT化可能です。 | 3 件のコメント | アカウント登録
サイト管理者はコメントに関する責任を負いません。
au Home Spot Qube (PXH11RWA)のOpenWrt化
投稿者: ゲストユーザ on 2014年11月 4日(火) 08:14 JST

au の Home Spot Qube (Planex PXH11RWA)も SoCが RTL8196C です。

USBはついていませんが、Flash 8MB / RAM 32MB あるので、OpenWrtで活用できそうです。

SDKからBuildまでの記事の追記を気長にお待ちします。

au Home Spot Qube (PXH11RWA)のOpenWrt化
投稿者: Tochiro on 2014年11月10日(月) 01:06 JST

すっかり、ビルド周りを書くのが遅れてます。
そろそろ書かないと記憶ががが。
au Home Spot Qubeも一個入手してみようなかなぁ。

au Home Spot Qube (PXH11RWA)のOpenWrt化
投稿者: ゲストユーザ on 2014年11月24日(月) 00:43 JST

お返事ありがとうございます。ぜひとも!
RealTekはOpenWrtのツリーにないので、RealTekのSDKでOpenWrt toolkit から作りなおしたと思うのですが、
新アーキテクチャの場合のOpenWrtのbuild方法ということで期待しつつ末永く待っています。