Support for Easybox 904 LTE

Thank you, the image works fine. I haven't given it much of a soak test yet, but I could start tinkering with things.

So here's my first result. A shell script replacement for controller.lua, relying only on stock busybox.

#!/bin/sh

display_timeout=30
display_power=/sys/class/backlight/fb_ili9341_eb904/bl_power

set_display() {
	local target=$1
	local current=$(cat $display_power)
	if [ $target == "toggle" ]; then
		[ $current == 1 ] && target=0 || target=1
	fi
	[ $target != $current ] && echo $target > $display_power
}

while :; do
	keypad_result=$(time -f%e sh -c "read -t $display_timeout -n 2 < /dev/input/event0" 2>&1 | awk '/^\d/{print}' | sed 's/\.\d*$//')
	[ $keypad_result != $display_timeout ] && { set_display toggle; sleep 1; } || set_display 0
done

Admittedly, I did this mostly for the challenge and if I could convince standard busybox ash to recognize key presses. Turns out it needs a bit of a hack.

The interesting part is the long keypad_result=... one-liner. While one can read from a device and it recognizes that something was pressed, it does not tell you what has been pressed, presumably because read cannot deal with binary streams. Worse even, unlike bash read, busybox read here always returns the same exit code for a timeout and a keypress. I still wanted to use read because it has a handy timeout parameter (and we don't have timeout). What I ended up doing is measuring the time until read finishes (and get an integer seconds by post-processing with awk and sed). If this time matches the set timeout, one can presume that the timeout has been reached.

The rest is trivial, if read has timed out, turn off the display, otherwise toggle it on or off (and sleep a second not to react on the tail end of the key press immediately.)

I don't know if it's hugely useful as a substitute, the LUA script is also completely fine. But it was a fun exercise in restricted-as-frick shell scripting.

P.S.: I think one could even forego an external helper script if lcd4linux were compiled with the Keypad widget/driver, which it currently appears to be not, with the added benefit that it could distinguish between the single keys and have the display react. That would be especially useful since you don't need all the information and the corresponding load of getting the values all of the time.

2 Likes

Okay, will re-compile today night and leave it running for a test tomorrow. Don't want to fiddle with the internet at this hour, everyone in the house will skin me :sweat_smile:

This website never works for me: I get a "Quota exceeded" message. Any way you could maybe upload such to another website like:

http://ix.io/    :    $foo bar option1 option2 | curl -F 'f:1=<-' ix.io
https://termbin.com/:   $foo bar option1 option2 | nc termbin.com 9999
https://clbin.com:  <command> | curl -F 'clbin=<-' https://clbin.com

Well, that was one long week. I finally got around to testing the build today but to my dismay, I cannot transfer any file/config to the device. Every time I try to scp the firmware into the device, it locks up the console and goes into a reboot. Here are some logs:
root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fd96:73ce:aa56::/48'

config atm-bridge 'atm'
option vpi '1'
option vci '32'
option encaps 'llc'
option payload 'bridged'
option nameprefix 'dsl'

config dsl 'dsl'
option annex 'b'
option tone 'bv'
#option firmware '/lib/firmware/vdsl.bin'

config interface 'lan'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
list ifname 'eth0.1'
list ifname 'eth0.66'

config device 'lan_dev'
option name 'eth0.1'
option macaddr '5c:cd:69:12:6f:12'

config interface 'wan'
option proto 'pppoe'
option ipv6 '1'
option ifname 'dsl0.7'
option username 'H1und1/(Edd'
option password ''
option keepalive '0'
option ipv6 'auto'

config device 'wan_dev'
option name 'dsl0'
option macaddr '5c:cf:69:12:6f:13'

config interface 'wan6'
option ifname '@wan'
option proto 'dhcpv6'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 6t'

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

config switch
option name 'switch1'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch1'
option vlan '1'
option ports '0 1 2 3 6t'

config device 'inic_dev'
option name 'eth0.3'

config interface 'inic'
option proto 'none'
option ifname 'eth0.3'

config switch_vlan
option device 'switch0'
option vlan '3'
option vid '3'
option fid '3'
option ports '5 6t'

config device 'wlan_dev'
option name 'eth0.66'

config device 'guest_wlan_dev'
option name 'eth0.71'

config switch_vlan
option device 'switch0'
option vlan '4'
option vid '66'
option fid '4'
option ports '5t 6t'

config switch_vlan
option device 'switch0'
option vlan '5'
option vid '71'
option fid '5'
option ports '5t 6t'

config switch_vlan
        option device 'switch0'
        option vlan '7'
        option ports '4t'
        option vid '7'

Boot log

ROM VER: 1.1.4
CFG 06
NAND
NAND Read OK

ROM VER: 1.1.4
CFG 06
NAND
NAND Read OK
nand_read_page - 00000008
DDR autotuning Rev 0.3c
DDR size from 0xa0000000 - 0xa7ffffff
DDR check ok... start booting...



U-Boot 2010.06-Lv2.0.40-A0.6 (May 18 2017 - 01:40:23)

CLOCK CPU 500M RAM 250M
DRAM:  128 MiB
NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)
512 MiB
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
In:    serial
Out:   serial
Err:   serial
Net:   Internal phy(GE) firmware version: 0x040b
vr9 Switch

Type "run flash_nfs" to mount root filesystem over NFS

Hit any key to stop autoboot:  0 
Uncompressing LCD bootup images ............... 
NAND read: device 0 offset 0x0000000004700000, size 0x0000000000300000
 0x300000 bytes read: OK
1. bootid : 0, bootnum : 2
Erasing at 0x4560000 -- 100% complete.
done
2. bootid : 0, bootnum : 3

NAND read: device 0 offset 0x0000000003c40000, size 0x0000000000500000
 0x500000 bytes read: OK
## Booting kernel from Legacy Image at 80800000 ...
   Image Name:   MIPS OpenWrt Linux-4.19.69
   Created:      2019-08-31   7:13:43 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    2152336 Bytes = 2.1 MiB
   Load Address: 80002000
   Entry Point:  80002000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Linux version 4.19.69 (arch@arch-pc) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r10957-4962636f3e)) #0 SMP Sat Aug 31 07:13:43 2019
[    0.000000] SoC: xRX200 rev 1.2
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019556 (MIPS 34Kc)
[    0.000000] MIPS: machine is EasyBox 904 xDSL
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 07400000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Detected 1 available secondary CPU(s)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x00000000073fffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x00000000073fffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000073fffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x90/0x4a4 with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu s26064 r8192 d23088 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 29464
[    0.000000] Kernel command line: console=ttyLTQ0,115200 mem=116M phym=128M vpe1_load_addr=0x87e00000 vpe1_mem=2M maxvpes=1 maxtcs=1 nosmp
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 109468K/118784K available (4946K kernel code, 201K rwdata, 1428K rodata, 1280K init, 218K bss, 9316K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 500MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041786 ns
[    0.000011] sched_clock: 32 bits at 250MHz, resolution 4ns, wraps every 8589934590ns
[    0.008045] Console: colour dummy device 80x25
[    0.012388] Calibrating delay loop... 332.54 BogoMIPS (lpj=665088)
[    0.050447] pid_max: default: 32768 minimum: 301
[    0.055351] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.061857] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.071524] rcu: Hierarchical SRCU implementation.
[    0.077398] smp: Bringing up secondary CPUs ...
[    0.081833] smp: Brought up 1 node, 1 CPU
[    0.092167] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.101835] futex hash table entries: 512 (order: 2, 16384 bytes)
[    0.108110] pinctrl core: initialized pinctrl subsystem
[    0.114529] NET: Registered protocol family 16
[    0.128363] dcdc-xrx200 1f106a00.dcdc: Core Voltage : 1016 mV
[    0.138678] pinctrl-xway 1e100b10.pinmux: Init done
[    0.144406] dma-xway 1e104100.dma: Init done - hw rev: 7, ports: 7, channels: 28
[    0.365183] ifx_pcie_wait_phy_link_up timeout
[    0.580528] ifx_pcie_wait_phy_link_up timeout
[    0.795863] ifx_pcie_wait_phy_link_up timeout
[    1.011233] ifx_pcie_wait_phy_link_up timeout
[    1.075658] random: fast init done
[    1.229840] ifx_pcie_wait_phy_link_up timeout
[    1.234049] pcie_rc_initialize link up failed!!!!!
[    1.292818] usbcore: registered new interface driver usbfs
[    1.298346] usbcore: registered new interface driver hub
[    1.303736] usbcore: registered new device driver usb
[    1.315593] clocksource: Switched to clocksource MIPS
[    1.329131] NET: Registered protocol family 2
[    1.334519] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    1.342135] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.349130] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    1.355541] TCP: Hash tables configured (established 1024 bind 1024)
[    1.362190] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    1.367956] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    1.374613] NET: Registered protocol family 1
[    1.399071] gptu: totally 6 16-bit timers/counters
[    1.404001] gptu: misc_register on minor 63
[    1.408151] gptu: succeeded to request irq 126
[    1.412644] gptu: succeeded to request irq 127
[    1.417171] gptu: succeeded to request irq 128
[    1.421674] gptu: succeeded to request irq 129
[    1.426188] gptu: succeeded to request irq 130
[    1.430700] gptu: succeeded to request irq 131
[    1.438355] lantiq,vmmc 1f107000.vmmc: requested GPIO 499
[    1.443660] lantiq,vmmc 1f107000.vmmc: reserved 1MB at 0x(ptrval)
[    1.452021] Crashlog allocated RAM at address 0x3f00000
[    1.462651] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    1.476321] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.482083] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.511141] io scheduler noop registered
[    1.515049] io scheduler deadline registered (default)
[    1.524300] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, base_baud = 0) is a lantiq,asc
[    1.533245] console [ttyLTQ0] enabled
[    1.533245] console [ttyLTQ0] enabled
[    1.540554] bootconsole [early0] disabled
[    1.540554] bootconsole [early0] disabled
[    1.555550] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xdc
[    1.560447] nand: Samsung NAND 512MiB 3,3V 8-bit
[    1.565062] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.573732] Bad block table found at page 262080, version 0x01
[    1.579534] Bad block table found at page 262016, version 0x01
[    1.584998] 16 fixed-partitions partitions found on MTD device 12000000.flash
[    1.591565] Creating 16 MTD partitions on "12000000.flash":
[    1.597069] 0x000000000000-0x000000040000 : "uboot"
[    1.603135] 0x000000040000-0x000003c40000 : "rootfs1"
[    1.608792] 0x000003c40000-0x000004140000 : "kernel"
[    1.613533] 0x000004140000-0x000004240000 : "tmp1"
[    1.618406] 0x000004240000-0x000004440000 : "tmp2"
[    1.623093] 0x000004440000-0x000004540000 : "sysconfig"
[    1.628296] 0x000004540000-0x000004640000 : "ubootconfig"
[    1.633714] 0x000004640000-0x000004700000 : "fwdiag"
[    1.638764] 0x000004700000-0x000004a00000 : "lcdimage"
[    1.643831] 0x000004a00000-0x000004b00000 : "mfgconfig"
[    1.649015] 0x000004b00000-0x000004c00000 : "sipdata"
[    1.654164] 0x000004c00000-0x000008c00000 : "voice"
[    1.659634] 0x000008c00000-0x00001be00000 : "ubi"
[    1.667628] 0x00001be00000-0x00001fa00000 : "rootfs2"
[    1.673166] 0x00001fa00000-0x00001ff00000 : "kernel2"
[    1.678033] 0x00001ff00000-0x000020000000 : "mystery"
[    1.684758] rtl8367b rtl8367b: cannot find mdio bus from bus handle, try again later
[    1.691749] libphy: Fixed MDIO Bus: probed
[    1.697742] wdt 1f8803f0.watchdog: Init done
[    1.703179] NET: Registered protocol family 10
[    1.735509] Segment Routing with IPv6
[    1.737837] NET: Registered protocol family 17
[    1.742428] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.755194] 8021q: 802.1Q VLAN Support v1.8
[    1.768426] rtl8367b rtl8367b: cannot find mdio bus from bus handle, try again later
[    1.876171] libphy: lantiq,xrx200-mdio: probed
[    1.881496] Static link. Port <0>!
[    1.884800] Registered fixed-link
[    1.886853] Set tx-delay:1
[    1.886863] Set rx-delay:0
[    1.889470] Static link. Port <5>!
[    1.896579] Registered fixed-link
[    1.898990] Set tx-delay:3
[    1.899001] Set rx-delay:0
[    1.901629] lantiq,xrx200-net 1e108000.eth eth0 (uninitialized): Connect as fixed link.
[    1.912446] Generic PHY fixed-0:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:01, irq=POLL)
[    1.922305] lantiq,xrx200-net 1e108000.eth eth0 (uninitialized): Connect as fixed link.
[    1.930389] Generic PHY fixed-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=POLL)
[    1.941616] lantiq,xrx200-net 1e108000.eth eth1 (uninitialized): Connect as common phy link.
[    2.018707] Intel XWAY PHY11G (xRX v1.2 integrated) 0:13: attached PHY driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (mii_bus:phy_addr=0:13, irq=POLL)
[    2.033017] rtl8367b rtl8367b: using MDIO bus 'lantiq,xrx200-mdio'
[    2.038349] rtl8367b rtl8367b: RTL8367RB chip found
[    2.942152] lantiq,xrx200-net 1e108000.eth eth0: port 5 got link
[    2.946770] lantiq,xrx200-net 1e108000.eth eth0: port 0 got link
[    3.428343] libphy: rtl8367b: probed
[    3.432325] UBI: auto-attach mtd12
[    3.434426] ubi0: attaching mtd12
[    3.877156] ubi0: scanning is finished
[    3.896697] ubi0: attached mtd12 (name "ubi", size 306 MiB)
[    3.900924] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.907772] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.914536] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.921490] ubi0: good PEBs: 2448, bad PEBs: 0, corrupted PEBs: 0
[    3.927585] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    3.934811] ubi0: max/mean erase counter: 3/0, WL threshold: 4096, image sequence number: 1527652088
[    3.943949] ubi0: available PEBs: 0, total reserved PEBs: 2448, PEBs reserved for bad PEB handling: 80
[    3.953395] ubi0: background thread "ubi_bgt0d" started, PID 584
[    3.960848] block ubiblock0_0: created from ubi0:0(rootfs)
[    3.965019] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    3.972327] USB_VBUS: disab[    3.984300] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    3.994002] Freeing unused kernel memory: 1280K
[    3.997156] This architecture does not have kernel memory protection.
[    4.003552] Run /sbin/init as init process
[    4.788129] init: Console is alive
[    4.790559] init: - watchdog -
[    6.965543] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    7.075233] exFAT: Version 1.2.9
[    7.137863] SCSI subsystem initialized
[    7.151586] dwc2 1e101000.usb: 1e101000.usb supply vusb_d not found, using dummy regulator
[    7.158608] dwc2 1e101000.usb: Linked as a consumer to regulator.0
[    7.164661] dwc2 1e101000.usb: 1e101000.usb supply vusb_a not found, using dummy regulator
[    7.274573] dwc2 1e101000.usb: DWC OTG Controller
[    7.277885] dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
[    7.284997] dwc2 1e101000.usb: irq 62, io mem 0x1e101000
[    7.290459] dwc2 1e101000.usb: Linked as a consumer to regulator.1
[    7.298225] hub 1-0:1.0: USB hub found
[    7.301048] hub 1-0:1.0: 1 port detected
[    7.305542] dwc2 1e106000.usb: 1e106000.usb supply vusb_d not found, using dummy regulator
[    7.312965] dwc2 1e106000.usb: Linked as a consumer to regulator.0
[    7.318980] dwc2 1e106000.usb: 1e106000.usb supply vusb_a not found, using dummy regulator
[    7.430378] dwc2 1e106000.usb: DWC OTG Controller
[    7.433694] dwc2 1e106000.usb: new USB bus registered, assigned bus number 2
[    7.440846] dwc2 1e106000.usb: irq 91, io mem 0x1e106000
[    7.446288] dwc2 1e106000.usb: Linked as a consumer to regulator.1
[    7.453687] hub 2-0:1.0: USB hub found
[    7.456555] hub 2-0:1.0: 1 port detected
[    7.466338] usbcore: registered new interface driver usb-storage
[    7.472167] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.488821] init: - preinit -
strings: standard output: Broken pipe
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   12.347251] mount_root: loading kmods from internal overlay
[   12.397589] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   12.410446] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   13.762916] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 687
[   13.860788] UBIFS (ubi0:1): recovery needed
[   13.889912] random: procd: uninitialized urandom read (4 bytes read)
[   14.004010] UBIFS (ubi0:1): recovery completed
[   14.007246] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   14.014908] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   14.024809] UBIFS (ubi0:1): FS size: 281632768 bytes (268 MiB, 2218 LEBs), journal size 14094336 bytes (13 MiB, 111 LEBs)
[   14.035769] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[   14.042390] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID 3DAFB22D-8E77-4C9E-8A47-FBE1F2F18BCC, small LPT model
[   14.056699] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[   14.064994] block: extroot: not configured
[   14.068137] UBIFS (ubi0:1): un-mount UBI device 0
[   14.072491] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" stops
[   14.109439] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 690
[   14.201673] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   14.208164] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   14.218037] UBIFS (ubi0:1): FS size: 281632768 bytes (268 MiB, 2218 LEBs), journal size 14094336 bytes (13 MiB, 111 LEBs)
[   14.228995] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[   14.235615] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID 3DAFB22D-8E77-4C9E-8A47-FBE1F2F18BCC, small LPT model
[   14.248871] mount_root: loading kmods from internal overlay
[   14.296475] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[   14.304579] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[   15.415101] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[   15.423347] block: extroot: not configured
[   15.427980] mount_root: switching to ubifs overlay
[   15.475232] overlayfs: upper fs does not support xattr, falling back to index=off and metacopy=off.
[   15.488762] urandom-seed: Seeding with /etc/urandom.seed
fw_config exists already
Bootnum: 3
[   15.846003] procd: - early -
[   15.847974] procd: - watchdog -
[   16.218362] lantiq,xrx200-net 1e108000.eth eth0: port 0 lost link
[   16.226200] lantiq,xrx200-net 1e108000.eth eth0: port 5 lost link
[   16.742500] procd: - watchdog -
[   16.744749] procd: - ubus -
[   17.134460] random: ubusd: uninitialized urandom read (4 bytes read)
[   17.278447] random: ubusd: uninitialized urandom read (4 bytes read)
[   17.296934] random: ubusd: uninitialized urandom read (4 bytes read)
[   17.308475] procd: - init -
Please press Enter to activate this console.
[   19.306447] kmodloader: loading kernel modules from /etc/modules.d/*
[   19.406433] urngd: v1.0.0 started.
[   19.471148] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[   19.491642] fbtft_of_value: buswidth = 8
[   19.494241] fbtft_of_value: debug = 1
[   19.497753] fbtft_of_value: rotate = 270
[   19.501735] fbtft_of_value: fps = 30
[   19.522737] fb_ili9341_eb904 13000000.display: fbtft_request_one_gpio: 'reset-gpios' = GPIO468
[   19.530161] fb_ili9341_eb904 13000000.display: fbtft_request_one_gpio: 'led-gpios' = GPIO490
[   19.682138] ili9341_Probe_smp: mapped to (ptrval)
[   19.685405] ili9341_Probe_smp: Probed ID4: 9341
[   19.835821] Console: switching to colour frame buffer device 40x30
[   19.862967] random: crng init done
[   19.862980] random: 6 urandom warning(s) missed due to ratelimiting
[   19.891692] graphics fb0: fb_ili9341_eb904 frame buffer, 320x240, 150 KiB video memory, 16 KiB buffer memory, fps=31
[   19.907806] IFXOS, Version 1.5.19 (c) Copyright 2009, Lantiq Deutschland GmbH
[   19.924869] Lantiq TAPI device driver, version 3.13.0.2, (c) 2001-2010 Lantiq Deutschland GmbH
[   19.937528] NET: Registered protocol family 8
[   19.940526] NET: Registered protocol family 20
[   19.951696] tun: Universal TUN/TAP device driver, 1.6
[   19.985304] PPP generic driver version 2.4.2
[   20.044755] Lantiq (VRX) DSL CPE MEI driver, version 1.5.17.6, (c) 2007-2015 Lantiq Beteiligungs-GmbH & Co. KG
[   20.213606] i2c /dev entries driver
[   20.235504] 
[   20.235504] 
[   20.235504] Lantiq CPE API Driver version: DSL CPE API V4.17.18.6
[   20.243224] 
[   20.243224] Predefined debug level: 3
[   20.254754] gpio-481 (i2c): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[   20.262493] gpio-476 (i2c): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[   20.271807] i2c-gpio i2c: using lines 481 (SDA) and 476 (SCL)
[   20.285277] eb904_keypad 0-0014: Error while parsing <eb904,ctrl-rst-gpio> <-517>!
[   20.301595] hidraw: raw HID events driver (C) Jiri Kosina
[   20.313537] Bridge firewalling registered
[   20.330429] Lantiq MIPS34KEc MPS driver, version 2.2.2.5, (c) 2006-2010 Lantiq Deutschland GmbH
[   20.337794] request_timer(2, 0x000001AE, 1)...
[   20.337819] successful!
[   20.344983] Lantiq VMMC device driver, version 1.9.0.3, (c) 2006-2010 Lantiq Deutschland GmbH
[   20.436866] Infineon Technologies DEU driver version 2.0.0 
[   20.461452] IFX DEU DES initialized (multiblock).
[   20.466250] IFX DEU AES initialized (multiblock).
[   20.470243] IFX DEU ARC4 initialized (multiblock).
[   20.474807] IFX DEU SHA1 initialized.
[   20.478382] IFX DEU MD5 initialized.
[   20.481780] IFX DEU SHA1_HMAC initialized.
[   20.486893] IFX DEU MD5_HMAC initialized.
[   20.490525] eb904_keypad 0-0014: Error while parsing <eb904,ctrl-rst-gpio> <-517>!
[   20.509589] NET: Registered protocol family 24
[   20.522772] gpio-export gpio_export: 7 gpio(s) exported
[   21.882076] sched: RT throttling activated
[   22.569277] wireguard: WireGuard 0.0.20190702 loaded. See www.wireguard.com for information.
[   22.576354] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   22.588906] input: eb904_keypad as /devices/platform/i2c/i2c-0/0-0014/input/input0
[   22.613011] xt_time: kernel timezone is -0000
[   22.661607] kmodloader: done loading kernel modules from /etc/modules.d/*
[   37.544575] Warnning!! syncmiimac is foreced to 0 in dual concurrent mode.
[   37.550119] ERROR! Please assign miimaster=[MII master device name] at module insertion.
[   40.086641] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   40.091202] lantiq,xrx200-net 1e108000.eth eth0: port 5 got link
[   40.097152] lantiq,xrx200-net 1e108000.eth eth0: port 0 got link
[   40.103122] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   40.125370] device eth0 entered promiscuous mode
[   40.134782] br-lan: port 1(eth0.1) entered blocking state
[   40.138862] br-lan: port 1(eth0.1) entered disabled state
[   40.144655] device eth0.1 entered promiscuous mode
[   40.169704] br-lan: port 1(eth0.1) entered blocking state
[   40.173749] br-lan: port 1(eth0.1) entered forwarding state
[   40.179620] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   40.270750] br-lan: port 2(eth0.66) entered blocking state
[   40.274929] br-lan: port 2(eth0.66) entered disabled state
[   40.280793] device eth0.66 entered promiscuous mode
[   40.285502] br-lan: port 2(eth0.66) entered blocking state
[   40.290713] br-lan: port 2(eth0.66) entered forwarding state
[   41.086729] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

My config file after menuconfig:
https://clbin.com/gtbzv or https://termbin.com/ikti or http://ix.io/1UGP

The full build log is about 47 MB, so I can only provide that if explicitly requested. I will nuke my build dirs and retry again with the config from @QAuge on the git repo. Will report again.

Ah yes, here is my firmware, for anyone who cares to test.
https://file.io/XwckD8

Hey guys,

I also wanted to check if my EasyBox904 with running LEDE will also work on my Annex J line.

(git-17.165.70928-dd6cb31) / LEDE Reboot SNAPSHOT r4540-3d457764e2

Unfortunately I somehow missed the set a proper IP-Config. I was able to reach the device via IPv6 then I modified /etc/config/network for "DSL" information.

Now the device is unreachable. I tried also to use the same firmware files from BT5Hub. I uploaded it via SCP to /lib/firmware and did the same config like in BT5hub for using the firmware.

Now I am not sure how to proceed to not unbrick the device. I can still remember I invested a lot of time to bring wifi to work. There was something to change in /lib/wifi/ralink.sh in #240.
orignial thread

No I don't know how to proceed and where I should start. - I haven't installed the hacked bootloader yet and I think I directly went from OEM to LEDE via rescue mode and TFTP.

Try using a tftp server serving the fullimage.img on 192.168.2.100

@cosydog try a firmware without Displaydriver.

Did you use my driver that i have linked ?

I have to be honest that I don't know how to "use" your driver :slightly_frowning_face: I have added it to the feeds conf file but the LCD driver gets built anyways. I just commented out the line starting lcd4linux on the corresponding init.d file since I don't need the display anyways. I found out that the DSL firmware I was using was pretty much between unstable and unusable :sweat_smile: so I ditched it and use 5.7.8.9.1.7. It has been running fine the last 24 hrs without one disconnect, so I'm happy there. Only this asterisk/fon isn't working. Will post my images/configs tomorrow and this time to some other host. I discovered that file.io deletes them on the first download :angry:

A question aside: what are the minimal settings on the kernel config to get the router running. @QAuge has quite a bit running on the default config :astonished: I even discovered that I can use wireshark on his image :+1:

@cosydog

This will not help the driver should not load try to uncomment in /etc/modules.d or deinstall with opkg, but i fear that is nt possible because blocking of Nand-flash
So you can try to use the image-builder if you have build it.

The short background are that the displaydriver block the NAND-flash
see https://github.com/Plonkbong/openwrt-feeds-easybox904-driver/commit/b872d1f4591c1db6d8efa9ef7553fb5d0e399a51
The result are: reboot on some file operation, for example when the init script try to change the mode of voice-firmware-file.
Or when the dsl_control script try to change from Annex-A Firmware to Annex-B firmware.

It should bee simple possible to disable the driver by build the display driver as module only in menuconfig
or look at post #173 and look at the SDK Part where the Feed will install.
After adding to feeds.conf it this commands should bee used (i think)

./scripts/feeds update -a
./scripts/feeds uninstall fbtft
./scripts/feeds install -p <the-right-feed> fbtft

If you have the image builder build an image without fbtft for testing.

As i say for testing, Do not load the display-driver, if you have done and it does not working:
be sure tapi and vmmc driver are loaded and be shure asterisk have rights on /dev/vmmcN and the voice firmware
Then stop asterisk and start again on console ("asterisk -vvvvvvv -ddddddd") and post your output of them.

root@OpenWrt:/etc/init.d# ls /dev/vmmc1* -lash
     0 crw-r--r--    1 root     root      122,  10 Sep 15 15:33 /dev/vmmc10
     0 crw-r--r--    1 root     root      122,  11 Sep 15 15:33 /dev/vmmc11
     0 crw-r--r--    1 root     root      122,  12 Sep 15 15:33 /dev/vmmc12
     0 crw-r--r--    1 root     root      122,  13 Sep 15 15:33 /dev/vmmc13
     0 crw-r--r--    1 root     root      122,  14 Sep 15 15:33 /dev/vmmc14
     0 crw-r--r--    1 root     root      122,  15 Sep 15 15:33 /dev/vmmc15
     0 crw-r--r--    1 root     root      122,  16 Sep 15 15:33 /dev/vmmc16
     0 crw-r--r--    1 root     root      122,  17 Sep 15 15:33 /dev/vmmc17
     0 crw-r--r--    1 root     root      122,  18 Sep 15 15:33 /dev/vmmc18
root@OpenWrt:/etc/init.d# asterisk -vvvvvvv -ddddddd
Seeding global EID '5c:dc:96:12:6f:12' from 'br-lan' using 'siocgifhwaddr'

I tried that and nothing happens. Funny thing is, I noticed I have a dial tone, but cannot call or be called by anyone. Please bear with me as the only time I can post my asterisk configs will be later on in the week. Maybe my configs are not correct.

Could anyone do a Speedtest with the current build on VDSL Vectoring?

My TP-LINK 9980 can only do 22Mbit which wasn't much of a problem as long as I only had 25Mbit.
But now apparently the future (or rather present) has arrived in my part of Germany and I'm looking for an OpenWRT device I can enjoy it with.

Have a half bricked 904 (non LTE) lying around that I could probably revive if it's worth the effort.

Not near my equipment right now, but I can comment on that:

That would indicate that you are on a super-vectoring line (35b), and falling back on a 17b profile. In which case no device using a Lantiq VRX200/XRX200 chipset will do you any better, that chipset simply cannot do super-vectoring. Since that is the only modem chipset currently supported by OpenWrt, you'll probably have to resort to an external modem.

1 Like

Not sure if thats the case, DSL status says
Annex: B
Profile: 17a
Data Rate: 109.926 Mb/s / 39.273 Mb/s
Max. Attainable Data Rate (ATTNDR): 120.707 Mb/s / 41.887 Mb/s

So it synced with ~100Mbit but if I do a simple wget -o /dev/null speedtest on the device itself, 23 Mbit is the maximum I get.

I also tested an Arcadyan / Astoria VGV7510KW22 o2 Box 6431 (xrx200) that can only get 8Mbit!

Any suggestion for a cheap external modem?

What are you wgetting?

When used as modem+router, with the voice engine enabled (which subsequently disables SMP), you should achieve around 55-60 MBit/s (~80-85 with SMP enabled/ FXS disabled, ~110 MBit/s with SMP and flow-offloading) with either device. That's at least what the hardware can do at VDSL2+vectoring, G.997/ profile 17a, while not being confined to a potential fallback profile.

That is indeed strange then. Your W9980 should be able to do ~90 mbit/s before it tops out the CPU. (First hand experience from using a W8980 -- which is virtually identical hardware -- on an 100/40 line.) You wouldn't happen to use SQM or some other form of QoS, would you?

At any rate, the Easybox will not improve anything over the TP-Link Wx9x0, it uses the same chipset.

1 Like

Yes I had SQM QOS installed but nothing configured for it, uninstalled it, rebooted to be sure, still no change.

date && wget -O /dev/null http://129.143.4.238/100M && date
35 seconds.

I also have Mwan3 (LTE failover) and an Ipv6 tunnel configured but to my understandig that shouldn't influence Ipv4 speed (Mwan3 is in the end just a few iptables rules)?

I executed that
date && wget -O /dev/null http://129.143.4.238/100M && date
on my xrx200 device, and it run in 14 seconds, 7.26MB/sec. About what to be expected, as it trained in at 78Mbit.

But according to top it used 43% CPU during the wget (on a dual core system), so not much is needed to bottleneck this. (dd if=/dev/zero of=/dev/null does 49%)

I got 5% usr 15% sys and 25% sirq.

Starting to wonder if speed is somehow simply limited via provider. (Hey let them pay for 50Mbit, we limit no matter what...)
(Terrorkom limited VDSL sync here to either 25 or 50 Mbit, 25 if "line capacity was not good enough" then 6 months ago sync suddenly went back to max line capacity of 37Mbit (as I already had 10 years ago with another provider, YES, that is German "Fortschritt durch Technik") but speed stayed at or below 25Mbit. I always thought that was due to the new (old) WRT router I installed.

But now still the same with 100Mbit sync, that's kind of strange.

I think at this point you should probably open a new thread to discuss your issue. Your problem is unrelated to the Easybox 904 device, keeping it here adds noise to the thread and prevents those who are not watching this thread from seeing your problem.

2 Likes

Hi there :grin:

Its been a while since the last time I was here...

Yesterday I came across my partially bricked and thought I give a new try.

I debricked with recovery partition and was able to install the newest image provided by quallenauge(much thanks for your effort).

I had some problems with configuring the wlan and wan port. If I changed the WiFi options something gets messed up in the config file. The option "encryption" slips under the option "key" so even if you declare "PSK2+AES" it will configured as "WEP". Took a while to figure out but its working now.

My main problem is that the provided image has an "old" kernel so I"m not able to update "kmod" packages and I"m not able to install f.e. python3 which I really need on this device. This always ends with a kernel panik and a reset.

Now I'm trying to compile my own firmware but unfortunately the instructions I lump together quite a while ago don"t seems to work anymore.

If I try to add the patch from "http://arny.tjps.eu/OpenWrt/EasyBox904xDSL/devel/v0.1-EasyBox904xDSL.patch" I receive following error:

patching file target/linux/lantiq/dts/VGV952CJW33.dts
patching file target/linux/lantiq/image/Makefile
Hunk #1 FAILED at 88.
Hunk #2 succeeded at 607 with fuzz 2 (offset 174 lines).
1 out of 2 hunks FAILED -- saving rejects to file target/linux/lantiq/image/Makefile.rej
can't find file to patch at input line 391
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/target/linux/lantiq/xrx200/profiles/arv.mk b/target/linux/lantiq/xrx200/profiles/arv.mk
|index f68862b..b20155d 100644
|--- a/target/linux/lantiq/xrx200/profiles/arv.mk
|+++ b/target/linux/lantiq/xrx200/profiles/arv.mk
--------------------------

So I"m not able to select Easybox 904 as a device in "menuconfig".
Can somebody give me a hint where I can find current working instructions for compiling a working image? I also would update the wiki entry on TOH for this device.

Thank you guys very much!