Support for Easybox 904 LTE

@QAuge It was just my working branch. Patch itself is for xDSL version. Naming wrong, but right content. Hope :slight_smile: In any case you can drop my changes to dts. Only tx-delay = <3>; and fixed-link sections are important.

1 Like

So i have tryed the following combination:

  • the newest (from 11.07.2019) openwrt + the pull/2060/head:pr001-eb904x (and pull/2061/head:pr002-eb904x_uboot + pull/1885/head:pullreq but the last both are not important)
  • i do not use memdev
  • the "Add fixes for 4.19 integration (dirty)." commit https://github.com/Quallenauge/ralink_inic/commit/6523ed0bc093530574e93becf5ae22c9e9a819ce post 153
  • the pcdu.patch from post 155 fix the dts issus (inside the patch it called VGV952CJW33-E-IR.dtsi not VGV952CJW33-E-IR.dts but i do not split into VPE SMP)
  • using the "device_type = "memory";" code

After starting the WLAN the router stops working. I only have response on the console. but it does not reboot.

root@OpenWrt:~# ./rt3883 ce[Jboot
devmem: applet not found
devmem: applet not found
devmem: applet not found
devmem: applet not found
Insmod with MAC1=4c:09:d4:15:10:54 and MAC2=4c:09:d4:15:10:56
[ 1697.197920] Warnning!! syncmiimac is foreced to 0 in dual concurrent mode.
[ 1697.203498] RT3883iNIC: 802.11n WLAN MII driver v2.4.0.6 (Feb. 09, 2011)
[ 1697.210303] eth0.3: Master at 0x0, 00:11:22:33:44:55
[ 1697.215202] Use default profile path.
[ 1697.218777] -----> mii_hardware_reset
[ 1697.232616] -----> mii_hardware_reset
[ 1697.234899] Update MAC(0)=4c:09:d4:15:10:54
[ 1697.239106] ============= Init Thread ===================
[ 1697.244961] RacfgTaskThread pid = 5528
[ 1697.248434] RacfgBacklogThread pid = 5529
[ 1697.254377] wl000: Ralink iNIC at 0x0, 4c:09:d4:15:10:54
[ 1697.262899] Ignored command_type: 1, command_id: 1 
[ 1697.274894] Update MAC(0)=4c:09:d4:15:10:56
[ 1697.277730] ============= Init Thread ===================
[ 1697.284199] RacfgTaskThread pid = 5534
[ 1697.287395] RacfgBacklogThread pid = 5535
[ 1697.293114] wl010: Ralink iNIC at 0x0, 4c:09:d4:15:10:56
[ 1697.308296] iNIC Open wl000
[ 1697.309837] -----> mii_hardware_reset
[ 1698.336792] -----> mii_hardware_reset
[ 1698.339023] Op mode = 1
[ 1698.341528] ConcurrentObj.CardCount=0
[ 1698.345152] Read profile[0]
[ 1698.350888] BssidNum=2
[ 1698.353478] Read profile[1]
[ 1698.356255] BssidNum=2
[ 1698.358811] rlk_inic_mbss_init (pAd->RaCfgObj.BssidNum=2)
[ 1698.362838] rlk_inic_mbss_init --->
[ 1698.366347] Register MBSSID IF (wl001)
[ 1698.371952] register_netdev done
[ 1698.373876] rlk_inic_mbss_init <---
[ 1698.377368] ConcurrentObj.CardCount=0 init_flag=0
[ 1698.382012] Wait for boot done...
[ 1698.385382] Call RaCfgWaitSyncRsp
[ 1698.388955] RACFG_CMD_BOOT_NOTIFY
[ 1698.391963] Firmware path iNIC/RT3883/iNIC_ap.bin
[ 1698.396698] Profile[0] path iNIC/RT3883/iNIC_ap.dat, read path iNIC/RT3883/iNIC_ap.dat
[ 1698.404606] EEPROM[0] path iNIC/RT3883/iNIC_e2p.bin, read path iNIC/RT3883/iNIC_e2p.bin
[ 1698.412610] Profile[1] path iNIC/RT3883/iNIC_ap1.dat, read path iNIC/RT3883/iNIC_ap1.dat
[ 1698.420705] EEPROM[1] path iNIC/RT3883/iNIC_e2p1.bin, read path iNIC/RT3883/iNIC_e2p1.bin
[ 1698.428822] Request file: iNIC/RT3883/iNIC_ap.bin
[ 1698.678134] Request file: iNIC/RT3883/iNIC_ap.dat
[ 1698.681872] Request file: iNIC/RT3883/iNIC_e2p.bin
[ 1698.687562] Request file: iNIC/RT3883/iNIC_ap1.dat
[ 1698.691940] Request file: iNIC/RT3883/iNIC_e2p1.bin
[ 1698.697685] Upload Profile 1024 bytes from file, 0 from extra...
[ 1699.367501] RACFG_CMD_BOOT_NOTIFY
[ 1699.369490] Firmware path iNIC/RT3883/iNIC_ap.bin
[ 1699.374143] Profile[0] path iNIC/RT3883/iNIC_ap.dat, read path iNIC/RT3883/iNIC_ap.dat
[ 1699.382070] EEPROM[0] path iNIC/RT3883/iNIC_e2p.bin, read path iNIC/RT3883/iNIC_e2p.bin
[ 1699.390080] Profile[1] path iNIC/RT3883/iNIC_ap1.dat, read path iNIC/RT3883/iNIC_ap1.dat
[ 1699.398167] EEPROM[1] path iNIC/RT3883/iNIC_e2p1.bin, read path iNIC/RT3883/iNIC_e2p1.bin
[ 1699.406408] Request file: iNIC/RT3883/iNIC_ap.bin
[ 1699.420345] Request file: iNIC/RT3883/iNIC_ap.dat
[ 1699.424034] Request file: iNIC/RT3883/iNIC_e2p.bin
[ 1699.428935] Request file: iNIC/RT3883/iNIC_ap1.dat
[ 1699.433492] Request file: iNIC/RT3883/iNIC_e2p1.bin
[ 1699.438520] Upload Profile 1024 bytes from file, 0 from extra...
[ 1700.368234] RACFG_CMD_BOOT_INITCFG(0)
[ 1700.370638] Upload Profile 1024 bytes from file, 0 from extra...



[ 1857.305696] rcu: INFO: rcu_sched self-detected stall on CPU
[ 1857.309854] rcu: 	0-....: (39463 ticks this GP) idle=9aa/0/0x3 softirq=32520/32521 fqs=5046 
[ 1857.318266] rcu: 	 (t=15000 jiffies g=37025 q=10)
[ 1857.322973] NMI backtrace for cpu 0
[ 1857.326460] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.57 #0
[ 1857.332455] Stack : 00000000 00000000 806e0000 8007ea38 80700000 8069dbb4 00000000 00000000
[ 1857.340808]         8069d3c8 87c0da24 806dee8c 806dea07 80655dc8 00000001 87c0d9c8 74ab2124
[ 1857.349164]         00000000 00000000 80880000 00008288 80848968 00000000 00000007 00000000
[ 1857.357520]         000001cd b9800000 000001cc 00000000 00000000 00000000 80700000 00000000
[ 1857.365876]         806e4940 806dbeb4 806e0000 00000000 00000003 00000000 00000000 80840000
[ 1857.374232]         ...
[ 1857.376669] Call Trace:
[ 1857.379126] [<800113b4>] show_stack+0x58/0x100
[ 1857.383576] [<80532634>] dump_stack+0x94/0xd0
[ 1857.387915] [<80539b64>] nmi_cpu_backtrace+0xe4/0x108
[ 1857.392962] [<80539c48>] nmi_trigger_cpumask_backtrace+0xc0/0x158
[ 1857.399063] [<80092cf8>] rcu_dump_cpu_stacks+0xbc/0x128
[ 1857.404278] [<80092110>] rcu_check_callbacks+0x43c/0x840
[ 1857.409604] [<80097cc0>] update_process_times+0x34/0x74
[ 1857.414810] [<800a9694>] tick_sched_timer+0x224/0x2a4
[ 1857.419861] [<800989c4>] __hrtimer_run_queues+0xf0/0x1d8
[ 1857.425171] [<800992d0>] hrtimer_interrupt+0x188/0x370
[ 1857.430307] [<800154ec>] c0_compare_interrupt+0xa8/0xc0
[ 1857.435546] [<80080604>] __handle_irq_event_percpu+0x78/0x184
[ 1857.441272] [<80080730>] handle_irq_event_percpu+0x20/0x64
[ 1857.446759] [<80085570>] handle_percpu_irq+0x88/0xb8
[ 1857.451716] [<8007fa50>] generic_handle_irq+0x40/0x58
[ 1857.456771] [<8054fbcc>] do_IRQ+0x1c/0x2c
[ 1857.460771] [<802abed0>] plat_irq_dispatch+0xfc/0x138
[ 1857.465827] [<8000b6e8>] except_vec_vi_end+0xb8/0xc4
[ 1857.470788] [<80097084>] try_to_del_timer_sync+0x50/0x68
[ 1857.476087] [<800970e0>] del_timer_sync+0x44/0x60
[ 1857.480811] [<86f64170>] RaCfgWriteFile+0x198/0x8b4 [rt3883_iNIC]


[ 2037.313104] rcu: INFO: rcu_sched self-detected stall on CPU
[ 2037.317267] rcu: 	0-....: (84422 ticks this GP) idle=9aa/0/0x3 softirq=32520/32521 fqs=21303 
[ 2037.325768] rcu: 	 (t=60003 jiffies g=37025 q=29)
[ 2037.330475] NMI backtrace for cpu 0
[ 2037.333962] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.57 #0
[ 2037.339958] Stack : 00000000 00000000 806e0000 8007ea38 80700000 8069dbb4 00000000 00000000
[ 2037.348311]         8069d3c8 87c0da24 806dee8c 806dea07 80655dc8 00000001 87c0d9c8 74ab2124
[ 2037.356667]         00000000 00000000 80880000 00008b18 80848968 00000000 00000007 00000000
[ 2037.365022]         000001ee ff000000 000001ed 00000000 00000000 00000000 80700000 00000000
[ 2037.373378]         806e4940 806dbeb4 806e0000 00000000 00000003 00000000 00000000 80840000
[ 2037.381734]         ...
[ 2037.384172] Call Trace:
[ 2037.386628] [<800113b4>] show_stack+0x58/0x100
[ 2037.391078] [<80532634>] dump_stack+0x94/0xd0
[ 2037.395417] [<80539b64>] nmi_cpu_backtrace+0xe4/0x108
[ 2037.400484] [<80539c48>] nmi_trigger_cpumask_backtrace+0xc0/0x158
[ 2037.406573] [<80092cf8>] rcu_dump_cpu_stacks+0xbc/0x128
[ 2037.411781] [<80092110>] rcu_check_callbacks+0x43c/0x840
[ 2037.417110] [<80097cc0>] update_process_times+0x34/0x74
[ 2037.422313] [<800a9694>] tick_sched_timer+0x224/0x2a4
[ 2037.427364] [<800989c4>] __hrtimer_run_queues+0xf0/0x1d8
[ 2037.432673] [<800992d0>] hrtimer_interrupt+0x188/0x370
[ 2037.437810] [<800154ec>] c0_compare_interrupt+0xa8/0xc0
[ 2037.443048] [<80080604>] __handle_irq_event_percpu+0x78/0x184
[ 2037.448774] [<80080730>] handle_irq_event_percpu+0x20/0x64
[ 2037.454262] [<80085570>] handle_percpu_irq+0x88/0xb8
[ 2037.459218] [<8007fa50>] generic_handle_irq+0x40/0x58
[ 2037.464273] [<8054fbcc>] do_IRQ+0x1c/0x2c
[ 2037.468274] [<802abed0>] plat_irq_dispatch+0xfc/0x138
[ 2037.473330] [<8000b6e8>] except_vec_vi_end+0xb8/0xc4
[ 2037.478288] [<800970e0>] del_timer_sync+0x44/0x60



[ 2217.321475] rcu: INFO: rcu_sched self-detected stall on CPU
[ 2217.325632] rcu: 	0-....: (129384 ticks this GP) idle=9aa/0/0x3 softirq=32520/32521 fqs=42587 
[ 2217.334228] rcu: 	 (t=105006 jiffies g=37025 q=47)
[ 2217.339022] NMI backtrace for cpu 0
[ 2217.342509] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.57 #0
[ 2217.348504] Stack : 00000000 00000000 806e0000 8007ea38 80700000 8069dbb4 00000000 00000000
[ 2217.356858]         8069d3c8 87c0da24 806dee8c 806dea07 80655dc8 00000001 87c0d9c8 74ab2124
[ 2217.365213]         00000000 00000000 80880000 00009320 80848968 00000000 00000007 00000000
[ 2217.373569]         0000020d 15800000 0000020c 00000000 00000000 00000000 80700000 00000000
[ 2217.381925]         806e4940 806dbeb4 806e0000 00000000 00000003 00000000 00000000 80840000
[ 2217.390281]         ...
[ 2217.392718] Call Trace:
[ 2217.395175] [<800113b4>] show_stack+0x58/0x100
[ 2217.399623] [<80532634>] dump_stack+0x94/0xd0
[ 2217.403964] [<80539b64>] nmi_cpu_backtrace+0xe4/0x108
[ 2217.409012] [<80539c48>] nmi_trigger_cpumask_backtrace+0xc0/0x158
[ 2217.415112] [<80092cf8>] rcu_dump_cpu_stacks+0xbc/0x128
[ 2217.420328] [<80092110>] rcu_check_callbacks+0x43c/0x840
[ 2217.425654] [<80097cc0>] update_process_times+0x34/0x74
[ 2217.430875] [<800a9694>] tick_sched_timer+0x224/0x2a4
[ 2217.435912] [<800989c4>] __hrtimer_run_queues+0xf0/0x1d8
[ 2217.441220] [<800992d0>] hrtimer_interrupt+0x188/0x370
[ 2217.446357] [<800154ec>] c0_compare_interrupt+0xa8/0xc0
[ 2217.451593] [<80080604>] __handle_irq_event_percpu+0x78/0x184
[ 2217.457321] [<80080730>] handle_irq_event_percpu+0x20/0x64
[ 2217.462807] [<80085570>] handle_percpu_irq+0x88/0xb8
[ 2217.467765] [<8007fa50>] generic_handle_irq+0x40/0x58
[ 2217.472821] [<8054fbcc>] do_IRQ+0x1c/0x2c
[ 2217.476820] [<802abed0>] plat_irq_dispatch+0xfc/0x138
[ 2217.481875] [<8000b6e8>] except_vec_vi_end+0xb8/0xc4
[ 2217.486836] [<80097084>] try_to_del_timer_sync+0x50/0x68
[ 2217.492136] [<800970e0>] del_timer_sync+0x44/0x60
[ 2217.496860] [<86f64170>] RaCfgWriteFile+0x198/0x8b4 [rt3883_iNIC]
[ 2397.330032] rcu: INFO: rcu_sched self-detected stall on CPU
[ 2397.334189] rcu: 	0-....: (174343 ticks this GP) idle=9aa/0/0x3 softirq=32520/32521 fqs=59019 
[ 2397.342775] rcu: 	 (t=150009 jiffies g=37025 q=74)
[ 2397.347568] NMI backtrace for cpu 0
[ 2397.351056] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.57 #0
[ 2397.357051] Stack : 00000000 00000000 806e0000 8007ea38 80700000 8069dbb4 00000000 00000000
[ 2397.365404]         8069d3c8 87c0da24 806dee8c 806dea07 80655dc8 00000001 87c0d9c8 74ab2124
[ 2397.373760]         00000000 00000000 80880000 00009bb0 80848968 00000000 00000007 00000000
[ 2397.382116]         0000022e 64000000 0000022d 00000000 00000000 00000000 80700000 00000000
[ 2397.390472]         806e4940 806dbeb4 806e0000 00000000 00000003 00000000 00000000 80840000
[ 2397.398828]         ...
[ 2397.401265] Call Trace:
[ 2397.403721] [<800113b4>] show_stack+0x58/0x100
[ 2397.408171] [<80532634>] dump_stack+0x94/0xd0
[ 2397.412510] [<80539b64>] nmi_cpu_backtrace+0xe4/0x108
[ 2397.417559] [<80539c48>] nmi_trigger_cpumask_backtrace+0xc0/0x158
[ 2397.423658] [<80092cf8>] rcu_dump_cpu_stacks+0xbc/0x128
[ 2397.428874] [<80092110>] rcu_check_callbacks+0x43c/0x840
[ 2397.434200] [<80097cc0>] update_process_times+0x34/0x74
[ 2397.439406] [<800a9694>] tick_sched_timer+0x224/0x2a4
[ 2397.444458] [<800989c4>] __hrtimer_run_queues+0xf0/0x1d8
[ 2397.449767] [<800992d0>] hrtimer_interrupt+0x188/0x370
[ 2397.454903] [<800154ec>] c0_compare_interrupt+0xa8/0xc0
[ 2397.460142] [<80080604>] __handle_irq_event_percpu+0x78/0x184
[ 2397.465868] [<80080730>] handle_irq_event_percpu+0x20/0x64
[ 2397.471355] [<80085570>] handle_percpu_irq+0x88/0xb8
[ 2397.476312] [<8007fa50>] generic_handle_irq+0x40/0x58
[ 2397.481368] [<8054fbcc>] do_IRQ+0x1c/0x2c
[ 2397.485367] [<802abed0>] plat_irq_dispatch+0xfc/0x138
[ 2397.490423] [<8000b6e8>] except_vec_vi_end+0xb8/0xc4
[ 2397.495382] [<800970e0>] del_timer_sync+0x44/0x60
^[[A^[[A^[[A^C[ 2431.422880] timeout(40 secs): cmd=0000 no response
[ 2431.426304] ERROR! can't get target's MAC address, boot fail.

root@OpenWrt:~# 

Wan are working with:

...
config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '4 6t'

config device 'wan_dev'
	option name 'eth1'
	option macaddr '4c:09:d4:46:97:41'

config interface 'wan'
	option proto 'dhcp'
	option ifname 'eth1.2'
	option auto '1'

config interface 'wan6'
	option ifname '@wan'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'
	option auto '1'
...

Hm, for me the thing isn't black and white. I rebased and integrated the patches and uploaded them here:
master-lede_rebased_4.19
When I built an image and test it, the driver sometimes boots, and sometimes the box stalls and reboots due the watchdog. It hardly seems that this is an timing or synchronization issue (or both :slight_smile: ).
@kovz I'm waiting once you get your setup up and running and after you had time to digging into the code.

1 Like

@QAuge There are two typos in my patch. I created PR with fix.

Hi @kovz. Thanks for your PR. Sadly it seems not to work on my device...
There's now a loop:

[   33.936129] Upload Profile 1024 bytes from file, 0 from extra...
[   34.866903] RACFG_CMD_BOOT_NOTIFY                 
[   34.868841] Firmware path iNIC/RT3883/iNIC_ap.bin 
[   34.873555] Profile[0] path iNIC/RT3883/iNIC_ap.dat, read path iNIC/RT3883/iNIC_ap.dat
[   34.881464] EEPROM[0] path iNIC/RT3883/iNIC_e2p.bin, read path iNIC/RT3883/iNIC_e2p.bin
[   34.889472] Profile[1] path iNIC/RT3883/iNIC_ap1.dat, read path iNIC/RT3883/iNIC_ap1.dat
[   34.897567] EEPROM[1] path iNIC/RT3883/iNIC_e2p1.bin, read path iNIC/RT3883/iNIC_e2p1.bin
[   34.905799] Request file: iNIC/RT3883/iNIC_ap.bin                                                                                   
[   34.919305] Request file: iNIC/RT3883/iNIC_ap.dat                                                                                   
[   34.922953] Request file: iNIC/RT3883/iNIC_e2p.bin                                                                                  
[   34.927718] Request file: iNIC/RT3883/iNIC_ap1.dat                                                                                  
[   34.932579] Request file: iNIC/RT3883/iNIC_e2p1.bin
[   34.937570] Upload Profile 1024 bytes from file, 0 from extra...
[   35.867440] RACFG_CMD_BOOT_NOTIFY                 
[   35.869446] Firmware path iNIC/RT3883/iNIC_ap.bin 
[   35.874095] Profile[0] path iNIC/RT3883/iNIC_ap.dat, read path iNIC/RT3883/iNIC_ap.dat
[   35.882003] EEPROM[0] path iNIC/RT3883/iNIC_e2p.bin, read path iNIC/RT3883/iNIC_e2p.bin
[   35.890072] Profile[1] path iNIC/RT3883/iNIC_ap1.dat, read path iNIC/RT3883/iNIC_ap1.dat
[   35.898099] EEPROM[1] path iNIC/RT3883/iNIC_e2p1.bin, read path iNIC/RT3883/iNIC_e2p1.bin
[   35.906338] Request file: iNIC/RT3883/iNIC_ap.bin                                                                                   
[   35.919430] Request file: iNIC/RT3883/iNIC_ap.dat                                                                                   
[   35.923085] Request file: iNIC/RT3883/iNIC_e2p.bin                                                                                  
[   35.927842] Request file: iNIC/RT3883/iNIC_ap1.dat                                                                                  
[   35.932677] Request file: iNIC/RT3883/iNIC_e2p1.bin
[   35.937625] Upload Profile 1024 bytes from file, 0 from extra...

Kernel boot dmesg:
https://pastebin.com/DCLRYUa0

@QAuge From your dmesg:

[ 1.933333] Static link. Port <5>!
[ 1.940207] Registered fixed-link
[ 1.942713] Set tx-delay:0
[ 1.942729] Set rx-delay:0

Set tx-delay:0 means driver got wrong value from .dts
Fixed in the same PR with tx-delay = /bits/ 8 <3>; line.
For me it was really surprise, that for of_property_read_xx() functions the size of property should be specified.

Congratulations @kovz. This seems to work =) @Plonk34 Can you start your engines and also give it a try?
I was able to build an image and it started as expected =)
Main Repo
Feeds (init script)
and
Driver ralink_inic

Kovz: I squashed your commits, I hope this is ok...

For me it was really surprise, that for of_property_read_xx() functions the size of property should be specified.

Somehow that seems familiar to me, I think we had this for our tablet kernel. But I have all things forgotten. :angel: :slight_smile:

1 Like

Super! I still haven't possibility to test it on my own :frowning:
Squash commits is a good idea! I just tried to make them more granular and clear.

Sorry i had to work, but i make a build from post 168:


I do only short test these test looks good it works and i get a connection on 2,4 and 5 GHz but more tests
tomorrow. (speedtest and SQM test)
On small think it does not work on boot it must be start manuell, i think the reason are the missed 10s delay in the init script. (the network are not ready) but screenlog etc tomorow
#############################################################################
here the bootlog: https://pastebin.com/NqAuSQM2
But i can not really test because the uplink netdevice (port 4) does not really work and i do not know how i separate a port on switch1

I have no idea what are going wrong here but i must look tomorow

here my detailed report:

I use the source from post 168:

Good new it works without devmem but add again the sleep 10 inside the init script
here the bootlog incl. wifi: https://pastebin.com/ns8p1TQ0

here my Speedtest but with an old smartphone 1*mimo abgn channelsize max 2Mhz ?
Speedtest wl000 (5Ghz channel 36) up/down 20/50Mb/s *
Speedtest wl010 (2,4Ghz channel 6) up/down 14/23Mb/s

The bad news trafficcontrol does not work on the wifi driver:

tc qdisc show dev br-lan

working without wifi driver: https://pastebin.com/WWw1zwLN
It does not work with the wifi driver: https://pastebin.com/dJh0S4R3
strace: https://pastebin.com/RVMc3cnj

################################################################
update i have push the new code to the openwrt pullrequest
but i change inside the DTS file the part with wan ethernet because,
i can not etablish a ethernet WAN device on the gray DSL line, for this reason i add the old again.

About the Wifi-problem with SQM:
I have try to make a workaround: when i use tc i want to unload the WLAN driver first, because i looks like that it is possible do make SQM configuration and them load the wifidriver but:
The wifidriver reboot the device too when trying to unload the kernelmodule. The error message looks equal:
https://pastebin.com/VCRebVeu
https://pastebin.com/YubkYS1a
It is right that the exiption start here: br_get_link_af_size_filtered ?
In this funktion is some code with lock_rcu and unlock_rcu

2 Likes

Hi!
Thanks heaps for your efforts. I am trying to build an image to run some 904 xDSL boxes as freifunk berlin tunneldigger nodes (although only basic AP wifi atm). Qualle, which branch of your fork should I try to use as a base? master-lede_rebased_4.19 seems to be the most actively developed one, right? Thank you.
Kind regards
Matthias

The current branch is: master-lede_rebased_4.19

Or you can use these pullrequests:
https://github.com/openwrt/openwrt/pull/2060 = Add support for Easybox-904xDSL (lantiq/xrx200)
https://github.com/openwrt/openwrt/pull/2061 = add uboot support for Easybox-904xDSL
and really usefull these small fix:
https://github.com/openwrt/openwrt/pull/1885
For using pullrequest see post 136
But you do not need devmem anymore.

#!/bin/sh

# prepare build look i these nessasary
git config --global user.email "you@example.com"; git config --global user.name "Your Name" # for merging into your local branch
cd /opt/build # your build directory
rm -r ./openwrt # delete openwrt directory if exist (not nessasary if not exist)


# clone openwrt source and create a new branch called: eb904x
git clone https://github.com/openwrt/openwrt.git
cd openwrt
git checkout -b eb904x


# install main pullrequest in branch eb904x 
git fetch origin pull/2060/head:pr001-eb904x
git rebase eb904x pr001-eb904x
git checkout eb904x
git merge pr001-eb904x


# install uboot pullrequest in branch eb904x 
git fetch origin pull/2061/head:pr002-eb904x_uboot
git rebase eb904x pr002-eb904x_uboot
git checkout eb904x
git merge pr002-eb904x_uboot


# add missed some extra kernelconfigparameter for videosupport
# without it the build stops and ask for the parameter
git fetch origin pull/1885/head:pullreq
git rebase eb904x pullreq
git checkout eb904x
git merge pullreq


# Change to your device: 
#	Target System = Lantiq / Suptarget = XRX200 / Target Profile = Easybox 904
# for later Display support: 
#	Global build settings  ---> / [*] Select all target specific packages by default
#	Global build settings  ---> / [*] Show packages that require graphics support (local or remote)
# enable the easybox bootloader
# 	Boot Loaders  ---> / [*] u-boot-easybox904	
# eanable the SDK and the image builder
#	[*] Build the OpenWrt SDK (NEW)
# 	[*] Build the OpenWrt Image Builder
make menuconfig
make -j8 V=1 IGNORE_ERRORS=1 || make V=s IGNORE_ERRORS=1

I the next step i build the required packages that are not in openwrt for this device, with the SDK:

#!/bin/sh

cd /opt/build # my build directory change if needed

rm -rf ./owrtsdk
tar -xf $(find ./openwrt/bin/targets/lantiq/xrx200/openwrt-sdk-*.tar.xz)
mv -v $(find ./openwrt-sdk-* -type d -maxdepth 0) ./owrtsdk
cd ./owrtsdk
mkdir ./dl
rm -r ./dl; ln -sv /mnt/mapper/sda3/openwrt-source-dl dl # if you collect the whole openwrtsource like me inside /mnt/mapper/sda3/openwrt-source-dl use this line

cat ./feeds.conf.default |  grep -E -v "src-git[[:blank:]]*base.*" > ./feeds.conf

# If you do not have /opt/build/openwrt change it or use this line instead but note it is better to use same openwrt source that you have used for source build. 
#echo "src-git base https://github.com/openwrt/openwrt.git"
echo "src-git base file:///opt/build/openwrt" >> ./feeds.conf

echo "src-git eb904_driver https://github.com/Plonkbong/openwrt-feeds-easybox904-driver.git" >> ./feeds.conf
echo "src-git eb904_pkg    https://github.com/Plonkbong/openwrt-feeds-easybox904-minpkgset.git" >> ./feeds.conf

./scripts/feeds update -a

./scripts/feeds install -p eb904_driver fbtft
./scripts/feeds install -p eb904_driver touchpad
./scripts/feeds install -p eb904_driver ralink_bin
./scripts/feeds install -p eb904_driver ralink_inic

./scripts/feeds install -p eb904_pkg freetype
./scripts/feeds install -p eb904_pkg serdisplib
./scripts/feeds install -p eb904_pkg con2fbmap
./scripts/feeds install -p eb904_pkg lcd4linux-eb904
./scripts/feeds install -p eb904_pkg lcdcontroller

make -j2 IGNORE_ERRORS=1 V=1 || make -j1 IGNORE_ERRORS=1 V=s
3 Likes

So I'm rather new to OpenWrt, managed to compile a sysupgrade from master-lede_rebased_4.19.

First of all: Thanks for all the great work that has been done, I bought this device for 3€ of Ebay and running OpenWrt it seems to be way better than my old FritzBox.

Back on topic, I flashed my image and at first glance everything it's working, but not the LCD / touch panel.

The early 2018 image linked on the Wiki page had working panel which could be activated by touching the panel.

With the current image I can't reactivate the LCD once it turns of.

Where can I find more documentation on how the LCD / touch panel actually works, how to modify its content / let it be active forever etc?

Thanks

AFAIK this is pretty much undocumented, but it's not exactly difficult to explain.

The LCD runs off lcd4linux which in turn has its configuration in lcd4linux.conf. lcd4linux itself is sufficiently well documented. If you just run lcd4linux, it will stay on forever, it has no reason to turn off.

The other item is lcdcontroller which is a LUA script written by @QAuge (I presume). It checks the touchpad for (any) touch and, with some timeouts, turns on/off the LCD and, with some delay, even stops lcd4linux.

(The reason it stops lcd4linux is that the lcd4linux.conf has some mistakes that make it use heaps of CPU. It's easy to fix the configuration so stopping lcd4linux becomes unnecessary, but it was never picked up in here. I tried working on lcd4linux and even an lcdcontroller replacement that doesn't need LUA, but I eventually gave up because busybox's incredibly limited tool substitutions and even my Easybox itself were fighting me every step of the way. With all the improvements recently I should give it another shot.)

1 Like

Thank you for outlining your process. I am a just bit confused, though. Built this way, the packages relating to the INIC and the LCD/touchpad are not in the built image and have to be manually installed after the fact?

Also, what is the reason for compiling uboot? Do the newly built images not work with the stock uboot anymore?

I am happy to confirm, that the master-lede_rebase_4.19 branch builds fine, DSL works (even on a ds-lite connection), I don't use the WiFi since I have a "dumb access point" taking care of that.

root@OpenWrt:~# /etc/init.d/dsl_control status
ATU-C Vendor ID:                          Broadcom 177.249
ATU-C System Vendor ID:                   Broadcom
Chipset:                                  Lantiq-VRX200
Firmware Version:                         5.9.1.4.0.7
API Version:                              4.17.18.6
XTSE Capabilities:                        0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2
Annex:                                    B
Line Mode:                                G.993.5 (VDSL2 with down- and upstream vectoring)
Profile:                                  17a
Line State:                               UP [0x801: showtime_tc_sync]
Forward Error Correction Seconds (FECS):  Near: 0 / Far: 51
Errored seconds (ES):                     Near: 0 / Far: 4
Severely Errored Seconds (SES):           Near: 0 / Far: 0
Loss of Signal Seconds (LOSS):            Near: 0 / Far: 0
Unavailable Seconds (UAS):                Near: 144 / Far: 144
Header Error Code Errors (HEC):           Near: 0 / Far: 0
Non Pre-emtive CRC errors (CRC_P):        Near: 0 / Far: 0
Pre-emtive CRC errors (CRCP_P):           Near: 0 / Far: 0
Power Management Mode:                    L0 - Synchronized
Latency [Interleave Delay]:               8.0 ms [Interleave]   2.0 ms [Interleave]
Data Rate:                                Down: 53.999 Mb/s / Up: 10.799 Mb/s
Line Attenuation (LATN):                  Down: 12.5 dB / Up: 11.9 dB
Signal Attenuation (SATN):                Down: 12.5 dB / Up: 11.8 dB
Noise Margin (SNR):                       Down: 21.9 dB / Up: 31.0 dB
Aggregate Transmit Power (ACTATP):        Down: 7.8 dB / Up: 14.4 dB
Max. Attainable Data Rate (ATTNDR):       Down: 107.544 Mb/s / Up: 54.366 Mb/s
Line Uptime Seconds:                      500
Line Uptime:                              8m 20s

I have literally no idea how to get telephony working. I recompiled with

asterisk16 - 16.3.0-6
asterisk16-chan-lantiq - 20190803-1

but I cannot seem to start the asterisk server. I always get an error like:

Thu Aug 29 09:43:39 2019 daemon.info asterisk[8619]: [Aug 29 09:43:39] NOTICE[8619]: loader.c:2377 load_modules: 27 modules will be loaded.
Thu Aug 29 09:43:39 2019 daemon.info asterisk[8619]: [Aug 29 09:43:39] ERROR[8619]: config_options.c:710 aco_process_config: Unable to load config file 'cdr.conf'
Thu Aug 29 09:43:39 2019 daemon.info asterisk[8619]: [Aug 29 09:43:39] NOTICE[8619]: cdr.c:4373 process_config: Failed to process CDR configuration; using defaults
Thu Aug 29 09:43:39 2019 daemon.info asterisk[8619]: [Aug 29 09:43:39] NOTICE[8619]: cdr.c:4501 cdr_toggle_runtime_options: CDR simple logging enabled.
Thu Aug 29 09:43:39 2019 daemon.info asterisk[8619]: [Aug 29 09:43:39] ERROR[8619]: chan_lantiq.c:2116 load_module: lantiq TAPI device open function failed

Any tips?

EDIT:
Just tried running asterix with its console

root@OpenWrt:/etc/asterisk# asterisk -cf
Asterisk 16.3.0, Copyright (C) 1999 - 2018, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
PBX UUID: 567305d3-1ea7-4885-a67a-85679ce272b4
[Aug 29 11:17:28] NOTICE[5134]: loader.c:2377 load_modules: 27 modules will be loaded.
[ Initializing Custom Configuration Options ]
[Aug 29 11:17:28] NOTICE[5134]: cdr.c:4501 cdr_toggle_runtime_options: CDR simple logging enabled.
[Aug 29 11:17:28] ERROR[5134]: chan_lantiq.c:606 lantiq_dev_firmware_download: FIO_FW_DOWNLOAD ioctl failed
[Aug 29 11:17:28] ERROR[5134]: chan_lantiq.c:2132 load_module: voice firmware download failed
Bus error

I was running logread -f in another terminal and this came up:

root@OpenWrt:~# logread -f
Thu Aug 29 11:16:23 2019 kern.err kernel: [ 2075.822255] IFX_MPS: CPU1 base address is invalid!
Thu Aug 29 11:16:23 2019 kern.err kernel: [ 2075.825793] IFX_MPS: firmware download error (-1)!
Thu Aug 29 11:16:38 2019 kern.err kernel: [ 2090.479326] IFX_MPS: CPU1 base address is invalid!
Thu Aug 29 11:16:38 2019 kern.err kernel: [ 2090.482829] IFX_MPS: firmware download error (-1)!
Thu Aug 29 11:17:02 2019 kern.err kernel: [ 2114.802304] IFX_MPS: CPU1 base address is invalid!
Thu Aug 29 11:17:02 2019 kern.err kernel: [ 2114.805812] IFX_MPS: firmware download error (-1)!
Thu Aug 29 11:17:28 2019 kern.err kernel: [ 2140.131119] IFX_MPS: CPU1 base address is invalid!
Thu Aug 29 11:17:28 2019 kern.err kernel: [ 2140.134570] IFX_MPS: firmware download error (-1)!

Did I make a mistake in compiling the image?

Hi @Plonk34.

I had some time do digging into this issue, which I was able to reproduce thankfully to your description.
The wifi iNIC driver is a ticking time bomb IMO. So much legacy code...

Reason for the crash was, that the network driver framework thought, the wl001 it's part of an bridge,
because it has the IFF_BRIDGE_PORT set. If so, it assumed that the network device has set an rx_handler_data, which obviously doesn't was the case. With my limited knowledge of the network stack,
I added some printks here and there and then I found the reason within the inic code.

Here the priv_flag was set:

		new_dev_p->priv_flags = INT_MBSSID; /* we are virtual interface */

After checking what 'INT_MBSSID' means I found this one:

#define INT_MBSSID      0x0200

which maches exactly the priv_flag of

IFF_BRIDGE_PORT			= 1<<9,

So our driver interferes with the upstream code ... :-/
So I changed this with the few free bit flags and the driver seems to work:

// !! Be careful to not interfere with enum netdev_priv_flags definition in linux/include/linux/netdevice.h !!
#define INT_MAIN        0x0
#define INT_MBSSID      1<<29
#define INT_WDS         1<<30
//#ifdef MESH_SUPPORT
//#define INT_MESH        0x500
//#endif // MESH_SUPPORT //

Note, this is way away from perfect, just a dirty workaround. The real solution would be to rework the whole driver...

Guys, quick question. I would like to take a stab at some auxiliiary stuff (mostly the LCD/Touchpad and maybe the Wifi LuCI interface). However, compiling an image from scratch with my current setup takes me the better part of the day, and then I'm still not certain if I did it correctly. Can someone maybe provide a recent ready-to-flash image including the LCD and Wifi packages/modules? I would greatly appreciate it.

@QAuge Thanks !
And you have my great respect, because this looks reale difficuld to find it.

I agree but the always question are: who should do it ?
I am on the level that i can write a "driver" that printout "Hello World" and i fear that is the level for the next time because i do not work inside a Computerbranche and i have no freetime at the moment.
For this reason i am very happy when works with the "old dirty code".

@cosydog
You need some other command line parameter. Take a look inside:


on the beginning you have to change
from

bootargs = "console=ttyLTQ0,115200";

to

bootargs = "console=ttyLTQ0,115200 mem=116M phym=128M vpe1_load_addr=0x87e00000 vpe1_mem=2M maxvpes=1 maxtcs=1 nosmp";

The background are: This Processor have not 2 cores it have two VPEs (Virtual Processing Elements and each of them have 9 Threads (= TC))
These VPEs can be used as:
separated cores like SMP
or
you can use one VPE as normal CPU an one VPE for "some" Firmware.
For the Lantiq SLIC telefon support it is required that a Voice-de/encoding-firmware are run on one of the VPEs. (It called VMMC = no idea what are the correct words)
These Firmware will be loaded by the vmmc driver if you have add these keyword inside bootargs =
mem=116M phym=128M vpe1_load_addr=0x87e00000 vpe1_mem=2M maxvpes=1 maxtcs=1 nosmp

An other thing for display: you should use the display driver from here:


because the standard driver works only on SMP.
See here: https://github.com/Plonkbong/openwrt-feeds-easybox904-driver/commit/b872d1f4591c1db6d8efa9ef7553fb5d0e399a51

In my opinion it is will be a good idea to split the devices withb Lantiq SLIC like this device or O2-Box 6431 into 2 like SMP and voice support.
As i have do inside post 136 like http://sprunge.us/vD2n7V but current it will not work.
An first these device should add to the upstream openwrt.

@takimata
Sorry i have no time yet, my result from 15.05.2019 Support for Easybox 904 LTE
but with the knowed problems
@cosydog can you publish your result ?

@takimata
https://app.box.com/s/hvqg535dnubt4r2ontpmtodpvt6ydf00 --> 2019-08-31
I uploaded a new build to box.com.

2 Likes