Skip to content
Christian edited this page Apr 3, 2018 · 18 revisions

/etc/banner

     MM           NM                    MMMMMMM          M       M
   $MMMMM        MMMMM                MMMMMMMMMMM      MMM     MMM
  MMMMMMMM     MM MMMMM.              MMMMM:MMMMMM:   MMMM   MMMMM
MMMM= MMMMMM  MMM   MMMM       MMMMM   MMMM  MMMMMM   MMMM  MMMMM'
MMMM=  MMMMM MMMM    MM       MMMMM    MMMM    MMMM   MMMMNMMMMM
MMMM=   MMMM  MMMMM          MMMMM     MMMM    MMMM   MMMMMMMM
MMMM=   MMMM   MMMMMM       MMMMM      MMMM    MMMM   MMMMMMMMM
MMMM=   MMMM     MMMMM,    NMMMMMMMM   MMMM    MMMM   MMMMMMMMMMM
MMMM=   MMMM      MMMMMM   MMMMMMMM    MMMM    MMMM   MMMM  MMMMMM
MMMM=   MMMM   MM    MMMM    MMMM      MMMM    MMMM   MMMM    MMMM
MMMM$ ,MMMMM  MMMMM  MMMM    MMM       MMMM   MMMMM   MMMM    MMMM
  MMMMMMM:      MMMMMMM     M         MMMMMMMMMMMM  MMMMMMM MMMMMMM
    MMMMMM       MMMMN     M           MMMMMMMMM      MMMM    MMMM
     MMMM          M                    MMMMMMM        M       M
       M
 ---------------------------------------------------------------
   For those about to rock... (QCA9558.LN, unknown)
 ---------------------------------------------------------------

/etc/openwrt_release

DISTRIB_ID="QSDK"
DISTRIB_RELEASE="QCA9558.LN"
DISTRIB_REVISION="unknown"
DISTRIB_CODENAME="premium_beeliner_router"
DISTRIB_TARGET="ar71xx/generic"
DISTRIB_DESCRIPTION="QSDK Premium Beeliner Router QCA9558.LN"

/etc/fw_env.config

/dev/mtd1 0x00000000 0x00010000 0x00010000

/proc/version

Linux version 3.3.8 (yanping.an@TctSwd) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Wed Nov 1 21:38:55 CST 2017

/proc/cpuinfo

system type             : Qualcomm Atheros QCA9531 rev 2
machine                 : Qualcomm Atheros AP147 reference board
processor               : 0
cpu model               : MIPS 24Kc V7.4
BogoMIPS                : 432.53
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0348, 0x0458, 0x0ce8]
ASEs implemented        : mips16
shadow register sets    : 1
kscratch registers      : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

/proc/meminfo

MemTotal:         126308 kB
MemFree:            7384 kB
Buffers:            4908 kB
Cached:            72568 kB
SwapCached:            0 kB
Active:            66220 kB
Inactive:          15948 kB
Active(anon):      36772 kB
Inactive(anon):        4 kB
Active(file):      29448 kB
Inactive(file):    15944 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          4712 kB
Mapped:             5676 kB
Shmem:             32084 kB
Slab:              23392 kB
SReclaimable:       9244 kB
SUnreclaim:        14148 kB
KernelStack:         688 kB
PageTables:          480 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       63152 kB
Committed_AS:      77516 kB
VmallocTotal:    1048372 kB
VmallocUsed:        1320 kB
VmallocChunk:    1030204 kB

/proc/cmdline

 board=AP147 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),1024k(oem),13504k(rootfs),1472k(kernel),64k(art),14976k@0x150000(firmware) rootfstype=squashfs,jffs2 noinitrd crashkernel=10M@20M oops=panic

/proc/consoles

ttyS0                -W- (EC   a)    4:64

/proc/devices

Character devices:
  1 mem
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
 10 misc
 13 input
 90 mtd
108 ppp
128 ptm
136 pts
180 usb
189 usb_device
252 sfe_ipv6
253 sfe_ipv4
254 ttyATH

Block devices:
259 blkext
  8 sd
 31 mtdblock
 65 sd
 66 sd
 67 sd
 68 sd
 69 sd
 70 sd
 71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd

/proc/diskstats

  31       0 mtdblock0 0 0 0 0 0 0 0 0 0 0 0
  31       1 mtdblock1 0 0 0 0 0 0 0 0 0 0 0
  31       2 mtdblock2 0 0 0 0 0 0 0 0 0 0 0
  31       3 mtdblock3 194 10284 20956 19580 0 0 0 0 0 16810 19580
  31       4 mtdblock4 1 3 32 0 0 0 0 0 0 0 0
  31       5 mtdblock5 0 0 0 0 0 0 0 0 0 0 0
  31       6 mtdblock6 7 18 200 70 0 0 0 0 0 60 70
  31       7 mtdblock7 0 0 0 0 0 0 0 0 0 0 0
   8       0 sda 12 56 308 100 1714 0 6916 3490 0 3560 3570

/proc/iomem

00000000-07ffffff : System RAM
  00060000-002ad37f : Kernel code
  002ad380-0034db7f : Kernel data
10000000-11ffffff : mem_base
  10000000-11ffffff : PCI memory space
14000000-14000fff : cfg_base
  14000000-14000fff : cfg_base
18020000-180200ff : serial8250.0
  18020000-1802001f : serial
180c0000-180c0fff : crp_base
  180c0000-180c0fff : crp_base
180f0000-180f00ff : ctrl_base
  180f0000-180f00ff : ctrl_base
18100000-1811ffff : qca953x_wmac
19000000-190001ff : mac_base
  19000000-190001ff : mdio_base
1a000000-1a0001ff : mac_base
  1a000000-1a0001ff : mdio_base
1b000000-1b0001ff : ehci-platform.0
  1b000000-1b0001ff : ehci_hcd
1f000000-1fffffff : ath79-spi

/proc/modules

fast_classifier 43797 0 - Live 0x85550000 (O)
smart_antenna 32414 0 - Live 0x860c8000 (PO)
ath_pktlog 15232 0 - Live 0x854f4000 (PO)
qca_da 161982 0 - Live 0x86340000 (O)
ath_dev 283270 1 qca_da, Live 0x86380000 (PO)
hst_tx99 7812 2 qca_da,ath_dev, Live 0x86efe000 (PO)
ath_rate_atheros 46918 2 qca_da,ath_dev, Live 0x861b0000 (PO)
ath_hal 717516 4 qca_da,ath_dev,hst_tx99,ath_rate_atheros, Live 0x86100000 (PO)
umac 1304692 6 smart_antenna,ath_pktlog,qca_da,ath_dev,ath_rate_atheros,ath_hal, Live 0x86200000 (O)
ath_spectral 29095 2 qca_da,ath_dev, Live 0x86f30000 (PO)
ath_dfs 56738 1 qca_da, Live 0x86f20000 (PO)
qdf 20954 9 ath_pktlog,qca_da,ath_dev,hst_tx99,ath_rate_atheros,ath_hal,umac,ath_spectral,ath_dfs, Live 0x86f08000 (O)
asf 6968 7 ath_pktlog,qca_da,ath_dev,ath_hal,umac,ath_spectral,ath_dfs, Live 0x86eae000 (PO)
mem_manager 5740 1 umac, Live 0x86efc000 (PO)
fuse 53661 0 - Live 0x86ee0000
rndis_host 4745 0 - Live 0x86ebc000
cdc_ether 3212 1 rndis_host, Live 0x86ea3000
usb_storage 34504 1 - Live 0x86eb0000
usbnet 13058 2 rndis_host,cdc_ether, Live 0x86ea4000
ath79_wdt 3392 1 - Live 0x86e9a000
ledtrig_netdev 3328 0 - Live 0x86e8d000
ip6t_REJECT 2400 0 - Live 0x86e6c000
ip6t_LOG 6224 0 - Live 0x86e8e000
ip6t_rt 1536 0 - Live 0x86e8c000
ip6t_hbh 1264 0 - Live 0x86e8a000
ip6t_mh 704 0 - Live 0x86e63000
ip6t_ipv6header 992 0 - Live 0x86e80000
ip6t_frag 864 0 - Live 0x86e83000
ip6t_eui64 704 0 - Live 0x86e73000
ip6t_ah 800 0 - Live 0x86e7c000
ip6table_raw 576 0 - Live 0x86e77000
ip6_queue 4064 0 - Live 0x86e79000
ip6table_mangle 944 0 - Live 0x86e71000
ip6table_filter 608 0 - Live 0x86e65000
ip6_tables 9612 9 ip6t_LOG,ip6t_rt,ip6t_hbh,ip6t_ipv6header,ip6t_frag,ip6t_ah,ip6table_raw,ip6table_mangle,ip6table_filter, Live 0x86e74000
nf_conntrack_ipv6 3920 0 - Live 0x86e6e000
nf_defrag_ipv6 4993 1 nf_conntrack_ipv6, Live 0x86e52000
ebt_ip6 1536 0 - Live 0x86e57000
ebt_snat 832 0 - Live 0x86e5f000
ebt_dnat 784 0 - Live 0x86e62000
ebt_arpreply 1024 0 - Live 0x86e60000
ebt_ip 1248 0 - Live 0x86e5e000
ebt_arp 1568 0 - Live 0x86e5b000
ebt_redirect 848 0 - Live 0x86e59000
ebt_mark 672 0 - Live 0x86e56000
ebt_vlan 912 0 - Live 0x86e2b000
ebt_stp 1824 0 - Live 0x86e4b000
ebt_pkttype 528 0 - Live 0x86e50000
ebt_mark_m 592 0 - Live 0x86e4e000
ebt_limit 896 0 - Live 0x86da0000
ebt_among 2032 0 - Live 0x86e4a000
ebt_802_3 672 0 - Live 0x86e47000
ebtable_nat 912 0 - Live 0x86e43000
ebtable_filter 912 0 - Live 0x86e23000
ebtable_broute 736 0 - Live 0x86e25000
ebtables 14213 3 ebtable_nat,ebtable_filter,ebtable_broute, Live 0x86e2c000
nf_nat_rtsp 3344 0 - Live 0x86dfe000 (O)
nf_conntrack_rtsp 4378 1 nf_nat_rtsp, Live 0x86df0000 (O)
xt_u32 960 0 - Live 0x86db6000
nf_nat_tftp 480 0 - Live 0x86dfa000
nf_conntrack_tftp 2432 1 nf_nat_tftp, Live 0x86da9000
nf_nat_snmp_basic 7024 0 - Live 0x86df8000
nf_conntrack_snmp 736 1 nf_nat_snmp_basic, Live 0x86de3000
nf_nat_sip 5200 0 - Live 0x86e0a000
nf_conntrack_sip 16237 1 nf_nat_sip, Live 0x86dec000
nf_nat_pptp 1376 0 - Live 0x86e0f000
nf_conntrack_pptp 3216 1 nf_nat_pptp, Live 0x86de9000
nf_nat_h323 4576 0 - Live 0x86db2000
nf_conntrack_h323 33647 1 nf_nat_h323, Live 0x86e00000
nf_nat_proto_gre 912 1 nf_nat_pptp, Live 0x86da3000
nf_conntrack_proto_gre 2629 1 nf_conntrack_pptp, Live 0x86dbf000
nf_nat_amanda 688 0 - Live 0x86db9000
nf_conntrack_amanda 1648 1 nf_nat_amanda, Live 0x86dbb000
nf_conntrack_broadcast 829 1 nf_conntrack_snmp, Live 0x86d8b000
nf_nat_irc 864 0 - Live 0x86db5000
nf_conntrack_irc 2560 1 nf_nat_irc, Live 0x86d9f000
nf_nat_ftp 1072 0 - Live 0x86daf000
nf_conntrack_ftp 4560 1 nf_nat_ftp, Live 0x86db0000
xt_HL 1296 0 - Live 0x86daa000
xt_hl 784 0 - Live 0x86da8000
xt_ecn 1248 0 - Live 0x86da5000
ipt_ECN 1344 0 - Live 0x86d9d000
xt_CLASSIFY 576 0 - Live 0x86d9c000
xt_time 1552 0 - Live 0x86d9a000
xt_tcpmss 976 0 - Live 0x86d95000
xt_statistic 768 0 - Live 0x86d88000
xt_mark 672 26 - Live 0x86d99000
xt_length 688 5 - Live 0x86d97000
xt_DSCP 1456 0 - Live 0x86d82000
xt_dscp 992 0 - Live 0x86d91000
xt_string 752 0 - Live 0x86d7c000
xt_layer7 9236 0 - Live 0x86d8c000
xt_quota 752 0 - Live 0x86d7f000
xt_pkttype 608 0 - Live 0x86d4b000
xt_physdev 1328 0 - Live 0x86d7b000
xt_owner 672 0 - Live 0x872ff000
ipt_REDIRECT 656 0 - Live 0x86d6d000
ipt_NETMAP 672 0 - Live 0x86d62000
ipt_MASQUERADE 1072 1 - Live 0x86d6a000
iptable_nat 2309 1 - Live 0x86d69000
nf_nat 10583 13 nf_nat_rtsp,nf_nat_tftp,nf_nat_sip,nf_nat_pptp,nf_nat_h323,nf_nat_proto_gre,nf_nat_amanda,nf_nat_irc,nf_nat_ftp,ipt_REDIRECT,ipt_NETMAP,ipt_MASQUERADE,iptable_nat, Live 0x86d70000
xt_recent 5840 0 - Live 0x86d66000
xt_helper 864 0 - Live 0x86d3f000
xt_connmark 1184 2 - Live 0x86d5c000
xt_connbytes 1520 0 - Live 0x86d5b000
xt_conntrack 2160 3 - Live 0x86d4c000
xt_CT 1408 0 - Live 0x87330000
xt_NOTRACK 544 0 - Live 0x86d4f000
iptable_raw 640 1 - Live 0x8733f000
xt_state 688 0 - Live 0x86d49000
nf_conntrack_ipv4 3972 8 iptable_nat,nf_nat, Live 0x873d2000
nf_defrag_ipv4 790 1 nf_conntrack_ipv4, Live 0x86d3e000
nf_conntrack 43586 34 fast_classifier,nf_conntrack_ipv6,nf_nat_rtsp,nf_conntrack_rtsp,nf_nat_tftp,nf_conntrack_tftp,nf_nat_snmp_basic,nf_conntrack_snmp,nf_nat_sip,nf_conntrack_sip,nf_nat_pptp,nf_conntrack_pptp,nf_nat_h323,nf_conntrack_h323,nf_conntrack_proto_gre,nf_nat_amanda,nf_conntrack_amanda,nf_conntrack_broadcast,nf_nat_irc,nf_conntrack_irc,nf_nat_ftp,nf_conntrack_ftp,xt_layer7,ipt_MASQUERADE,iptable_nat,nf_nat,xt_helper,xt_connmark,xt_connbytes,xt_conntrack,xt_CT,xt_NOTRACK,xt_state,nf_conntrack_ipv4, Live 0x86d50000
ehci_hcd 34320 0 - Live 0x86d40000
sd_mod 22400 1 - Live 0x86cf0000
ipt_REJECT 1888 2 - Live 0x8731c000
xt_TCPMSS 2640 2 - Live 0x86cde000
ipt_LOG 6304 0 - Live 0x87146000
xt_comment 480 0 - Live 0x873cf000
xt_multiport 1200 6 - Live 0x8718d000
xt_mac 608 0 - Live 0x86ce2000
xt_limit 1008 1 - Live 0x86d17000
iptable_mangle 928 1 - Live 0x8715a000
iptable_filter 672 1 - Live 0x8732b000
ip_tables 9149 4 iptable_nat,iptable_raw,iptable_mangle,iptable_filter, Live 0x86d34000
xt_tcpudp 1712 18 - Live 0x8737e000
x_tables 10997 72 ip6t_REJECT,ip6t_LOG,ip6t_rt,ip6t_hbh,ip6t_mh,ip6t_ipv6header,ip6t_frag,ip6t_eui64,ip6t_ah,ip6table_raw,ip6table_mangle,ip6table_filter,ip6_tables,ebt_ip6,ebt_snat,ebt_dnat,ebt_arpreply,ebt_ip,ebt_arp,ebt_redirect,ebt_mark,ebt_vlan,ebt_stp,ebt_pkttype,ebt_mark_m,ebt_limit,ebt_among,ebt_802_3,ebtables,xt_u32,xt_HL,xt_hl,xt_ecn,ipt_ECN,xt_CLASSIFY,xt_time,xt_tcpmss,xt_statistic,xt_mark,xt_length,xt_DSCP,xt_dscp,xt_string,xt_layer7,xt_quota,xt_pkttype,xt_physdev,xt_owner,ipt_REDIRECT,ipt_NETMAP,ipt_MASQUERADE,iptable_nat,xt_recent,xt_helper,xt_connmark,xt_connbytes,xt_conntrack,xt_CT,xt_NOTRACK,iptable_raw,xt_state,ipt_REJECT,xt_TCPMSS,ipt_LOG,xt_comment,xt_multiport,xt_mac,xt_limit,iptable_mangle,iptable_filter,ip_tables,xt_tcpudp, Live 0x86d38000
msdos 5696 0 - Live 0x873c2000
bonding 75207 0 - Live 0x86d20000
ifb 2576 0 - Live 0x87337000
pppoe 7712 0 - Live 0x872ea000
pppox 1370 1 pppoe, Live 0x86cef000
ppp_async 6064 0 - Live 0x8718e000
ppp_generic 19474 3 pppoe,pppox,ppp_async, Live 0x86d18000
slhc 4571 1 ppp_generic, Live 0x8731a000
vfat 7936 1 - Live 0x872e2000
fat 43550 2 msdos,vfat, Live 0x87320000
ntfs 90236 0 - Live 0x86d00000
ext4 246302 0 - Live 0x87340000
jbd2 41445 1 ext4, Live 0x872f0000
mbcache 4013 1 ext4, Live 0x87127000
button_hotplug 2768 0 - Live 0x873fe000 (O)
nls_iso8859_1 2880 1 - Live 0x871a8000
nls_cp437 4416 1 - Live 0x873c4000
usbcore 105442 6 rndis_host,cdc_ether,usb_storage,usbnet,ehci_hcd, Live 0x87300000
usb_common 562 1 usbcore, Live 0x873ca000
scsi_mod 76115 2 usb_storage,sd_mod, Live 0x873e0000
nls_base 5038 6 vfat,fat,ntfs,nls_iso8859_1,nls_cp437,usbcore, Live 0x86ce8000
ts_fsm 2640 0 - Live 0x873b9000
ts_bm 1408 0 - Live 0x871d8000
ts_kmp 1344 5 - Live 0x86cdd000
crc16 1015 1 ext4, Live 0x86ceb000
crc_ccitt 1019 1 ppp_async, Live 0x86ced000
ipv6 232257 66 fast_classifier,ip6t_REJECT,ip6_queue,ip6table_mangle,nf_conntrack_ipv6,nf_defrag_ipv6, Live 0x87380000
qca_ssdk 902235 0 - Live 0x86c00000 (O)
shortcut_fe_ipv6 51689 1 fast_classifier, Live 0x872d0000 (O)
shortcut_fe 50505 1 fast_classifier, Live 0x872c0000 (O)
ledtrig_timer 1152 0 - Live 0x87107000
ledtrig_default_on 496 0 - Live 0x87141000
leds_gpio 2800 0 - Live 0x8716c000
gpio_button_hotplug 3456 0 - Live 0x870f6000 (O)

/proc/mounts

rootfs / rootfs rw 0 0
/dev/root /rom squashfs ro,relatime 0 0
proc /proc proc rw,noatime 0 0
sysfs /sys sysfs rw,noatime 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,noatime,size=63156k 0 0
tmpfs /dev tmpfs rw,noatime,size=512k,mode=755 0 0
devpts /dev/pts devpts rw,noatime,mode=600 0 0
/dev/mtdblock4 /overlay jffs2 rw,noatime 0 0
overlayfs:/overlay / overlayfs rw,noatime,lowerdir=/,upperdir=/overlay 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
/dev/sda /cache vfat rw,sync,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
none /proc/bus/usb usbfs rw,relatime 0 0
/dev/mtdblock2 /oem jffs2 rw,noatime 0 0

/proc/mtd

dev:    size   erasesize  name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00100000 00010000 "oem"
mtd3: 00d30000 00010000 "rootfs"
mtd4: 002f0000 00010000 "rootfs_data"
mtd5: 00170000 00010000 "kernel"
mtd6: 00010000 00010000 "art"
mtd7: 00ea0000 00010000 "firmware"

/proc/partitions

major minor  #blocks  name

  31        0        256 mtdblock0
  31        1         64 mtdblock1
  31        2       1024 mtdblock2
  31        3      13504 mtdblock3
  31        4       3008 mtdblock4
  31        5       1472 mtdblock5
  31        6         64 mtdblock6
  31        7      14976 mtdblock7
   8        0      61440 sda

/etc/easycwmp/.backup.xml

<backup_file>  <cwmp>   <acs_url>https://lte.cpe-mgmt.at:7024/cwmpWeb/CPEMgt</acs_url>
  <event>    <event_number>0</event_number>
</event>
  <event>    <event_number>1</event_number>
</event>
</cwmp>
</backup_file>

/etc/defconfig/wndr3700/network (WTF‽)

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

config interface lan
	option ifname	eth0.1
	option type	bridge
	option proto	static
	option ipaddr	192.168.1.1
	option netmask	255.255.255.0

config interface wan
	option ifname	eth1
	option proto	dhcp

config switch
	option name	rtl8366s
	option reset	1
	option enable_vlan 1
	# Blinkrate: 0=43ms; 1=84ms; 2=120ms; 3=170ms; 4=340ms; 5=670ms
	option blinkrate	2

config switch_vlan
	option device	rtl8366s
	option vlan 	1
	option ports	"0 1 2 3 5t"

config switch_port
	# Port 1 controls the GREEN configuration of LEDs for
	# the switch and the section does not correspond to a real
	# switch port.
	#
	# 0=LED off; 1=Collision/FDX; 2=Link/activity; 3=1000 Mb/s;
	# 4=100 Mb/s; 5=10 Mb/s; 6=1000 Mb/s+activity; 7=100 Mb/s+activity;
	# 8=10 Mb/s+activity; 9=10/100 Mb/s+activity; 10: Fiber;
	# 11: Fault; 12: Link/activity(tx); 13: Link/activity(rx);
	# 14: Link (master); 15: separate register

	option device		rtl8366s
	option port		1
	option led		6

config switch_port
	# Port 2 controls the ORANGE configuration of LEDs for
	# the switch and the section does not correspond to a real
	# switch port.
	#
	# See the key above for switch port 1 for the meaning of the
	# 'led' setting below.
	
	option device		rtl8366s
	option port		2
	option led		9

config switch_port
	# Port 5 controls the configuration of the WAN LED and the
	# section does not correspond to a real switch port.
	#
	# To toggle the use of green or orange LEDs for the WAN port,
	# see the LED setting for wndr3700:green:wan in /etc/config/system.
	#
	# See the key above for switch port 1 for the meaning of the
	# 'led' setting below.

	option device		rtl8366s
	option port		5
	option led		2

/etc/hotplug.d/button/50-wps

#
# Copyright (c) 2014, The Linux Foundation. All rights reserved.
#
#  Permission to use, copy, modify, and/or distribute this software for any
#  purpose with or without fee is hereby granted, provided that the above
#  copyright notice and this permission notice appear in all copies.
#
#  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
#  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
#  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
#  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
#  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
#  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

if [ "$ACTION" = "pressed" -a "$BUTTON" = "wps" ]; then
	[ -r /var/run/wifi-wps-enhc-extn.conf ] && exit 0
	echo "" > /dev/console
	echo "WPS PUSH BUTTON EVENT DETECTED" > /dev/console
	for dir in /var/run/hostapd-*; do
                [ -d "$dir" ] || continue
                for vap_dir in $dir/ath* $dir/wlan*; do
                        [ -r "$vap_dir" ] || continue
                        backhaul=`iwpriv "${vap_dir#"$dir/"}"   get_backhaul |   cut -d':' -f2`
                        if [ $backhaul -eq 1 ];then
                                echo "wps_pbc" > /dev/console
                                echo "wps_pbc $SEEN" > /var/run/sonwps.pipe &
                                continue
                        fi
                        nopbn=`iwpriv "${vap_dir#"$dir/"}"   get_nopbn  |   cut -d':' -f2`
                        if [ $nopbn != 1 ]; then
                                hostapd_cli -i "${vap_dir#"$dir/"}" -p "$dir" wps_pbc
                        fi
                done
        done
fi

/etc/hotplug.d/button/51-wps-reset

#
#
# Copyright (c) 2014, The Linux Foundation. All rights reserved.
#
#  Permission to use, copy, modify, and/or distribute this software for any
#  purpose with or without fee is hereby granted, provided that the above
#  copyright notice and this permission notice appear in all copies.
#
#  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
#  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
#  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
#  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
#  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
#  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

if [ "$ACTION" = "released" -a "$BUTTON" = "wps" ]; then
	default_hold=3
	if [ -f /var/run/plchost.pid ]
	then
		default_hold=12
	fi
	if [ "$SEEN" -gt $default_hold ]; then
		echo "" > /dev/console
		echo "RESET TO FACTORY SETTING EVENT DETECTED" > /dev/console
		echo "PLEASE WAIT WHILE REBOOTING THE DEVICE..." > /dev/console
		rm -rf /overlay/*
		reboot
	fi
fi

/etc/hotplug.d/button/52-wps-supplicant

#
# Copyright (c) 2014, The Linux Foundation. All rights reserved.
#
#  Permission to use, copy, modify, and/or distribute this software for any
#  purpose with or without fee is hereby granted, provided that the above
#  copyright notice and this permission notice appear in all copies.
#
#  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
#  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
#  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
#  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
#  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
#  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
#

local pid
if [ "$ACTION" = "pressed" -a "$BUTTON" = "wps" ]; then
	[ -r /var/run/wifi-wps-enhc-extn.conf ] && exit 0
	for dir in /var/run/wpa_supplicant-*; do
		[ -d "$dir" ] || continue
		pid=/var/run/wps-hotplug-${dir#"/var/run/wpa_supplicant-"}.pid
		wpa_cli -p "$dir" wps_pbc
		[ -f $pid ] || {
			wpa_cli -p"$dir" -a/lib/wifi/wps-supplicant-update-uci -P$pid -B
		}
	done
fi

/etc/hotplug.d/button/54-wps-extender

#
# Copyright (c) 2015, The Linux Foundation. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

if [ "$ACTION" = "pressed" -a "$BUTTON" = "wps" ]; then
	local num

	[ -r /var/run/wifi-wps-enhc-extn.conf ] || exit 0
	echo "" > /dev/console
	echo "WPS PUSH BUTTON EVENT DETECTED" > /dev/console

	num=`grep -w "RADIO" /var/run/wifi-wps-enhc-extn.conf | wc -l`

	if [ -r /var/run/wifi-wps-enhc-extn.pid ]; then
		kill "$(cat "/var/run/wifi-wps-enhc-extn.pid")"
		sleep 1
	fi

	if [ -r /var/run/wifi-wps-enhc-extn.pid ]; then
		rm -f /var/run/wifi-wps-enhc-extn.pid
		exit 0
	fi

	echo "START APP TO HANDLE WPS PUSH BUTTON EVENT" > /dev/console
	/usr/sbin/wps_enhc -b /var/run/wifi-wps-enhc-extn.pid -n $num \
				-d 128 -l /var/run/wifi-wps-enhc-extn.log
fi

/etc/hotplug.d/net/10-ar922x-led-fix

#!/bin/sh

# For AR9220 and AR9223, GPIO JTAG must explicit be disabled
# before LEDs start working. Do this when wifi device is
# detected.

#
# $DEVPATH is not valid for some boards (including WZR-HP-AG300H).
# Manipulate the $DEVPATH to reach the corresponding phyN.
#

devdir=`dirname $DEVPATH`
devdir=`dirname $devdir`
phydir=/sys$devdir/ieee80211
phyname=`cat $phydir/phy*/name`

if [ -z $phyname -o $ACTION != "add" ]; then exit 0; fi

#
# ar922x_disable_gpio_jtag():
#
# Emulate
#       REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE);
# for AR9220 and AR9223.
#

ar922x_disable_gpio_jtag()                 
{                                          
        local regidx=0x4054               
        
	[ -f /sys/kernel/debug/ieee80211/$1/ath9k/regidx ] && {
		echo $regidx > /sys/kernel/debug/ieee80211/$1/ath9k/regidx
        	regval=`cat /sys/kernel/debug/ieee80211/$1/ath9k/regval`
        	regval=$((regval | 0x20000))
        	echo regval $regval
    		echo $regval > /sys/kernel/debug/ieee80211/$1/ath9k/regval
        }
}

if [ $phyname -a $ACTION = "add" ]; then

	. /lib/ar71xx.sh
	
	case $(ar71xx_board_name) in
		wzr-hp-ag300h)
			ar922x_disable_gpio_jtag $phyname
			;;
	esac;
fi

exit 0

/etc/config/easycwmp

config local
	option interface 'usb0'
	option port '7547'
	option ubus_socket '/var/run/ubus.sock'
	option date_format '%FT%T%z'
	option logging_level '4'
	option path '/kmhldonck'

config acs
	option periodic_enable '1'
	option http100continue_disable '1'
	option url 'https://lte.cpe-mgmt.at:7024/cwmpWeb/CPEMgt'
	option username 'AlcatelHH40'
	option password 'CENSORED-BY-KILLERBEES19'
	option periodic_interval '86400'

config device
	option manufacturer 'TCT Mobile Limited'
	option oui '002623'
	option product_class 'HUB40'
	option hardware_version 'example_hw_version'
	option software_version 'example_sw_version'
	option imsi ' '
	option nw_reg_state 'Unknown'

config scripts
	list location '/lib/functions/network.sh'
	list location '/usr/share/easycwmp/functions/common'
	list location '/usr/share/easycwmp/functions/device_info'
	list location '/usr/share/easycwmp/functions/lan_device'
	list location '/usr/share/easycwmp/functions/management_server'
	list location '/usr/share/easycwmp/functions/wan_device'
	list location '/usr/share/easycwmp/functions/time_info'
	list location '/usr/share/easycwmp/functions/device_hosts'
	list location '/usr/share/easycwmp/functions/ping_diagnostics'
	list location '/usr/share/easycwmp/functions/host_configManage'
	list location '/usr/share/easycwmp/functions/eth_InterfaceConfig'
	list location '/usr/share/easycwmp/functions/radio_info'
	list function 'device_info'
	list function 'lan_device'
	list function 'management_server'
	list function 'wan_device'
	list function 'time_info'
	list function 'ping_diagnostics'

config device_routing
	option DefaultConnectionService 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.'

config user_interface

config ping_diagnostics
	option DiagnosticsState 'None'
	option Interface 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1'
	option Host 'www.baidu.com'
	option NumberOfRepetitions '20'
	option Timeout '60000'
	option DataBlockSize '56'
	option DSCP '0'

config UdpEchoConfig
	option Enable '0'
	option Interface 'usb0'
	option UDPPort '9000'
	option EchoPlusEnabled '0'
	option EchoPlusSupported '1'

config DownloadDiagnostics
	option DiagnosticsState 'None'
	option Interface 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1'
	option DSCP '0'
	option EthernetPriority '0'

config UploadDiagnostics
	option DiagnosticsState 'None'
	option Interface 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1'
	option DSCP '0'
	option EthernetPriority '0'
	option TestFileLength '1024'

config notifications
	list active 'InternetGatewayDevice.DeviceInfo.SoftwareVersion'
	list active 'InternetGatewayDevice.DeviceInfo.ProvisioningCode'
	list active 'InternetGatewayDevice.ManagementServer.ConnectionRequestURL'

/.ssh/known_hosts

192.168.225.1 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDjq/BKiviJPGIzYB1BKKInOEBzeVLgLszjBVvVDXGZQvMVRk2tQyDUQO6mF7QnNNhk2USkD/IYT5rMgt6sg+1XtXk2sUGLuclCe70Ndyc5qPU8EOTPKpR0UugMHRy9mBlwEXGQUZNFyzDxff5ocIVTsIK2tBiZkSV5hAmfi/JJ1AJI56T+NDngj3y/dajWZd6voVv0ZeC6cpqubF8EAw9GMHoaoiBRGIMEkjiK9uCWdffbr7wjWDYAQM3xtO43xUp6by12VOLlwMcEy8OBiRdxjdcBhxgM59RSov1sWSeYGF//FScKZt/j+0eV+zQukAXWL7d1ts94mj/uJNzl27Yb

/bin/usb_switch_to

#! /bin/ash
GPIODIR="/sys/class/gpio"
#SWTICH_PORT=5
HOST_PWR_PORT=1
#MODEM_PWR_PORT=58

set -o errexit

set_gpio()
{
  gpio="gpio$1"
  echo "set gpio = ${gpio}"
  if [ ! -d ${GPIODIR}/${gpio} ];then
    echo $1 > ${GPIODIR}/export
    if [ ! -d ${GPIODIR}/${gpio}/ ];then
      echo "failed to get gpio"
    exit 0
    fi
  fi

  value=$(cat ${GPIODIR}/${gpio}/value)
  if [ "$value" != "$2" ];then
    direction=$(cat ${GPIODIR}/${gpio}/direction)
    if [ "$direction" != "out" ];then
      echo out > "${GPIODIR}/${gpio}/direction"
    fi
    echo $2 > "${GPIODIR}/${gpio}/value"
  fi
}

TARGET=$(echo $1|tr [a-z] [A-Z])

if [ "$TARGET" = "PC" ];then
  #set_gpio $SWTICH_PORT 0
  set_gpio $HOST_PWR_PORT 1
  #set_gpio $MODEM_PWR_PORT 1
  echo "swtich to pc"
elif [ "$TARGET" = "IPQ" ];then
  #set_gpio $SWTICH_PORT 1
  set_gpio $HOST_PWR_PORT 0
  #set_gpio $MODEM_PWR_PORT 1
  echo "swtich to ipq"
else
  echo "usage: usb_switch_to.sh pc or ipq"
fi

/bin/get_usage.sh

#!/bin/sh

# -*- coding: utf-8 -*-
# @Date    : 2017-01-17 16:10:48
# @Author  : subin.liu
# @Version : 01-17
#get the eth usage 

eth=$1 
rtx_type=$2
usage_form=$3
#form_table=("byte" "packet" "error" "discarded")
#form_word=("bytes" "packets" "errors" "dropped")

#for(( i=0;i<${#form_table[@]};i++)) 
#do
#    	if [ "$3" == "${form_table[i]}" ];then
#    		usage_form=${form_word[i]}
#	fi	 
#done

#echo $usage_form

if [ -z $eth ] || [ -z $rtx_type ] || [ -z $usage_form ];then
    echo "failed,please input three valid word"
    echo "arg1 valid word: eth0 eth1 ath0 ath1"
    echo "arg2 valid word: RX  TX"
    echo "arg3 valid word: bytes packets errors dropped"			
    exit 1
fi

eth_status=`ifconfig|grep $eth |wc -l`
#echo $eth_status


if [ "$eth_status" != "1" ];then
    echo "failed,$eth now not up"
    exit 1
fi


if [ "$usage_form" == "bytes" ];then
ifconfig $eth | grep -e 'RX bytes'|awk '{print $2}'|awk -F':' '{print $2}'
else
ifconfig $eth|grep -v 'bytes'|grep $rtx_type|awk -v word=$usage_form '{for(i=1;i<=NF;i++){if(match($i,word))print $i}}' |awk -v xx=$usage_form -F ':' '{print $2}'
fi

/etc/config/ubootenv

config ubootenv
        option dev '/dev/mtd1'
        option offset '0x00000000'
        option envsize '0x00010000'
        option secsize '0x00010000

/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 interface 'lan'
        option ifname 'eth1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'

config interface 'wan'
        option ifname 'usb0'
        option proto 'static'
        option ipaddr '192.168.225.111'
        option netmask '255.255.255.0'
        option gateway '192.168.225.1'
        option dns '192.168.225.1'

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

config interface 'wan2'
        option ifname 'eth0'
        option proto 'dhcp'
        option auto_wanlan '1'
        option auto_wl_time '10000'

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

config switch_vlan
        option device 'eth1'
        option vlan '1'
        option ports '0 1 2 3 4'

/cache/fota/_fota.log (IMEI included in TCL server request…)

2018/04/03 01:43:30 [INFO]    ############################################################
2018/04/03 01:43:30 [INFO]    OTU DLL Version 1.2.7, Build Id=2015032714, Protocol Id=20140122.
2018/04/03 01:43:30 [DEBUG]   GisusDllImpl::SWVersionRequest(model=FIRMWARE, com_ref=HH40V-2XA1ATX, upgrade_mode=2, client_type='1006')
2018/04/03 01:43:30 [DEBUG]   AMConnection::Execute: Connection #75cb4530: Request Execution Starting ... 
2018/04/03 01:43:30 [DEBUG]   AMConnection::Execute: Connection #75cb4530: We have to connect first to g2master-sa-east.tctmobile.com ... 
2018/04/03 01:43:30 [DEBUG]   AMConnection::TickConnect: Connection #75cb4530: Connection request to 'g2master-sa-east.tctmobile.com' done. Now waiting network feedback ... 
2018/04/03 01:43:30 [DEBUG]   AMConnection::Execute: Connection #75cb4530: Successfully connected to g2master-sa-east.tctmobile.com!
2018/04/03 01:43:30 [DEBUG]   AMConnection::Execute: Connection #75cb4530: Connected to g2master-sa-east.tctmobile.com! Now try to send request ... 
2018/04/03 01:43:30 [DEBUG]   AMConnection::Execute: Connection #75cb4530: . Now sending request 5 ... 
2018/04/03 01:43:30 [DEBUG]   AMConnection::TickVersionReq: Connection #75cb4530: now to contrubute to http msg !
2018/04/03 01:43:30 [DEBUG]   AMConnection::TickVersionReq: Connection #para=/check.php?id=CENSORED-BY-KILLERBEES19&curef=HH40V-2XA1ATX&fv=020023&type=FIRMWARE&mode=2&cltp=1006&cktd=0!
2018/04/03 01:43:30 [DEBUG]   AMConnection::TickVersionReq: Connection #75cb4530: Changed sub state from 0 to 1.
2018/04/03 01:43:30 [DEBUG]   GisusNetImpl::send_msg: #75cb4530:the msg after dump is: 
GET /check.php?id=CENSORED-BY-KILLERBEES19&curef=HH40V-2XA1ATX&fv=020023&type=FIRMWARE&mode=2&cltp=1006&cktd=0 HTTP/1.1
User-Agent: GOTU Client v1.2.7 Mifi_FOTA
Date: 2018/04/03 01:43:30 GMT+2
Cache-ontrol: no-cache
Accept: */*
HOST: g2master-sa-east.tctmobile.com
Connection: close

2018/04/03 01:43:30 [DEBUG]   AMConnection::TickVersionReq: Connection #75cb4530: Changed sub state from 1 to 2.
2018/04/03 01:43:30 [DEBUG]   AMConnection::TickVersionReq: Connection #75cb4530: VersionReq ('CENSORED-BY-KILLERBEES19','FIRMWARE','HH40V-2XA1ATX','020023','2', '1006') request sent.
2018/04/03 01:43:31 [ERROR]   GisusNetImpl::get_msg: #75cb4530: Failed to analyze message content with error code 12000 at location 8.
2018/04/03 01:43:31 [INFO]    AMConnection::TickVersionReq: Connection #75cb4530: Upgrade for current software is not available.
2018/04/03 01:43:31 [DEBUG]   AMConnection::Disconnect: Connection #75cb4530 Disconnecting.
2018/04/03 01:43:31 [INFO]    Shutting down O.T.U. Library ...
2018/04/03 01:43:31 [DEBUG]   AMConnection::Shutdown: Connection #758b4530 received shutdown request.
2018/04/03 01:43:31 [DEBUG]   AMConnection::Disconnect: Connection #758b4530 Disconnecting.
2018/04/03 01:43:31 [DEBUG]   AMConnection::Execute: Connection #758b4530 Terminated.
2018/04/03 01:43:31 [INFO]    O.T.U. Library: Succeeded to join AMreport!
2018/04/03 01:43:31 [DEBUG]   AMConnection::Shutdown: Connection #75cb4530 received shutdown request.
2018/04/03 01:43:31 [DEBUG]   AMConnection::Disconnect: Connection #75cb4530 Disconnecting.
2018/04/03 01:43:31 [DEBUG]   AMConnection::Execute: Connection #75cb4530 Terminated.
2018/04/03 01:43:31 [INFO]    O.T.U. Library: Succeeded to join AM!
2018/04/03 01:43:31 [DEBUG]   MultiDownloader::Shutdown: Thread shutdown has been requested.
2018/04/03 01:43:31 [DEBUG]   MultiDownloader:StopThreads #76537530: Starting.
2018/04/03 01:43:31 [DEBUG]   MultiDownloader:StopThreads #76537530: Finished.
2018/04/03 01:43:31 [DEBUG]   MultiDownloader:Execute #76537530: Processing loop has terminated.
2018/04/03 01:43:31 [INFO]    O.T.U. Library: Succeeded to join MD!
2018/04/03 01:43:31 [DEBUG]   ReqExecutor::Execute: Thread #75eb4530 thread has been terminated.
2018/04/03 01:43:31 [INFO]    O.T.U. Library: Succeeded to join ReqExecutor!
2018/04/03 01:43:31 [INFO]    O.T.U. Library: Great! No timer exists in scheduler after shut down all threads.
2018/04/03 01:43:31 [INFO]    O.T.U. Library has been shutdown!

/jrd-resource/resource/jrdcfg/jrd_version

INNER_version:HH40_ER_02.00_23
EXTERNAL_version:HH40_ER_02.00_23
PARTITION_version:HH40_PARTT_ER_02_8203a84
UBOOT_version:HH40_UBOOT_ER_02.00_03_2347910
SYSTEM_version:HH40_SYSTEM_ER_02.00_03_f90b5a9
JRDRESOURCE_version:HH40_JRDRESOURCE_ER_03_8203a84
WEBUI_version:HH40_WEBUI_ER_02.00_02_8203a84
KERNEL_version:HH40_KERNEL_ER_02.00_02_8203a84

/jrd-resource/resource/jrdcfg/usb_config.ini

;Usb config file

[UsbConfInfo]
FactoryMode=0
;F000:service switch,F017:bus switch,025E:FW auto switch
ReleaseInitPid=F000
FactoryInitPid=197
MacSwitchPid=191
WinSwitchPid=195
LinuxSwitchPid=195
SupportSD=1
RemoveMSAfterSwitch=0

[UsbStringInfo]
Manufacturer=Alcatel
ProductString=Mobilebroadband
SerialString=1234567890ABCDE
;MSVendorString max 8 Byte
MSVendorString=ONETOUCH
;MSProductString max 16 Byte
MSProductString=MobileBroadBand
;MSREV max 4 Byte
MSREV=2.31

/tmp/tmp_netstat

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:2601            0.0.0.0:*               LISTEN      2665/zebra
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1840/webs
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      2295/dnsmasq
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1546/dropbear
tcp        0      0 0.0.0.0:7547            0.0.0.0:*               LISTEN      3399/easycwmpd
tcp        0      0 192.168.225.111:55574   192.168.225.1:2016      ESTABLISHED 1840/webs
tcp        0      0 192.168.225.111:55575   192.168.225.1:2016      ESTABLISHED 1836/core_app
tcp        0      0 :::2601                 :::*                    LISTEN      2665/zebra
tcp        0      0 :::53                   :::*                    LISTEN      2295/dnsmasq
tcp        0      0 :::22                   :::*                    LISTEN      1546/dropbear
tcp        0      0 :::23                   :::*                    LISTEN      1652/telnetd

/jrd-resource/resource/jrdcfg/custom_info.xml

<custom_info version="1.0">
   <connection>
      <!-- AutoConnect: 
              0 - Manual
              1 - Auto
      -->
      <AutoConnect_value>1</AutoConnect_value>
      <!-- Roaming: 
              0 - roaming+national
              1 - roaming+international
      -->
			<Roaming_value>0</Roaming_value>
	</connection>
	<wifi>
		<psw_gen>
			<security_mode>
				<!-- security mode:
					0 - SEC_DISABLED
					1 - SEC_STATIC_WEP
					2 - SEC_WPA_PSK 
					3 - SEC_WPA2_PSK
					4 - SEC_MIXED_WPA_PSK 
				-->
				<security_mode_value>4</security_mode_value>
			</security_mode>
			<sec_sub_mode>
				<!-- security sub mode:
        if securtiy_mode is SEC_STATIC_WEP then
        	0 - OPEN_SYSTEM
					1 - SHARED_KEY
					
				if securtiy_mode is SEC_WPA_PSK/SEC_WPA2_PSK/SEC_MIXED_WPA_PSK then
        	0 - WPA_TKIP
					1 - WPA_CCMP
					2 - WPA_AUTO					
				-->
				<sec_sub_mode_value>2</sec_sub_mode_value>
			</sec_sub_mode>
			<psw_gen_type>
				<!-- password generate type:
					0 - no password
					1 - fixed pwd: the value is psw_fixed_pwd
					2 - based MAC addr, for example: the MAC address is "XX:XA:BC:DE:FG:HI"(A~I is in the range 0~F) a=(A^I)%10, b=(B^I)%10 ...... h=(H^I)%10
					    then the password is "abcdefgh"(a~h is in the range 0~9). if securtiy_mode is SEC_STATIC_WEP then the password is "defgh" 5 number
					3 - based IMEI last 8 number, if securtiy_mode is SEC_STATIC_WEP then based IMEI last 5 number
					4 - based MAC addr last 8 char, if securtiy_mode is SEC_STATIC_WEP then based MAC addr last 5 char
					5 - fixed_pwd_YYYY: sub_fixed_pwd is the following segment psw_sub_fixed_pwd_value, YYYY is last 4 digits of IMEI
				-->
				<psw_gen_type_value>3</psw_gen_type_value>
				<!-- len(psw_fixed_pwd)=8 -->
				<psw_fixed_pwd_value>1234567890</psw_fixed_pwd_value>
			</psw_gen_type>
		</psw_gen>
	</wifi>
	<login>
		<!-- Login username, len(username) < 32
		-->
		<username_value>admin</username_value>
		<!-- Login Password, len(passwd)< 32
		-->
		<passwd_value>admin</passwd_value>
		<!-- Language,len(lang)< 32
		-->
		<lang_value>en</lang_value>
	</login>
	<ssid>
			<ssid_gen_type>
				<!-- password generate type:
					1 - NO:     SSID = cust_model_name
					2 - MAC_L4: SSID = cust_model_name + mac_l4
					3 - MAC_L6: SSID = cust_model_name + mac_l6
					4 - MAC_F4: SSID = cust_model_name + mac_f4
					5 - IMEI_L4:SSID = cust_model_name + imei_l4
					6 - IMEI_F4:SSID = cust_model_name + imei_f4
					7 - VAR_MAC_L4:SSID = cust_model_name + variant + - + mac_l4
					8 - Guest SSID: Main SSID + "-guest"
					9 - IMEI_L2:SSID = cust_model_name + imei_l2
				-->
				<ssid_gen_type_value>7</ssid_gen_type_value>
				<cust_model_name_value>MW40</cust_model_name_value>
				<!-- ssid mode generate type:
				    1 - 2.4GHz only
					2 - 5GHz only
					3 - 2.4GHz and 5GHz
				-->
				<ssid_gen_mode>1</ssid_gen_mode>
			</ssid_gen_type>
	</ssid>
	<device_info>
		<dev_name_value>MW40</dev_name_value>
	</device_info>
	<SIMLOCK>
    <Code>
      <PN></PN>
      <PU></PU>
      <PP></PP>
      <PC></PC>
      <PF></PF>
    </Code>
    <Action>
      <PN>0</PN>
      <PU>0</PU>
      <PP>0</PP>
      <PC>0</PC>
      <PF>0</PF>
    </Action>
  </SIMLOCK>
</custom_info>

/jrd-resource/resource/jrdcfg/config.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!--File Name:config.xml -->
<CONTENT version="5.0" date="2016-12-21">
	  <!-- 0: auto generate config.xml, 1: manual generate config.xml -->
	  <Generate_Type>0</Generate_Type>
	  <Base_Info>
	  	<Project_Code>HH40</Project_Code>
	  	<Project_Name>HH40</Project_Name>
	  	<Customer_Code>ER</Customer_Code>
	  	<Customer_Name>A1</Customer_Name>
	  	<!--Baseline QCA4531 -->
	  	<Major_Version>02</Major_Version>
	  	<!--Baseline QCA4531 patch SBA numbers -->
	  	<Minor_Version>00</Minor_Version>
	  	<Release_Index>23</Release_Index>
	  	<Fota_Sub_Version>00</Fota_Sub_Version>
	  </Base_Info>
	  <Requirement_Rev>01</Requirement_Rev>
    <Variant_Code>V</Variant_Code>
    <CURef>HH40V-2XA1ATX</CURef>
    <Hardware>
 		   <PCB_Ver>V2.0</PCB_Ver>
 		   <RF_Device_Code>00</RF_Device_Code>
 		   <!-- RAM type 1: 0 - SDRAM, 1 DDR; RAM size 2-3: 0 32Mb 1 64Mb ...;  -->
 		   <RAM_Code>000</RAM_Code>
 		   <!-- Flash type 1: 0 - NOR, 1 NAND, 2 One-NAND, 3 eMMC_NAND; Vendor Code 2-3: 00 Tishiba, 01 Samsung, 02 Micron, 03 Hynix, 04 Nomonyx; Flash Size 4-5: 00 16Mb, 01 32Mb ...; Page Size 6-7: 00 512B, 01 1K ...-->
 		   <Flash_Code>1020803</Flash_Code>
    </Hardware>
    <Software>
    	<External_Ver>HH40_ER_02.00_23</External_Ver>
    	<Baseline_Independency>
          <PARTITION>HH40_PARTT_ER_02_8203a84</PARTITION>
          <JRDRESOURCE>HH40_JRDRESOURCE_ER_03_8203a84</JRDRESOURCE>
        </Baseline_Independency>
        <Baseline_Dependency>
          <UBOOT>HH40_UBOOT_ER_02.00_03_2347910</UBOOT>
          <SYSTEM>HH40_SYSTEM_ER_02.00_03_f90b5a9</SYSTEM>
          <KERNEL>HH40_KERNEL_ER_02.00_02_8203a84</KERNEL>
	      <JRDRESOURCE>HH40_JRDRESOURCE_ER_03_8203a84</JRDRESOURCE>
        </Baseline_Dependency>
    </Software>
</CONTENT>

/sys/devices/platform

ag71xx-mdio.0     ag71xx.0          alarmtimer        ath79-spi         ehci-platform.0   leds-gpio         serial8250        uevent
ag71xx-mdio.1     ag71xx.1          ar724x-pci.0      ath79-wdt         gpio-keys-polled  qca953x_wmac      serial8250.0