Alter0ne / rtl8196e

OpenWRT for Realtek rtl8196e with working packages and USB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Would it work on rtl8196eu ?

xromansx opened this issue · comments

Hi, on what router did you use it ?

commented

Qtech qbr-1041wu v2s
Totolink N300RT

это оба RTL8196c так что не факт что запустится...

commented

Нет, оба на rtl8196e. А вот по отличиям rtl8196eu я не могу ничего сказать.

Интерестно видел разобраный Totolink N300RT там 8196с стоял. у тебя случаем нет фулдампа хочу его на своем Comfast CF-WR302S попробовать.

commented

Дамп от N300RT здесь: http://4pda.ru/forum/index.php?showtopic=784702&view=findpost&p=61931189
Дамп от QTECH + загрузчик: http://4pda.ru/forum/index.php?showtopic=693045&view=findpost&p=75254324
Но CF-WR302S - это вроде просто репитер без USB. Смысл на него ставить Openwrt без места под пакеты?

У меня не совсем он но от него прошивка подошла, у меня умный выключатель у него нет езернета так что я могу пробовать только полныые дампы. boot96E_32M.zip не пошел я вырезал первую строку но пишет Booting... и на этом все. 311 и 300 эт один и тот же деваис...

Получилось запустить ОпенВРТ использывал родной бутлоадер от totolink 200ex но никак не могу заставить wifi работать при старте выдает ошибку:
[ 15.420000] Realtek WLAN driver - version 1.7 (2015-10-30)
[ 15.430000] Adaptivity function - version 9.3.4
[ 15.440000] Device Name = RTKWiFi0
[ 15.450000] VIF_NUM=9
[ 15.460000] CFG0
[ 17.470000] 98 - 40MHz Clock Source
[ 19.500000] Find Port=0 Device:Vender ID=817910ec
[ 20.010000] =====>> EXIT rtl8192cd_init_one (-5) <<=====
[ 20.020000] init_one fail!!! rc=-5
[ 30.440000] cfg80211: Calling CRDA for country: US
[ 30.610000] cfg80211: Regulatory domain changed to country: US
[ 30.620000] cfg80211: DFS Master region: FCC
[ 30.630000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 30.640000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
[ 30.650000] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 1700 mBm), (N/A)
[ 30.660000] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2300 mBm), (0 s)
[ 30.670000] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
[ 30.680000] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)

не подскажешь как это побороть ? Спасибо...

commented

Мой лог:
[ 24.520000] Realtek WLAN driver - version 1.7 (2015-10-30)
[ 24.530000] Adaptivity function - version 9.3.4
[ 24.540000] Device Name = RTKWiFi0
[ 24.550000] VIF_NUM=9
[ 24.560000] CFG0
[ 26.580000] 98 - 25MHz Clock Source
[ 28.600000] Find Port=0 Device:Vender ID=818b10ec
[ 29.110000] MACHAL_version_init
[ 29.330000] fastpath: Unknown symbol igmp_delete_init_netlink (err 0)
[ 29.380000] fastpath: Unknown symbol igmp_delete_init_netlink (err 0)
[ 39.970000] cfg80211: Calling CRDA for country: US
[ 40.000000] cfg80211: Regulatory domain changed to country: US
[ 40.010000] cfg80211: DFS Master region: FCC
[ 40.020000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 40.030000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
[ 40.040000] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 1700 mBm), (N/A)
[ 40.050000] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2300 mBm), (0 s)
[ 40.060000] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
[ 40.070000] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)

Vender ID=817910ec - RTL8192CE
Vender ID=818b10ec - RTL8192ER
Сначала можно попробовать уменьшить частоту передатчика с 40 до 25 МГц.
Если не сработает, то нужно смотреть в сторону пакета kmod-rtl8192cd. Я посмотрю, есть ли в исходниках поддержка RTL8192CE.

А как можно поменять частоту(гдето в коде) ? У меня на чипе написано 8188er может он схож RTL8192CE. На 4пда су них получилось включить 8188еr на Smart Box Beeline N300 там проц чуть дгугой но вайфай этот, пока никто не ответил что до как...

Я скомпилил с SDK openwrt 2.5 для проверки но когда загружаю прошивку она выдает ошибку:

---RealTek(RTL8196E)at 2014.10.24-17:33+0800 v1.2 16bit
Jump to image start=0x80500000...
OpenWrt kernel loader for Realtek 819X
Copyright (C) 2011 Gabor Juhos juhosg@openwrt.org
Incorrect LZMA stream properties!
System halted!

Может ты сталкивался с этой ошибкой?
Спасибо.

commented

А как можно поменять частоту(гдето в коде) ?

/etc/config/wireless
config wifi-device 'radio0'
option htmode 'HT40' заменить на option htmode 'HT20'

Incorrect LZMA stream properties!

Что-то со сжатием lzma/xz. Может версия не та, или криво скомпилировалось, или образ битый.

Этого фаила небыло создал, но ситуация не изменилось в логе тал и пишет 98 - 40MHz Clock Source
а можно поинтересоваться от куда ты сорсы взял ?

commented

Если файла не было, значит wi-fi модуль не инициализировался. Я завтра гляну в menuconfig, есть ли в списке 8188еr. Раз Smart Box Beeline N300 заработал, то скорее всего должен быть.

а можно поинтересоваться от куда ты сорсы взял ?

В Readme все написано:
https://sourceforge.net/projects/rtl8197xd-v2-5-pkg/

commented

Кстати, а если установить пакет: packages\base\r8188eu-firmware_2014-03-16-f8c22c692bdee57a20b092e647464ff6176df3ed-1_realtek.ipk (или похожее название) и перезагрузить?
Ошибка в логе не исчезнет?

Сорсы брал от сюда : https://github.com/Alexey-Tsarev/openwrt-rtl819x там в менюконфиг есть rtl8196e и вроде как все компилится нормально но прошивка не запускается. интерестно что для Smart Box Beeline N300 что-то даже на подобе LEDE есть с новым Luci. Попробую установить отпишусь...

Пакет установил но не помогло... установил еше modul' 8192CU также без результатно...

commented

https://github.com/Alexey-Tsarev/openwrt-rtl819x

Эти исходники я пробовал использовать. Были странные проблемы с компиляцией пакетов, поэтому я взял другие.

Пакет установил но не помогло... установил еше modul' 8192CU также без результатно...

/etc/config/wireless предварительно удалил? В dmesg что-то поменялось или та же ошибка?
Про Smart Box почитаю, может там что полезное есть.

Интерестно что любые другие исходники выдают одну и туже ошибку при старте:
Даже рабочая прошивка от rtl819xd выдала эту же ошибку:
Incorrect LZMA stream properties!
У меня работает только родной бут может в этом проблема...
Я скомпилил прошивку из твоих исходников, оно при обновлении фидов что-то не нашло что я добавил, можешь глянуть если у тебя с ней вифи работает:
https://drive.google.com/file/d/1Zw0_EYM0OESQ5U8Dn9gipWguV6Q_KMo5/view?usp=sharing

commented

Я скомпилил прошивку из твоих исходников, оно при обновлении фидов что-то не нашло что я добавил, можешь глянуть если у тебя с ней вифи работает:

На странице WiFi во вкладке Wireless Overview пишет, что Wireless is disabled or not associated, однако сканер успешно находит чужие сети, так что беспроводная сеть есть, хоть и глючная.

Я добавил пакеты под пару wifi устройств 8192cu/8188cu и 8187. Хотя, странно, smartbox использует стандартные параметры и у него все работает. Может быть проблема в bootloader?
base.tar.gz

У меня даже страници Wifi нет, сейчас попродую пакеты пставить но вроде когда я прошивку собирал я их вклучил все кроме 8188 странно что я 8192еr убрать нельзя тогда прошивка не собирается ... Я тоже думал про bootloader но кроме родного ничего запустить не получилось , ну у реалтека ни Art ничего такого вроде нет...

Родная рошивка от Totolonk N150RT заработала даже вифи... но перепробывал все пакеты в ОпенВРТ так и не получилось сделать.

Поигрался с make kernel_menuconfig, заработал wifi, у тебя при старте тоже 23мб оперативки занято ?

commented

Отличная новость. Что поменял в конфиге?
С памятью у меня получше ситуация:
Memory
Total Available 13516 kB / 28812 kB (46%)
Free 9152 kB / 28812 kB (31%)
Cached 3324 kB / 28812 kB (11%)
Buffered 1040 kB / 28812 kB (3%)

В kernelconfih 8188 был отключен поменял на (SLOT_0_88E [=y]) и все заработало.
В Luci он мне так же показывает а вот в консоли на команду free zanqto ~23mb после манипуляций с веб интерфеисом память заполняется и выдает ошибку о нехватки памяти.

ты не мог бы еше выполнть команду cat /proc/sys/vm/min_free_kbytes мне интерестно какое значение у тебе в ядре...

commented

4096

Интерестно мне кажется в кернеле ошибка поябляется когда меняю на 88е и он забивает память...
У меня в директории /proc куча wlan0 и мне кажется они забивают оперативку...

ты не мог бы глянуть если у тебя в /proc тоже много wlan.

commented

ls /proc
1 1315 2 3 6 915 cpuinfo eee flash key-users mounts phyRegTest stat uptime wlan0-3 wlan0-9
117 133 206 308 650 972 crypto eth0 fs kmsg mtd qos swaps version wlan0-4
120 1373 273 368 651 StormCtrl custom_Passthru eth0.1 interrupts loadavg net rtl865x sys vmstat wlan0-5
1201 1391 29177 369 7 bus devices eth0.2 iomem meminfo partitions scsi sysrq-trigger wlan0 wlan0-6
122 1411 29178 4 8 cgroups diskstats eth1 ioports misc peth0 self sysvipc wlan0-1 wlan0-7
13 157 29183 5 877 cmdline driver filesystems kcore modules phyPower softirqs tmp.wlan0 wlan0-2 wlan0-8

Добрый день. Хотел узнать, а будут ли работать пакеты с репозитория wrtrtl собранные изначально под RTL8196E на роутере на базе Realtek RTL8197DL (билайновский smartbox-one который от Sercomm)?

Прошил сборку OpenWrt 14.07 под эту модель с 4pda, подключил в конфигах репозиторий с пакетами собранными под реалтек на 185.118.64.164. Вроде всё работает отлично, но подборка пакетов в том репозитории очень небольшая и хотел уточнить, не подойдут ли случайно ваши пакеты из репозитория wrtrtl на мою модель.

Буду благодарен за любую полезную информацию

А что мешает проверить, если они независимыот ядра и архитектура проца таже то должны работать. попробуй установить отдельно *.ipk и увидеш.

commented

Добрый день. Хотел узнать, а будут ли работать пакеты с репозитория wrtrtl собранные изначально под RTL8196E на роутере на базе Realtek RTL8197DL (билайновский smartbox-one который от Sercomm)?

Здравствуйте. Про работоспособность неродных пакетов на вашем устройстве не могу ничего сказать. Нужно проверять экспериментально.
К сожалению, у меня сейчас практически нет свободного времени на доведение до ума прошивки и обновление пакетов до актуальных версий (насколько позволяет ядро 3.10 и openwrt 14.07). Но в будущем я планирую обновить конфиг для rtl8196e и собрать отдельную прошивку на rtl8197F - сейчас много дешевых устройств с 802.11ac на этой платформе.

commented

Прошил сборку OpenWrt 14.07 под эту модель с 4pda, подключил в конфигах репозиторий с пакетами собранными под реалтек на 185.118.64.164. Вроде всё работает отлично, но подборка пакетов в том репозитории очень небольшая и хотел уточнить, не подойдут ли случайно ваши пакеты из репозитория wrtrtl на мою модель.

Кстати, можете попробовать поискать сборки для rtl819xd, например, здесь должно быть достаточно пакетов:
http://openwrt.ferman.pw/barrier_breaker/rtl819/totolink-lite/
https://sourceforge.net/projects/rtl8197xd-v2-5-pkg/files/firmware/

commented

В kernelconfih 8188 был отключен поменял на (SLOT_0_88E [=y]) и все заработало.
В Luci он мне так же показывает а вот в консоли на команду free zanqto ~23mb после манипуляций с веб интерфеисом память заполняется и выдает ошибку о нехватки памяти.

Приветствую. Можешь напомнить, какой пакет установлен у тебя для работы WiFi? 8192cd или 8188eu? Может быть это как-то натолкнет на мысль, откуда взялся жор памяти.
Читаю даташиты на 8188er - он работает через PCI, но в отличии от 8192er - не поддерживает MIMO, только SISO. 8188eu - работает через шину USB и количество пинов у него другое.
8192cu/8188cu и 818x - тоже USB.

commented

@Alter0ne @RomSand
I've been making some attempts to get a build running for a Sengled Element Hub. I see @RomSand said he had it working here - https://community.home-assistant.io/t/sengled-led-bulbs-and-hub-with-ha/37805/23
But I keep getting stuck with a kernel panic (see bootlog below) with the v0.3 release and my self-compiled firmware. Any help would be appreciated.

...
[    1.210000] SPI INIT
[    1.220000]  ------------------------- Force into Single IO Mode ------------------------ 
[    1.230000] |No chipID  Sft chipSize blkSize secSize pageSize sdCk opCk      chipName    |
[    1.240000] | 0 c22017h  0h  800000h  10000h   1000h     100h   50    0   MX6405D/05E/45E|
[    1.250000]  ---------------------------------------------------------------------------- 
[    1.260000] SPI flash(MX6405D/05E/45E) was found at CS0, size 0x800000
[    1.270000] Creating 3 MTD partitions on "flash_bank_1":
[    1.280000] 0x000000000000-0x000000010000 : "boot"
[    1.300000] 0x000000010000-0x000000800000 : "linux"
[    1.310000] 0x000000109000-0x000000800000 : "rootfs"
[    1.320000] mtd: device 2 (rootfs) set to be root filesystem
[    1.330000] mtd: partition "rootfs_data" created automatically, ofs=0x32f000, len=0x4d1000
[    1.340000] 0x00000032f000-0x000000800000 : "rootfs_data"
[    1.350000] 
[    1.350000] Probing RTL819X NIC-kenel stack size order[1]...
[    2.030000] eth0 added. vid=9 Member port 0x10f...
[    2.050000] eth1 added. vid=8 Member port 0x10...
[    2.070000] [peth0] added, mapping to [eth1]...
[    2.090000] TCP: westwood registered
[    2.100000] NET: Registered protocol family 17
[    2.110000] 8021q: 802.1Q VLAN Support v1.8
[    2.130000] SQUASHFS error: Failed to initialise xz decompressor
[    2.140000] VFS: Cannot open root device "(null)" or unknown-block(31,2): error -5
[    2.150000] Please append a correct "root=" boot option; here are the available partitions:
[    2.160000] 1f00              64 mtdblock0  (driver?)
[    2.180000] 1f01            8128 mtdblock1  (driver?)
[    2.190000] 1f02            7132 mtdblock2  (driver?)
[    2.200000] 1f03            4932 mtdblock3  (driver?)
[    2.220000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
[    2.220000] System  halted.

I also, flashed the above image (https://drive.google.com/file/d/1Zw0_EYM0OESQ5U8Dn9gipWguV6Q_KMo5/view?usp=sharing from @RomSand) and it mounted the root device and started fine. But I would like to compile it myself with changes.

Thanks

Check if bootloader is correct, and double check the cpu in config it should be 8196e

commented

@chaolue, is it the same on the v0.2 release?

[ 2.130000] SQUASHFS error: Failed to initialise xz decompressor

@xromansx, can you check the latest version, because I no longer have the RTL8196e device?

To speak trully I also killed mine (shorted when tried to debug ZigBee)

commented

Thanks @xromansx

I didn't think the bootloader would matter here. I'm flashing the firmware via TFTP.

@Alter0ne the v0.2 release boots up fine. That's given me something to work with, thanks.

commented

@chaolue, my bad. Can you to compile and successful execute from 16cf429 commit? I updated mtd-utils there. It worked for me then, but now I haven't the opportunity anymore to test following commits again.
Please, let me know if you find a broken commit.

commented

Thanks @Alter0ne, I made a build from 16cf429 without issue - used the defconfig_rtl8196e and compiled without any modifications (except turning off kmod-net-hermes as it wasn't building) - but on boot had the same error: Failed to initialise xz decompressor.

Any other ideas?

I had a quick attempt to go back to the commit before the one above, but don't seem to be able to resolve building the older mtd-utils version (1.4.5) on Mint

bootloader metters I couldn't boot any image with factory bootloader.

commented

@chaolue, I made a few changes in the tools: new xz, squashfs. Please test bin. Is there the bug left?
openwrt-realtek-rtl8196e-AP-fw.bin.tar.gz

commented

Sorry @Alter0ne, no luck with that - still the same error.

commented
---RealTek(RTL8196E)at 2015.01.06-18:13-0800 v1.6 [16bit](380MHz)
bootbank is 1, bankmark FFFFFFF0
check_image_header  return_addr:05010000 bank_offset:00000000
Jump to image start=0x80500000...
return_addr = 05010000 ,boot bank=1, bank_mark=0xfffffff0...


OpenWrt kernel loader for Realtek 819X
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... done!
Starting kernel at 80000000...

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.10.49 (alter0ne@421) (gcc version 4.6.4 (Realtek RSDK-4.6.4 Build 424) ) #1 Fri Aug 14 15:41:05 MSK 2020
[    0.000000] CPU revision is: 0000cd01
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] icache: 16kB/16B, dcache: 8kB/16B, scache: 0kB/0B
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=AP console=ttyS0,38400 linuxpart=0x10000
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 28616k/32768k available (2991k kernel code, 4152k reserved, 532k data, 188k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:128
[    0.000000] console [ttyS0] enabled
[    0.220000] Calibrating delay loop... 378.47 BogoMIPS (lpj=1892352)
[    0.280000] pid_max: default: 32768 minimum: 301
[    0.290000] Mount-cache hash table entries: 512
[    0.310000] Initializing cgroup subsys devices
[    0.320000] Initializing cgroup subsys net_cls
[    0.330000] Initializing cgroup subsys blkio
[    0.340000] Initializing cgroup subsys net_prio
[    0.380000] reg e0=0
[    0.420000] reg e1=0
[    0.460000] reg e2=0
[    0.500000] reg e3=0
[    0.540000] reg e4=0
[    0.570000] reg e5=0
[    0.610000] reg e6=0
[    0.650000] reg e7=0
[    0.690000] reg f0=0
[    0.730000] reg f1=0
[    0.760000] reg f2=0
[    0.800000] reg f3=0
[    0.840000] reg f4=0
[    0.880000] reg f5=0
[    0.920000] reg f6=0
[    0.930000] NET: Registered protocol family 16
[    1.080000] bio: create slab <bio-0> at 0
[    1.100000] SCSI subsystem initialized
[    1.110000] usbcore: registered new interface driver usbfs
[    1.120000] usbcore: registered new interface driver hub
[    1.130000] usbcore: registered new device driver usb
[    1.160000] NET: Registered protocol family 2
[    1.180000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    1.190000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    1.200000] TCP: Hash tables configured (established 512 bind 512)
[    1.210000] TCP: reno registered
[    1.220000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.230000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.240000] NET: Registered protocol family 1
[    1.310000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.320000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.340000] msgmni has been set to 55
[    1.350000] io scheduler noop registered
[    1.360000] io scheduler deadline registered (default)
[    1.380000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    1.390000] serial8250: ttyS0 at MMIO 0x18002000 (irq = 9) is a 16550A
[    1.430000] SPI INIT
[    1.430000]  ------------------------- Force into Single IO Mode ------------------------ 
[    1.440000] |No chipID  Sft chipSize blkSize secSize pageSize sdCk opCk      chipName    |
[    1.450000] | 0 c22017h  0h  800000h  10000h   1000h     100h   50    0   MX6405D/05E/45E|
[    1.460000]  ---------------------------------------------------------------------------- 
[    1.470000] SPI flash(MX6405D/05E/45E) was found at CS0, size 0x800000
[    1.480000] Creating 3 MTD partitions on "flash_bank_1":
[    1.490000] 0x000000000000-0x000000010000 : "boot"
[    1.510000] 0x000000010000-0x000000800000 : "linux"
[    1.520000] 0x00000012d000-0x000000800000 : "rootfs"
[    1.530000] mtd: device 2 (rootfs) set to be root filesystem
[    1.540000] mtd: partition "rootfs_data" created automatically, ofs=0x3f1000, len=0x40f000
[    1.550000] 0x0000003f1000-0x000000800000 : "rootfs_data"
[    1.560000] 
[    1.560000] Probing RTL819X NIC-kenel stack size order[1]...
[    2.240000] eth0 added. vid=9 Member port 0x10f...
[    2.260000] eth1 added. vid=8 Member port 0x10...
[    2.280000] [peth0] added, mapping to [eth1]...
[    2.290000] usbcore: registered new interface driver usb-storage
[    2.300000] -------8196D OTG init 
[    2.530000] dwc_otg: version 2.60a 22-NOV-2006
[    2.540000] DWC_otg: OTG Device not found ! Bad value for SNPSID: 0x00000000
[    2.550000] TCP: westwood registered
[    2.560000] NET: Registered protocol family 17
[    2.570000] Bridge firewalling registered
[    2.580000] 8021q: 802.1Q VLAN Support v1.8
[    2.600000] SQUASHFS error: Failed to initialise xz decompressor
[    2.610000] VFS: Cannot open root device "(null)" or unknown-block(31,2): error -5
[    2.620000] Please append a correct "root=" boot option; here are the available partitions:
[    2.630000] 1f00              64 mtdblock0  (driver?)
[    2.650000] 1f01            8128 mtdblock1  (driver?)
[    2.660000] 1f02            6988 mtdblock2  (driver?)
[    2.670000] 1f03            4156 mtdblock3  (driver?)
[    2.690000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
[    2.690000] System halted.

try bootloader from Totolink N300

commented

Thanks @xromansx and @Alter0ne
I bricked an identical device trying the "boot96E_32M" bootloader from https://openwrt.org/inbox/toh/totolink_n300rt - it now just starts with 'Booting...' and nothing more. But I do have quite a few of these Sengled Hubs to play with.

And as I said, I'm able to get some firmwares working: v0.2 working and the one from @RomSand above (and one other firmware I found in a forum post from 2017).

boot96E_32M isn't original bootloader from totolink_n300rt, it's a custom one but I was speaking about the original one . Flash https://drive.google.com/file/d/1Zw0_EYM0OESQ5U8Dn9gipWguV6Q_KMo5/view and after flash other device through tftp.

commented

Same result with boot_factory.bin @xromansx - I'm left with a device with "Booting..." and nothing else (no tftp).
Or are you explaining a way to recover a device that isn't booting?

I can open up another device to play with.

commented

@chaolue, I removed buggy release and wrote the warning in the Readme. Please use 937b01c commit and previous Linux Mint LTS.

commented

Now I can't find solution for xz decompressor bug. It's need to fulfil latest mtd_utils or make possible compilation with old glibc 2.28.

Hi, device can be recovered with any 3$ spi flasher from ebay or even arduino if you have one. I'll see if I can find the device. Where are you located ?

commented

@xromansx, the router is working. But I gave it to distant relatives who live in other town. Now I has other device. Debugging without rtl8196e device is very complicated.

Sorry I was asking @chaolue, as I understood he has plenty of devices but I need also working one so I can see what's goin on.

commented

@xromansx I live in New Zealand so I guess I'm too far away to send. A local store has the Sengled Hubs on clearance .

I've got a SOP8 clamp on the way to flash chips.

Recovered some of my old files can tell that openwrt will only boot on this bootloader :
---RealTek(RTL8196E)at 2014.10.24-17:33+0800 v1.2 16bit
I took it from another device same version I found in totolink ex200 (I needed to flash bootloader with SPI programmer after I could boot OpenWRT) without alwais got an error.

have this error during compilation:
package/Makefile:170: recipe for target '/home/x/rtl8196e/staging_dir/target-mips-rlx4181-linux/stamp/.package_compile' failed
make[1]: *** [/home/x/rtl8196e/staging_dir/target-mips-rlx4181-linux/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/x/rtl8196e'

doe someone know how to extract bootloader from dump ?

commented

@xromansx I finding it a little hard to believe that this is a bootloader issue. Because with the current bootloader on my devices I have several firmware bins running fine, but I am unable to build one that boots from this repo. I was even able to build ggbruno's one (https://github.com/ggbruno/openwrt) based on OpenWRT master and it is booting fine. But it isn't much use without networking currently.

If it is a bootloader issue can you provide me with a link to a bootloader to try. I can program the flash directly now with SPI programmer. The current bootloader is:
---RealTek(RTL8196E)at 2015.01.06-18:13-0800 v1.6 [16bit](380MHz)

I tried this repo and also openwrt rtk sources and non of them worked with stock bootloader can you please provide the bin that works not from "https://github.com/ggbruno/openwrt" bootloader that I use if from ex200 you can find it's dump here :
https://forum.openwrt.org/t/fun-has-anyone-seen-where-ram-chip-locate/23069

commented

@xromansx here are the working firmwares with current bootloader:
v0.2 - https://github.com/Alter0ne/rtl8196e/releases/download/v0.2-prealpha/openwrt-realtek-rtl8196e-AP-fw.bin
RomSands above - https://drive.google.com/file/d/1Zw0_EYM0OESQ5U8Dn9gipWguV6Q_KMo5/view?usp=sharing
AirShark bin (from a Russian forum I can't find link) AirShark.bin.zip

ggbruno only works with ramdisk, not squashfs

commented

Tried the bootloader provided and same results with v0.3 version:

---RealTek(RTL8196E)at 2014.10.24-17:33+0800 v1.2 [16bit](380MHz)
Jump to image start=0x80500000...


OpenWrt kernel loader for Realtek 819X
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... done!
Starting kernel at 80000000...

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.10.49 (alter0ne@alter0ne-pc) (gcc version 4.6.4 (Realtek RSDK-4.6.4 Build 424) ) #2 Mon Jul 20 19:06:52 MSK 2020
[    0.000000] CPU revision is: 0000cd01
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] icache: 16kB/16B, dcache: 8kB/16B, scache: 0kB/0B
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=AP console=ttyS0,38400 linuxpart=0x10000
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 28616k/32768k available (2991k kernel code, 4152k reserved, 532k data, 188k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:128
[    0.000000] console [ttyS0] enabled
[    0.230000] Calibrating delay loop... 378.47 BogoMIPS (lpj=1892352)
[    0.290000] pid_max: default: 32768 minimum: 301
[    0.300000] Mount-cache hash table entries: 512
[    0.320000] Initializing cgroup subsys devices
[    0.330000] Initializing cgroup subsys net_cls
[    0.340000] Initializing cgroup subsys blkio
[    0.350000] Initializing cgroup subsys net_prio
[    0.390000] reg e0=0
[    0.430000] reg e1=0
[    0.470000] reg e2=0
[    0.510000] reg e3=0
[    0.550000] reg e4=0
[    0.580000] reg e5=0
[    0.620000] reg e6=0
[    0.660000] reg e7=0
[    0.700000] reg f0=0
[    0.740000] reg f1=0
[    0.770000] reg f2=0
[    0.810000] reg f3=0
[    0.850000] reg f4=0
[    0.890000] reg f5=0
[    0.930000] reg f6=0
[    0.940000] NET: Registered protocol family 16
[    1.090000] bio: create slab <bio-0> at 0
[    1.110000] SCSI subsystem initialized
[    1.130000] usbcore: registered new interface driver usbfs
[    1.150000] usbcore: registered new interface driver hub
[    1.160000] usbcore: registered new device driver usb
[    1.190000] NET: Registered protocol family 2
[    1.200000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    1.210000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    1.220000] TCP: Hash tables configured (established 512 bind 512)
[    1.230000] TCP: reno registered
[    1.240000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.250000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.260000] NET: Registered protocol family 1
[    1.330000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.340000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.350000] msgmni has been set to 55
[    1.360000] io scheduler noop registered
[    1.370000] io scheduler deadline registered (default)
[    1.390000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    1.400000] serial8250: ttyS0 at MMIO 0x18002000 (irq = 9) is a 16550A
[    1.440000] SPI INIT
[    1.450000]  ------------------------- Force into Single IO Mode ------------------------ 
[    1.460000] |No chipID  Sft chipSize blkSize secSize pageSize sdCk opCk      chipName    |
[    1.470000] | 0 c84017h  0h  800000h  10000h   1000h     100h   80    0           GD25Q64|
[    1.480000]  ---------------------------------------------------------------------------- 
[    1.490000] SPI flash(GD25Q64) was found at CS0, size 0x800000
[    1.510000] Creating 3 MTD partitions on "flash_bank_1":
[    1.520000] 0x000000000000-0x000000010000 : "boot"
[    1.540000] 0x000000010000-0x000000800000 : "linux"
[    1.560000] 0x00000012d000-0x000000800000 : "rootfs"
[    1.570000] mtd: device 2 (rootfs) set to be root filesystem
[    1.580000] mtd: partition "rootfs_data" created automatically, ofs=0x3f1000, len=0x40f000
[    1.590000] 0x0000003f1000-0x000000800000 : "rootfs_data"
[    1.600000] 
[    1.600000] Probing RTL819X NIC-kenel stack size order[1]...
[    2.280000] eth0 added. vid=9 Member port 0x10f...
[    2.300000] eth1 added. vid=8 Member port 0x10...
[    2.320000] [peth0] added, mapping to [eth1]...
[    2.330000] usbcore: registered new interface driver usb-storage
[    2.340000] -------8196D OTG init 
[    2.570000] dwc_otg: version 2.60a 22-NOV-2006
[    2.580000] DWC_otg: OTG Device not found ! Bad value for SNPSID: 0x00000000
[    2.590000] TCP: westwood registered
[    2.600000] NET: Registered protocol family 17
[    2.610000] Bridge firewalling registered
[    2.620000] 8021q: 802.1Q VLAN Support v1.8
[    2.650000] SQUASHFS error: Failed to initialise xz decompressor
[    2.660000] VFS: Cannot open root device "(null)" or unknown-block(31,2): error -5
[    2.670000] Please append a correct "root=" boot option; here are the available partitions:
[    2.680000] 1f00              64 mtdblock0  (driver?)
[    2.700000] 1f01            8128 mtdblock1  (driver?)
[    2.710000] 1f02            6988 mtdblock2  (driver?)
[    2.720000] 1f03            4156 mtdblock3  (driver?)
[    2.740000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
[    2.740000] System halted.

So, doesn't look to be bootloader related.

Interesting that non of them worked for me with stock bootloader. Try this one:
https://drive.google.com/file/d/1ckfOzJHTjE5RbHPQcNRKuLqTXYN_wT18/view?usp=sharing

commented

@xromansx yes that boots - https://drive.google.com/file/d/1ckfOzJHTjE5RbHPQcNRKuLqTXYN_wT18/view?usp=sharing.

Do you have any instructions that would help me build?

Use realtek OpenWrt SDK I think it's 2.5 , if you'll have some time try it on your stock bootloader and see if it boots.

commented

Thanks @xromansx, building direct from Realtek 2.5 SDK creates a bootable firmware on original and EX200 bootloader on my devices.
Grateful for the help you've given me.

No problem, still suprized that you could boot on original bootloader do you know any way to back it up ?

@chaolue Did you getting it working with openWRT ??

I like trying tuya zigbee gateway with ethernet that is also having the RTL8196E.
I dont need WiFI only the ethernet and tunneling one of the serial port to ZHA.

Thanks in advance !!

Hi, if you have tuya can you do SPI backup.

I dont knowing the schematics but the PCB have SWO for the EFR32 module (zigbee) with test points that is good marked. Its also have one row for connections but without labels.
Without looking so close I think the flash for the RTL is U3 but i cant read the model number on it on the photos.

Info FCC-ID

I have seen some other zigbee gw with RTL8196E is possible using http for configure telnet and getting root access but is not working in this implantation :-(

Edit: One more photo https://user-images.githubusercontent.com/28428427/100342416-3eee9380-2fde-11eb-9a99-ed7f608693a2.jpg

Yes it seems to be U3 can you do backup of it ? I can check if it can boot on mine. do you hace SPI programmer ?

commented

@MattWestb yes I was able to get mine booting up OpenWRT from the Realtek SDK2.5, but not from this repo.
Though, I didn't have any success with communicating with the Zigbee chip via serial, so gave up.

I was looking for tuya firmware was thinking maybe to see what commands are used for zigbee to adapt it, but couldn't find one. So if somone has ot and can make SPI dump would be good. Thanks.

Hello, have you made it work on the CF-WR302S repeater?