[Solved] Enginius EAP350 Support

Hi, Any one using Enginius EAP350 with LEDE/OpenWRT? Factory installed firmware based off KAMIKAZE base and heavily customized. I was trying find if this device can get better life by installing LEDE somehow. I am pasting dmesg output herewith for any great soul to help me. Thanks in Advance.

[    0.000000] Linux version 3.18.36 (engenius@administrator-HP9900) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r49403) ) #83 Thu Aug 25 02:55:39 CEST 2016
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR7242 rev 1
[    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] Initmem setup node 0 [mem 0x00000000-0x01ffffff]
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 803220f0, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8192 pages, LIFO batch:0
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=EAP350 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),320k(custom),1024k(kernel),4928k(rootfs),1536k(failsafe),64k(ART)ro rootfstype=squashfs,jffs2 noinitrd
[    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] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 28800K/32768K available (2462K kernel code, 112K rwdata, 328K rodata, 160K init, 183K bss, 3968K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:5.000MHz
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.100000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is EnGenius EAP350
[    0.110000] ar71xx: pll_reg 0xb805002c: 0x62000000
[    0.330000] registering PCI controller with io_map_base unset
[    0.340000] PCI host bridge to bus 0000:00
[    0.350000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.350000] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.360000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.360000] pci 0000:00:00.0: [168c:002a] type 00 class 0x028000
[    0.360000] pci 0000:00:00.0: fixup device configuration
[    0.370000] pci 0000:00:00.0: reg 0x10: [mem 0x10000000-0x1000ffff 64bit]
[    0.370000] pci 0000:00:00.0: supports D1
[    0.370000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.370000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.370000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
[    0.370000] pci 0000:00:00.0: using irq 40 for pin 1
[    0.380000] Switched to clocksource MIPS
[    0.380000] NET: Registered protocol family 2
[    0.390000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.390000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.400000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.410000] TCP: reno registered
[    0.410000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.420000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.420000] NET: Registered protocol family 1
[    0.430000] PCI: CLS 0 bytes, default 32
[    0.430000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.440000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.450000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.460000] msgmni has been set to 56
[    0.480000] io scheduler noop registered
[    0.480000] io scheduler deadline registered (default)
[    0.480000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.490000] console [ttyS0] disabled
[    0.520000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 12500000) is a 16550A
[    0.520000] console [ttyS0] enabled
[    0.530000] bootconsole [early0] disabled
[    0.540000] m25p80 spi0.0: found mx25l6405d, expected m25p80
[    0.550000] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    0.550000] 7 cmdlinepart partitions found on MTD device spi0.0
[    0.560000] Creating 7 MTD partitions on "spi0.0":
[    0.560000] 0x000000000000-0x000000040000 : "u-boot"
[    0.570000] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.580000] 0x000000050000-0x0000000a0000 : "custom"
[    0.580000] 0x0000000a0000-0x0000001a0000 : "kernel"
[    0.590000] 0x0000001a0000-0x000000670000 : "rootfs"
[    0.590000] mtd: device 4 (rootfs) set to be root filesystem
[    0.600000] 1 squashfs-split partitions found on MTD device rootfs
[    0.610000] 0x000000460000-0x000000670000 : "rootfs_data"
[    0.610000] 0x000000670000-0x0000007f0000 : "failsafe"
[    0.620000] 0x0000007f0000-0x000000800000 : "ART"
[    0.640000] libphy: ag71xx_mdio: probed
[    1.310000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:04 [uid=004dd072, driver=Atheros 8035 ethernet]
[    1.320000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    1.320000] TCP: cubic registered
[    1.330000] NET: Registered protocol family 17
[    1.330000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.340000] 8021q: 802.1Q VLAN Support v1.8
[    1.360000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    1.360000] Freeing unused kernel memory: 160K (80338000 - 80360000)
[    2.680000] init: Console is alive
[    2.680000] init: - watchdog -
[    4.720000] init: - preinit -
[    5.970000] jffs2: notice: (272) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    5.990000] mount_root: overlay filesystem has not been fully initialized yet
[    6.000000] mount_root: switching to jffs2 overlay
[    6.040000] procd: - early -
[    6.050000] procd: - watchdog -
[    6.720000] procd: - ubus -
[    7.720000] random: ubusd urandom read with 12 bits of entropy available
[    7.740000] procd: - init -
[    8.790000] NET: Registered protocol family 10
[    8.800000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    8.820000] Loading modules backported from Linux version v4.4-rc5-1913-gc8fdf68
[    8.820000] Backport generated by backports.git backports-20151218-0-g2f58d9d
[    8.990000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.000000] nf_conntrack version 0.5.0 (452 buckets, 1808 max)
[    9.050000] xt_time: kernel timezone is -0000
[    9.070000] PPP generic driver version 2.4.2
[    9.080000] NET: Registered protocol family 24
[    9.100000] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[    9.110000] ath: phy0: Ignoring endianness difference in EEPROM magic bytes.
[    9.120000] ath: EEPROM regdomain: 0x0
[    9.120000] ath: EEPROM indicates default country code should be used
[    9.120000] ath: doing EEPROM country->regdmn map search
[    9.120000] ath: country maps to regdmn code: 0x3a
[    9.120000] ath: Country alpha2 being used: US
[    9.120000] ath: Regpair used: 0x3a
[    9.130000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    9.140000] ieee80211 phy0: Atheros AR9280 Rev:2 mem=0xb0000000, irq=40
[   29.450000] device eth0 entered promiscuous mode
[   29.560000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   45.900000] eth0: link up (100Mbps/Full duplex)
[   45.950000] br-lan: port 1(eth0) entered forwarding state
[   46.020000] br-lan: port 1(eth0) entered forwarding state
[   46.080000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   48.020000] br-lan: port 1(eth0) entered forwarding state
[   79.460000] random: nonblocking pool is initialized

I am just working on EWS860AP and ENH1750EXT support.
I was able to fool web ui into accepting factory image but I am having issues with getting switch to properly work and serial write does not work.

EAP350 probably uses the same logic for flashing.
But it uses a lot weaker CPU.
Looks pretty simple so it would not much work getting it to work

Thanks robimarko for your response. Great to hear that you are working on the same line of devices. I have a simple requirement of installing coova-chilli package which depends on kmod-tun module but refuses to fulfill the dependency citing the following error. Since the official support is not available, I need to build it on my own and for that I need device profile. I hope I can get help from the great and hardworking LEDE developers and communities.

root@EAP350:/tmp# opkg install kmod-tun coova-chilli
Installing kmod-tun (3.10.49-1) to root...
Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base//kmod-tun_3.10.49-1_ar71xx.ipk.
Installing coova-chilli (1.3.0-5) to root...
Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/oldpackages//coova-chilli_1.3.0-5_ar71xx.ipk.
Installing kmod-tun (3.10.49-1) to root...
Configuring kmod-tun.
Configuring coova-chilli.
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-tun:
 *      kernel (= 3.10.49-1-0114c71ed85677c9c1e4911437af4743) *
 * opkg_install_cmd: Cannot install package kmod-tun.
root@EAP350:/tmp# opkg list-installed | grep coova
coova-chilli - 1.3.0-5
root@EAP350:/tmp# opkg list-installed | grep kmod-tun
kmod-tun - 3.10.49-1
root@EAP350:/tmp# insmod /lib/modules/3.10.49/tun.ko
kmod: failed to insert /lib/modules/3.10.49/tun.ko

It would be best to add support for this device to LEDE.
I can provide you help with that,but you gotta know that only thing that can prevent you from unrecoverable brick is full flash dump

It would be great if you can provide me any help in adding this device to support LEDE. Current firmware that is running on is downloaded from easywrt site. Like I mentioned above in my initial post, there are couple of issues like software dependency not meeting, dmesg and ubus error

root@EAP350:/# dmesg
dmesg: klogctl: Function not implemented
root@EAP350:/#

I am ready to share any other info required to get heads up in getting this device installed with LEDE

Thanks

Sure,I can help you.
EasyWRT is basically doing the same stuff as Engenius when it comes to GPL sources.
They take OpenWRT,Linux kernel and other stuff to make money and then refuse to release GPL sources.
According to Engenius they have released GPL for EAP350 but it does not contain kernel or openwrt sources.

Which version is your device?
v1 or v2?

Can you check if serial write works on your device?

I can share the GPL source for this device I got from their website but it looks useless. I will upload and send you zipped GPL source link ASAP.

Can you check if serial write works on your device?

Not sure how this can be be checked. I am novice in all this and have just ordered an UART USB cable today to see if I can go that deep to see device booting live. Sorry for that.

That GPL source is from what I can remember useless since it does not contain kernel or openwrt sources at all.
Since you just ordered UART you cant yet check if serial works

Also if it helps, I was able to get in to root shell (openwrt root shell) of factory fiirmware and I was amazed to see the openwrt KAMIKAZE in action.

That is good,take a dump of all partitions that way.

Easywrt based BB (14.07) which is currently running show following partitions

root@EAP350:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00050000 00010000 "custom"
mtd3: 00100000 00010000 "kernel"
mtd4: 004d0000 00010000 "rootfs"
mtd5: 00280000 00010000 "rootfs_data"
mtd6: 00180000 00010000 "failsafe"
mtd7: 00010000 00010000 "ART"

and factory firmware based partitions are similar as follows:

0x00000000-0x00040000 : "u-boot"
0x00040000-0x00050000 : "u-boot-env"
0x00050000-0x000a0000 : "custom"
0x000a0000-0x001a0000 : "kernel"
0x001a0000-0x00670000 : "rootfs"
mtd: partition "rootfs_data" created automatically, ofs=620000, len=50000
0x00620000-0x00670000 : "rootfs_data"
0x00670000-0x007f0000 : "failsafe"
0x007f0000-0x00800000 : "ART"

I meant take a dump of the content.
Simply use dd to dump them to /tmp and then copy using scp.

I don't know if this is correct way to take a dump. I did following and have transferred the folder containing dump to my pc.

dd if=/dev/mtd0 of=/tmp/backup/backup_mtd0.bkp
512+0 records in
512+0 records out
root@EAP350:/# dd if=/dev/mtd1 of=/tmp/backup/backup_mtd1.bkp
128+0 records in
128+0 records out
root@EAP350:/# dd if=/dev/mtd2 of=/tmp/backup/backup_mtd2.bkp
640+0 records in
640+0 records out
root@EAP350:/# dd if=/dev/mtd3 of=/tmp/backup/backup_mtd3.bkp
2048+0 records in
2048+0 records out
root@EAP350:/# dd if=/dev/mtd4 of=/tmp/backup/backup_mtd4.bkp
9856+0 records in
9856+0 records out
root@EAP350:/# dd if=/dev/mtd5 of=/tmp/backup/backup_mtd5.bkp
5120+0 records in
5120+0 records out
root@EAP350:/# dd if=/dev/mtd6 of=/tmp/backup/backup_mtd6.bkp
3072+0 records in
3072+0 records out
root@EAP350:/# dd if=/dev/mtd7 of=/tmp/backup/backup_mtd7.bkp
128+0 records in
128+0 records out
root@EAP350:/# du -h /tmp/backup/
10.5M   /tmp/backup/
root@EAP350:/# ls -a /tmp/backup/backup_mtd
backup_mtd0.bkp  backup_mtd2.bkp  backup_mtd4.bkp  backup_mtd6.bkp
backup_mtd1.bkp  backup_mtd3.bkp  backup_mtd5.bkp  backup_mtd7.bkp

Yeah, that will work.
But It is a better idea to use partition name for output, and .bin extension.
That way you don't have to have partition table to know which ones are which.

Can you send me the dumps to check if firmware upgrade scripts are the same.
Also,can you take a look at /sys/class/gpio and leds?

Boss is always boss. What a great idea to name the dump files. Cannot attach the zip file here directly. Please use this link. I'll get back to you ASAP on GPIO and leds

https://drive.google.com/file/d/1PIF4WODNSvFivqng4F0rhWqA1nUfydD5/view?usp=sharing

Ok, checked.
It uses a little simpler upgrade script but it should work with factory image generation in my tree.

But without serial it is not wise to try getting LEDE working

Thats great news. Let me see if I can borrow UART cable from nearby friends. I'll keep you posted on this as soon as I can

I got the UART usb yesterday late evening. I am trying to connect using putty on serial port9 as seen on device manager, it does not show up anything. I tried to connect raspberry pi serial to see if the UART usb converter is working or not, putty correctly came up with raspberry pi's boot sequence. Any help would be much appreciated. Attaching pic of EAP350 serial header here with.IMG_20180104_110251

First of all,use a multimeter to check which pin is which.
Usually VCC is marked with a box,that one you do not use.
After finding ground you can simply find out TX and RX by reversing them if they dont work.
Also baud rate is 115200,I hope you got 3.3V logic level USB to UART

I finally got the right pins and can see the boot log. A bit of issue is that my laptop gives BSOD (stop error) while the boot log progresses. I will try the same in a different pc later tonight and let you know the progress. Thank you