Moko BLE Gateway Documentation

Linux MT7628 3.10.14 #2 Thu Jul 2 15:14:32 CST 2020 mips GNU/Linux

root password hash

$1$e9bOqYjV$L1QRk9mdAJ2.ZplBCfZyL0

dmesg

DDR Calibration DQS reg = 00008989



U-Boot 1.1.3 (Jul  2 2020 - 15:11:02)


Board: Ralink APSoC DRAM:  128 MB

relocate_code Pointer at: 87fb4000

flash manufacture id: ef, device id 40 19

find flash: W25Q256FV

*** Warning - bad CRC, using default environment


============================================ 

Ralink UBoot Version: 4.3.0.0

-------------------------------------------- 

ASIC 7628_MP (Port5<->None)

DRAM component: 1024 Mbits DDR, width 16

DRAM bus: 16 bit

Total memory: 128 MBytes

Flash component: SPI Flash

Date:Jul  2 2020  Time:15:11:02

============================================ 

icache: sets:512, ways:4, linesz:32 ,total:65536

dcache: sets:256, ways:4, linesz:32 ,total:32768 


 ##### The CPU freq = 575 MHZ #### 

 estimate memory size =128 Mbytes

RESET MT7628 PHY!!!!!!

Please choose the operation: 

   1: Load system code to SDRAM via TFTP. 

   2: Load system code then write to Flash via TFTP. 

   3: Boot system code via Flash (default).

   4: Entr boot command line interface.

   7: Load Boot Loader code then write to Flash via Serial. 

   9: Load Boot Loader code then write to Flash via TFTP. 

 1  0 

   

3: System Boot system code via Flash.

## Booting image at bc050000 ...

   Image Name:   OpenWrt Linux-3.10.14

   Image Type:   MIPS Linux Kernel Image (lzma compressed)

   Data Size:    1259972 Bytes =  1.2 MB

   Load Address: 80000000

   Entry Point:  80000000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

No initrd

## Transferring control to Linux (at address 80000000) ...

## Giving linux memsize in MB, 128


Starting kernel ...



LINUX started...

 THIS IS ASIC

SDK 5.0.S.0
[    0.000000] Linux version 3.10.14 (pub@test-Inspiron-3670) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 unknown) ) #2 Thu Jul 2 15:14:32 CST 2020
[    0.000000] 
[    0.000000]  The CPU feqenuce set to 575 MHz
[    0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[    0.000000] Software DMA cache coherency
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
[    0.000000] Primary instruction cache 64kB, 4-way, VIPT, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS1,57600n8 root=/dev/mtdblock5 rootfstype=squashfs,jffs2 panic=3
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    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=0004a00d
[    0.000000] Readback ErrCtl register=0004a00d
[    0.000000] Memory: 126060k/131072k available (2740k kernel code, 4980k reserved, 690k data, 216k init, 0k highmem)
[    0.000000] NR_IRQS:128
[    0.000000] console [ttyS1] enabled
[    0.096000] Calibrating delay loop... 382.46 BogoMIPS (lpj=764928)
[    0.128000] pid_max: default: 32768 minimum: 301
[    0.132000] Mount-cache hash table entries: 512
[    0.136000] NET: Registered protocol family 16
[    0.140000] RALINK_GPIOMODE = 54050444 
[    0.144000] RALINK_GPIOMODE = 54040444 
[    0.244000] ***** Xtal 40MHz *****
[    0.248000] start PCIe register access
[    0.748000] RALINK_RSTCTRL = 2400000
[    0.752000] RALINK_CLKCFG1 = fdbfffc0
[    0.756000] 
[    0.756000] *************** MT7628 PCIe RC mode *************
[    1.256000] PCIE0 no card, disable it(RST&CLK)
[    1.284000] bio: create slab <bio-0> at 0
[    1.288000] usbcore: registered new interface driver usbfs
[    1.292000] usbcore: registered new interface driver hub
[    1.296000] usbcore: registered new device driver usb
[    1.300000] Switching to clocksource MIPS
[    1.304000] NET: Registered protocol family 2
[    1.316000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    1.328000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    1.340000] TCP: Hash tables configured (established 1024 bind 1024)
[    1.356000] TCP: reno registered
[    1.360000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.372000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.384000] NET: Registered protocol family 1
[    1.396000] MTK/Ralink EHCI/OHCI init.
[    1.404000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.416000] jffs2: version 2.2. (NAND) (SUMMARY)  (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.436000] msgmni has been set to 246
[    1.444000] io scheduler noop registered (default)
[    1.464000] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    1.476000] serial8250: ttyS0 at MMIO 0x10000d00 (irq = 21) is a 16550A
[    1.488000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    1.504000] serial8250: ttyS2 at MMIO 0x10000e00 (irq = 22) is a 16550A
[    1.516000] Ralink gpio driver initialized
[    1.528000] flash manufacture id: ef, device id 40 19
[    1.536000] W25Q256FV(ef 40190000) (32768 Kbytes)
[    1.548000] mtd .name = raspi, .size = 0x02000000 (32M) .erasesize = 0x00010000 (64K) .numeraseregions = 0
[    1.568000] Creating 5 MTD partitions on "raspi":
[    1.576000] 0x000000000000-0x000002000000 : "ALL"
[    1.588000] 0x000000000000-0x000000030000 : "Bootloader"
[    1.600000] 0x000000030000-0x000000040000 : "Config"
[    1.612000] 0x000000040000-0x000000050000 : "Factory"
[    1.624000] 0x000000050000-0x000002000000 : "firmware"
[    1.636000] 0x000000183a04-0x000002000000 : "rootfs"
[    1.644000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    1.672000] mtd: partition "rootfs_data" created automatically, ofs=0x730000, len=0x18d0000
[    1.688000] 0x000000730000-0x000002000000 : "rootfs_data"
[    1.700000] GMAC1_MAC_ADRH -- : 0x000068b9
[    1.708000] GMAC1_MAC_ADRL -- : 0xd3d197bd
[    1.716000] Ralink APSoC Ethernet Driver Initilization. v3.1  512 rx/tx descriptors allocated, mtu = 1500!
[    1.736000] GMAC1_MAC_ADRH -- : 0x000068b9
[    1.744000] GMAC1_MAC_ADRL -- : 0xd3d197bd
[    1.752000] PROC INIT OK!
[    1.760000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.772000] ehci-pci: EHCI PCI platform driver
[    1.780000] ehci-platform: EHCI generic platform driver
[    1.812000] ******MT7628 mtk phy
[    1.816000] *****run project phy.
[    1.832000] FM_OUT value: u4FmOut = 0(0x00000000)
[    1.848000] FM_OUT value: u4FmOut = 145(0x00000091)
[    1.856000] FM detection done! loop = 1
[    1.872000] SR calibration value u1SrCalVal = 6
[    1.880000] *********Execute mt7628_phy_init!!
[    1.888000] ehci-platform ehci-platform: EHCI Host Controller
[    1.900000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    1.916000] ehci-platform ehci-platform: irq 18, io mem 0x101c0000
[    1.940000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    1.952000] hub 1-0:1.0: USB hub found
[    1.960000] hub 1-0:1.0: 1 port detected
[    1.968000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    2.000000] *********Execute mt7628_phy_init!!
[    2.008000] ohci-platform ohci-platform: Generic Platform OHCI Controller
[    2.024000] ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
[    2.040000] ohci-platform ohci-platform: irq 18, io mem 0x101c1000
[    2.112000] hub 2-0:1.0: USB hub found
[    2.120000] hub 2-0:1.0: 1 port detected
[    2.128000] gre: GRE over IPv4 demultiplexor driver
[    2.136000] TCP: cubic registered
[    2.144000] NET: Registered protocol family 10
[    2.156000] NET: Registered protocol family 17
[    2.164000] 8021q: 802.1Q VLAN Support v1.8
[    2.172000] registered taskstats version 1
[    2.188000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    2.200000] Freeing unused kernel memory: 216K (8035a000 - 80390000)
[    2.344000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    2.780000] hub 1-1:1.0: USB hub found
[    2.788000] hub 1-1:1.0: 4 ports detected
procd: Console is alive
[    4.396000] SCSI subsystem initialized
[    4.412000] usbcore: registered new interface driver usb-storage
procd: - preinit -
[    5.320000] 68:FFFFFFB9:FFFFFFD3:FFFFFFD1:FFFFFF97:FFFFFFBD
[    5.332000] Raeth v3.1 (Tasklet,SkbRecycle)
[    5.344000] 
[    5.344000] phy_tx_ring = 0x07064000, tx_ring = 0xa7064000
[    5.356000] 
[    5.356000] phy_rx_ring0 = 0x07066000, rx_ring0 = 0xa7066000
[    5.388000] GMAC1_MAC_ADRH -- : 0x000068b9
[    5.396000] GMAC1_MAC_ADRL -- : 0xd3d197bd
[    5.404000] RT305x_ESW: Link Status Changed
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
[    9.348000] jffs2: notice: (250) jffs2_build_xattr_subsystem: complete building xattr subsystem, 4 of xdatum (0 unchecked, 3 orphan) and 36 of xref (0 dead, 27 orphan) found.
[    9.384000] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[    9.396000] block: unable to load configuration (fstab: Entry not found)
[    9.408000] block: attempting to load /tmp/jffs_cfg/etc/config/fstab
[    9.428000] block: extroot: not configured
jffs2 is ready
No jffs2 marker was found
[    9.556000] jffs2: notice: (247) jffs2_build_xattr_subsystem: complete building xattr subsystem, 4 of xdatum (0 unchecked, 3 orphan) and 36 of xref (0 dead, 27 orphan) found.
[    9.876000] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[    9.892000] block: unable to load configuration (fstab: Entry not found)
[    9.904000] block: attempting to load /tmp/jffs_cfg/etc/config/fstab
[    9.920000] block: extroot: not configured
switching to overlay
[    9.944000] ra2880stop()...Done
[    9.952000] Free TX/RX Ring Memory!
procd: - early -
procd: - ubus -
procd: - init -
Please press Enter to activate this console.
[   11.796000] NTFS driver 2.1.30 [Flags: R/O MODULE].
[   11.820000] l2tp_core: L2TP core driver, V2.0
[   11.828000] l2tp_netlink: L2TP netlink interface
[   11.844000] nf_conntrack version 0.5.0 (1973 buckets, 7892 max)
[   11.860000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.896000] cfg80211: Calling CRDA to update world regulatory domain
[   11.912000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.924000] Type=Linux
[   11.964000] Ralink APSoC Hardware Watchdog Timer
[   11.976000] rdm_major = 253
[   12.000000] xt_time: kernel timezone is -0000
[   16.904000] 68:FFFFFFB9:FFFFFFD3:FFFFFFD1:FFFFFF97:FFFFFFBD
[   16.916000] Raeth v3.1 (Tasklet,SkbRecycle)
[   16.924000] 
[   16.924000] phy_tx_ring = 0x0731a000, tx_ring = 0xa731a000
[   16.940000] 
[   16.940000] phy_rx_ring0 = 0x0731c000, rx_ring0 = 0xa731c000
[   16.968000] GMAC1_MAC_ADRH -- : 0x000068b9
[   16.976000] GMAC1_MAC_ADRL -- : 0xd3d197bd
[   16.984000] RT305x_ESW: Link Status Changed
[   17.012000] device eth0.2 entered promiscuous mode
[   17.020000] device eth0 entered promiscuous mode
[   17.100000] br-lan: port 1(eth0.2) entered forwarding state
[   17.108000] br-lan: port 1(eth0.2) entered forwarding state
[   18.972000] 
[   18.972000] 
[   18.972000] === pAd = c0816000, size = 1474120 ===
[   18.972000] 
[   18.988000] <-- RTMPAllocTxRxRingMemory, Status=0, ErrorValue=0x
[   19.004000] <-- RTMPAllocAdapterBlock, Status=0
[   19.012000] RtmpChipOpsHook(492): Not support for HIF_MT yet!
[   19.024000] mt7628_init()-->
[   19.028000] mt7628_init(FW(8a00), HW(8a01), CHIPID(7628))
[   19.040000] e2.bin mt7628_init(1117)::(2), pChipCap->fw_len(63056)
[   19.052000] mt_bcn_buf_init(218): Not support for HIF_MT yet!
[   19.064000] <--mt7628_init()
[   19.112000] br-lan: port 1(eth0.2) entered forwarding state
[   19.176000] TX_BCN DESC a6b94000 size = 320
[   19.184000] RX[0] DESC a6b9e000 size = 2048
[   19.196000] RX[1] DESC a6b9f000 size = 1024
[   19.332000] E2pAccessMode=1
[   19.340000] cfg_mode=9
[   19.344000] cfg_mode=9
[   19.348000] wmode_band_equal(): Band Equal!
[   19.360000] APSDCapable[0]=1
[   19.368000] APSDCapable[1]=1
[   19.372000] APSDCapable[2]=1
[   19.380000] APSDCapable[3]=1
[   19.384000] APSDCapable[4]=1
[   19.392000] APSDCapable[5]=1
[   19.396000] APSDCapable[6]=1
[   19.400000] APSDCapable[7]=1
[   19.408000] APSDCapable[8]=1
[   19.412000] APSDCapable[9]=1
[   19.420000] APSDCapable[10]=1
[   19.424000] APSDCapable[11]=1
[   19.432000] APSDCapable[12]=1
[   19.436000] APSDCapable[13]=1
[   19.444000] APSDCapable[14]=1
[   19.448000] APSDCapable[15]=1
[   19.456000] default ApCliAPSDCapable[0]=1
[   19.464000] default ApCliAPSDCapable[1]=1
[   19.672000] Key1Str is Invalid key length(0) or Type(0)
[   19.680000] Key2Str is Invalid key length(0) or Type(0)
[   19.692000] Key3Str is Invalid key length(0) or Type(0)
[   19.704000] Key4Str is Invalid key length(0) or Type(0)
[   19.920000] 08:cc:c9:9d:f1:dc:46:4a:de:31:f5:0c:de:e0:a3:1f:
[   19.932000] df:35:c2:b0:a8:be:e9:70:21:1c:eb:f2:b7:ef:4d:4c:
[   19.944000] 
[   19.948000] I/F(apcli0) Key1Str is Invalid key length!
[   20.000000] RTMPSetDefaultChannel() : default channel to 1 
[   20.012000] load fw image from fw_header_image
[   20.020000] AndesMTLoadFwMethod1(2174)::pChipCap->fw_len(63056)
[   20.032000] FW Version:_e2_mp����
[   20.040000] FW Build Date:20150211175503�
[   20.048000] CmdAddressLenReq:(ret = 0)
[   20.056000] CmdFwStartReq: override = 1, address = 1048576
[   20.068000] CmdStartDLRsp: WiFI FW Download Success
[   20.968000] CmdSlotTimeSet:(ret = 0)
procd: - init complete -
[   22.140000] MtAsicDMASchedulerInit(): DMA Scheduler Mode=0(LMAC)
[   22.152000] efuse_probe: efuse = 10000012
[   22.160000] RtmpChipOpsEepromHook::e2p_type=1, inf_Type=4
[   22.172000] RtmpEepromGetDefault::e2p_dafault=2
[   22.180000] RtmpChipOpsEepromHook: E2P type(2), E2pAccessMode = 1, E2P default = 2
[   22.196000] NVM is FLASH mode
[   22.200000] 1. Phy Mode = 14
[   22.392000] Country Region from e2p = ffff
[   22.400000] tssi_1_target_pwr_g_band = 32
[   22.408000] 2. Phy Mode = 14
[   22.416000] 3. Phy Mode = 14
[   22.420000] NICInitPwrPinCfg(11): Not support for HIF_MT yet!
[   22.432000] NICInitializeAsic(651): Not support rtmp_mac_sys_reset () for HIF_MT yet!
[   22.448000] mt_mac_init()-->
[   22.452000] MtAsicInitMac()-->
[   22.464000] mt7628_init_mac_cr()-->
[   22.468000] MtAsicSetMacMaxLen(1241): Set the Max RxPktLen=1024!
[   22.480000] <--mt_mac_init()
[   22.488000] 	WTBL Segment 1 info:
[   22.492000] 		MemBaseAddr/FID:0x28000/0
[   22.500000] 		EntrySize/Cnt:32/128
[   22.508000] 	WTBL Segment 2 info:
[   22.516000] 		MemBaseAddr/FID:0x40000/0
[   22.524000] 		EntrySize/Cnt:64/128
[   22.528000] 	WTBL Segment 3 info:
[   22.536000] 		MemBaseAddr/FID:0x42000/64
[   22.544000] 		EntrySize/Cnt:64/128
[   22.552000] 	WTBL Segment 4 info:
[   22.556000] 		MemBaseAddr/FID:0x44000/128
[   22.564000] 		EntrySize/Cnt:32/128
[   22.572000] AntCfgInit(2876): Not support for HIF_MT yet!
[   22.596000] MCS Set = ff 00 00 00 01
[   22.604000] MtAsicSetChBusyStat(826): Not support for HIF_MT yet!
[   26.036000] [PMF]ap_pmf_init:: apidx=0, MFPC=0, MFPR=0, SHA256=0
[   26.048000] [PMF]RTMPMakeRsnIeCap: RSNIE Capability MFPC=0, MFPR=0
[   26.060000] MtAsicSetRalinkBurstMode(2919): Not support for HIF_MT yet!
[   26.072000] MtAsicSetPiggyBack(763): Not support for HIF_MT yet!
[   26.108000] MtAsicSetTxPreamble(2898): Not support for HIF_MT yet!
[   26.124000] MtAsicAddSharedKeyEntry(1308): Not support for HIF_MT yet!
[   26.140000] MtAsicSetPreTbtt(): bss_idx=0, PreTBTT timeout = 0xf0
[   26.152000] Main bssid = 68:b9:d3:d1:97:bc
[   26.160000] <==== rt28xx_init, Status=0
[   26.172000] mt7628_set_ed_cca: TURN OFF EDCCA  mac 0x10618 = 0xd7083f0f
[   26.188000] WiFi Startup Cost (ra0): 7.012s
[   26.676000] device ra0 entered promiscuous mode
[   26.688000] br-lan: port 2(ra0) entered forwarding state
[   26.696000] br-lan: port 2(ra0) entered forwarding state

MoKo login: [   28.700000] br-lan: port 2(ra0) entered forwarding state

Flash image

Available here. root pw changed to c3letmein

BLE Flash image

Available here.