Add support for Mikrotik RB912UAG-2HPnD r2

seems like there is no SPI flash but NAND only, so best thing to do would be to dump NAND chip and find offset at which ART partition resides. then you can adjust above suggested address accordingly. also double check extraction scripts.

Look into previous post - there is spi flash. I can read it. I also added a small debug to check if it reads calibration data - and reads.

--- a/arch/mips/ath79/routerboot.c.orig 2019-10-01 09:05:50.738693999 +0200
+++ b/arch/mips/ath79/routerboot.c      2019-10-01 09:07:01.542693999 +0200
@@ -189,18 +189,24 @@
        size_t src_done;
        size_t dst_done;

+pr_err("debug: rb_get_wlan_data entry\n");
+
        err = rb_find_hard_cfg_tag(RB_ID_WLAN_DATA, &tag, &tag_len);
        if (err) {
                pr_err("no calibration data found\n");
                goto err;
        }

+pr_err("debug: calibration data found\n");
+
        buf = kmalloc(RB_ART_SIZE, GFP_KERNEL);
        if (buf == NULL) {
                pr_err("no memory for calibration data\n");
                goto err;
        }

+pr_err("debug: memory for calibration data - ok\n");
+
        magic = get_u32(tag);
        if (magic == RB_MAGIC_ERD) {
                u8 *erd_data;
@@ -235,6 +241,8 @@
                }
        }

+pr_err("debug: rb_get_wlan_data exit\n");
+
        return buf;

 err_free:
Tue Oct  1 07:15:31 2019 kern.err kernel: [    6.380000] rb: debug: rb_get_wlan_data entry
Tue Oct  1 07:15:31 2019 kern.err kernel: [    6.390000] rb: debug: calibration data found
Tue Oct  1 07:15:31 2019 kern.err kernel: [    6.390000] rb: debug: memory for calibration data - ok
Tue Oct  1 07:15:31 2019 kern.err kernel: [    6.400000] rb: debug: rb_get_wlan_data exit

still, check that script what it does with the data once read off the board, and verify that it does intended - add more printks if needed. i have this same soc in lbe5ac-gen2 and the wifi gets detected without troubles. did you try it on ath79 target?

Mikrotik is not exists in ath79.

and why is that? considering how messy it's code in ar71xx is it would benefit more than other manufacturers from porting to ath79. one more thing you could try is to load ath9k with debug set to show all messages. maybe it gives some clue

Well, is pretty much due to the fact that MikroTik support is usually much harder to achieve due to all of the workarounds needed.
And also, I started to work on some QCA953X based MT devices under ath79, but UART wont work on those even with hard config changed and RouterBoot actually offering UART.
Just take a look at IPQ40xx MikroTik support struggles.

@cezary Can you provide me with hard config dump so I can take a look at it?

@robimarko see
https://dl.eko.one.pl/test/rb912uag-2hpnd-out-r2/ for R2
https://dl.eko.one.pl/test/rb912uag-2hpnd-out for old (r1?)

Hm, they look really similar and tag 22 length is the same, but R2 apears to have tags 37 and 39 for which I have not found what they actually mean.

I just started working on the Basebox2 ath79 support, but I have the old R1

So is anybody able to make any support for Revision 2 devices? I managed to run everything apart from embedded wifi. It is not initialized and is even not discovered on any bus... I'm loking for help to solve this issue...

It looks like I have the same problem on rb951ui-2hnd r2. Support for Mikrotik rb951ui-2hnd r2

do you have any progress in solving the problem and how were you able to launch usb?

Check board. Maybe mikrotik changed something, added the latch or different gpio is used to activate usb power.

power supply on usb is present.

Good afternoon. I have a similar problem. I bought several Mikrotik RB912UAG-2HPnD r2 routers and decided to install OpenWrt. Some work fine, but in others I see errors in WiFi. I did not find big differences between routers. I tried to install the same firmware on each device, but the problem was not solved: iw dev and iw list did not return any data to the failed device, the wireless interface was not detected, and the item “Wireless” did not appear in web interface of the router. However, I decided to write to support@mikrotik.com (mailto: support@mikrotik.com) and decided to ask if there were any hardware updates in the last 4 months. To which they replied that over the past 4 months there were no updates.

I disassembled both devices - working and not working - and compared in hardware. Found the differences. (Ay-ah-ah, lying is bad).
I enclose photos and dmesg-logs of both routers.


and

log of not working:

[    0.000000] Linux version 4.9.184 (buildbot@c2c312384f99) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7808-ef686b7292) ) #0 Thu Jun 27 12:18:52 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9342 rev 3
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 8047fbb4, node_mem_map 81000020
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    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: 16256
[    0.000000] Kernel command line: parts=1 boot_part_size=4194304 gpio=130623 HZ=300000000 mem=64M kmac=74:4D:28:A9:42:A1 board=711Gr100 board=711Gr100 ver=3.41 hw_opt=00600005 boot=1 mlc=11 console=ttyS0,115200 rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 59836K/65536K available (3608K kernel code, 163K rwdata, 456K rodata, 244K init, 209K bss, 5700K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:600.000MHz, DDR:350.000MHz, AHB:350.000MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns
[    0.000010] sched_clock: 32 bits at 300MHz, resolution 3ns, wraps every 7158278654ns
[    0.008892] Calibrating delay loop... 299.82 BogoMIPS (lpj=1499136)
[    0.081966] pid_max: default: 32768 minimum: 301
[    0.087329] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.094854] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.106397] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.117625] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.126048] NET: Registered protocol family 16
[    0.135429] MIPS: machine is Mikrotik RouterBOARD 912UAG-2HPnD
[    0.387225] ar724x-pci ar724x-pci: PCIe link is down
[    0.392937] registering PCI controller with io_map_base unset
[    0.413959] PCI host bridge to bus 0000:00
[    0.418629] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.426483] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.432809] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.440519] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.449529] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.453608] clocksource: Switched to clocksource MIPS
[    0.460668] NET: Registered protocol family 2
[    0.466700] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.474689] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.481919] TCP: Hash tables configured (established 1024 bind 1024)
[    0.489265] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.495957] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.503357] NET: Registered protocol family 1
[    0.508400] PCI: CLS 0 bytes, default 32
[    0.511939] Crashlog allocated RAM at address 0x3f00000
[    0.519379] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.534317] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.540942] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.564105] io scheduler noop registered
[    0.568566] io scheduler deadline registered (default)
[    0.574947] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.585196] console [ttyS0] disabled
[    0.609437] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    0.619248] console [ttyS0] enabled
[    0.626808] bootconsole [early0] disabled
[    0.643410] m25p80 spi0.0: found w25x05, expected m25p80
[    0.660656] m25p80 spi0.0: w25x05 (64 Kbytes)
[    0.665742] Creating 4 MTD partitions on "spi0.0":
[    0.670711] 0x000000000000-0x00000000c000 : "routerboot"
[    0.678598] 0x00000000c000-0x00000000d000 : "hard_config"
[    0.686658] 0x00000000d000-0x00000000e000 : "bios"
[    0.694103] 0x00000000e000-0x00000000f000 : "soft_config"
[    0.702512] NAND flash driver for the RouterBOARD 91x series
[    0.710693] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[    0.717319] nand: Winbond W29N01HV
[    0.720841] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.728720] Scanning device for bad blocks
[    0.797745] Creating 3 MTD partitions on "W29N01HV":
[    0.802900] 0x000000000000-0x000000040000 : "booter"
[    0.810356] 0x000000040000-0x000000400000 : "kernel"
[    0.818092] 0x000000400000-0x000008000000 : "ubi"
[    0.829452] libphy: Fixed MDIO Bus: probed
[    0.843869] libphy: ag71xx_mdio: probed
[    1.574120] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd074, driver=Atheros 8031 ethernet]
[    1.585270] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    1.596201] NET: Registered protocol family 10
[    1.604801] NET: Registered protocol family 17
[    1.609459] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.622898] 8021q: 802.1Q VLAN Support v1.8
[    1.632039] UBI: auto-attach mtd6
[    1.635574] ubi0: attaching mtd6
[    1.905168] ubi0: scanning is finished
[    1.925881] ubi0: attached mtd6 (name "ubi", size 124 MiB)
[    1.931561] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    1.938725] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    1.945752] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    1.952936] ubi0: good PEBs: 992, bad PEBs: 0, corrupted PEBs: 0
[    1.959152] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    1.966628] ubi0: max/mean erase counter: 54/23, WL threshold: 4096, image sequence number: 1856540092
[    1.976248] ubi0: available PEBs: 0, total reserved PEBs: 992, PEBs reserved for bad PEB handling: 20
[    1.985874] ubi0: background thread "ubi_bgt0d" started, PID 331
[    1.994157] block ubiblock0_1: created from ubi0:1(rootfs)
[    1.999836] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    2.015949] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    2.025131] Freeing unused kernel memory: 244K
[    2.029721] This architecture does not have kernel memory protection.
[    2.038577] random: fast init done
[    2.624319] init: Console is alive
[    2.628117] init: - watchdog -
[    3.570307] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.640558] usbcore: registered new interface driver usbfs
[    3.646396] usbcore: registered new interface driver hub
[    3.651991] usbcore: registered new device driver usb
[    3.663786] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.672427] ehci-platform: EHCI generic platform driver
[    3.678016] ehci-platform ehci-platform: EHCI Host Controller
[    3.684040] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    3.694358] ehci-platform ehci-platform: TX-TX IDP fix enabled
[    3.700406] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    3.733634] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    3.741166] hub 1-0:1.0: USB hub found
[    3.745524] hub 1-0:1.0: 1 port detected
[    3.753022] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    3.761129] ohci-platform: OHCI generic platform driver
[    3.767500] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.785559] init: - preinit -
[    4.466548] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    4.497518] random: procd: uninitialized urandom read (4 bytes read)
[    6.585400] eth0: link up (100Mbps/Full duplex)
[    6.590128] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.752022] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 399
[    7.825120] UBIFS (ubi0:2): recovery needed
[    7.989856] UBIFS (ubi0:2): recovery completed
[    7.995060] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[    8.003155] UBIFS (ubi0:2): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    8.013424] UBIFS (ubi0:2): FS size: 117325824 bytes (111 MiB, 924 LEBs), journal size 5840896 bytes (5 MiB, 46 LEBs)
[    8.024393] UBIFS (ubi0:2): reserved for root: 4952683 bytes (4836 KiB)
[    8.031229] UBIFS (ubi0:2): media format: w4/r0 (latest is w4/r0), UUID 2A2FEC3D-3E0B-4257-839E-E1FE8782B80B, small LPT model
[    8.047130] mount_root: switching to ubifs overlay
[    8.085362] urandom-seed: Seeding with /etc/urandom.seed
[    8.274332] eth0: link down
[    8.291205] procd: - early -
[    8.294474] procd: - watchdog -
[    8.946158] procd: - watchdog -
[    8.949734] procd: - ubus -
[    9.054693] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.065014] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.072263] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.079992] procd: - init -
[    9.519003] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.531454] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    9.552400] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[    9.560755] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[    9.571322] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.587738] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    9.660059] xt_time: kernel timezone is -0000
[    9.730773] PPP generic driver version 2.4.2
[    9.738208] NET: Registered protocol family 24
[    9.787681] kmodloader: done loading kernel modules from /etc/modules.d/*
[   11.475053] urandom_read: 5 callbacks suppressed
[   11.475062] random: jshn: uninitialized urandom read (4 bytes read)
[   21.947882] br-lan: port 1(eth0) entered blocking state
[   21.953301] br-lan: port 1(eth0) entered disabled state
[   21.959205] device eth0 entered promiscuous mode
[   21.988241] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   24.025173] eth0: link up (100Mbps/Full duplex)
[   24.029929] br-lan: port 1(eth0) entered blocking state
[   24.035371] br-lan: port 1(eth0) entered forwarding state
[   24.063709] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   72.393656] random: crng init done

and log of working:

[    0.000000] Linux version 4.9.184 (buildbot@c2c312384f99) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7808-ef686b7292) ) #0 Thu Jun 27 12:18:52 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9342 rev 3
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 8047fbb4, node_mem_map 81000020
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    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: 16256
[    0.000000] Kernel command line: parts=1 boot_part_size=4194304 gpio=130623 HZ=300000000 mem=64M kmac=74:4D:28:10:53:01 board=711Gr100 board=711Gr100 ver=3.41 hw_opt=00600005 boot=1 mlc=11 console=ttyS0,115200 rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 59836K/65536K available (3608K kernel code, 163K rwdata, 456K rodata, 244K init, 209K bss, 5700K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:600.000MHz, DDR:350.000MHz, AHB:350.000MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns
[    0.000010] sched_clock: 32 bits at 300MHz, resolution 3ns, wraps every 7158278654ns
[    0.008892] Calibrating delay loop... 299.82 BogoMIPS (lpj=1499136)
[    0.081967] pid_max: default: 32768 minimum: 301
[    0.087330] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.094854] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.106398] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.117626] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.126050] NET: Registered protocol family 16
[    0.135430] MIPS: machine is Mikrotik RouterBOARD 912UAG-2HPnD
[    0.388434] ar724x-pci ar724x-pci: PCIe link is down
[    0.394139] registering PCI controller with io_map_base unset
[    0.415345] PCI host bridge to bus 0000:00
[    0.420018] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.427880] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.434198] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.441917] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.450927] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.455007] clocksource: Switched to clocksource MIPS
[    0.462072] NET: Registered protocol family 2
[    0.468108] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.476096] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.483327] TCP: Hash tables configured (established 1024 bind 1024)
[    0.490671] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.497363] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.504766] NET: Registered protocol family 1
[    0.509806] PCI: CLS 0 bytes, default 32
[    0.513413] Crashlog allocated RAM at address 0x3f00000
[    0.520853] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.535792] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.542412] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.565711] io scheduler noop registered
[    0.570170] io scheduler deadline registered (default)
[    0.576550] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.586793] console [ttyS0] disabled
[    0.611034] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    0.620846] console [ttyS0] enabled
[    0.628405] bootconsole [early0] disabled
[    0.645268] m25p80 spi0.0: found w25x05, expected m25p80
[    0.662299] m25p80 spi0.0: w25x05 (64 Kbytes)
[    0.667399] Creating 4 MTD partitions on "spi0.0":
[    0.672371] 0x000000000000-0x00000000c000 : "routerboot"
[    0.680257] 0x00000000c000-0x00000000d000 : "hard_config"
[    0.688335] 0x00000000d000-0x00000000e000 : "bios"
[    0.695805] 0x00000000e000-0x00000000f000 : "soft_config"
[    0.704232] NAND flash driver for the RouterBOARD 91x series
[    0.710365] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xf1
[    0.716947] nand: Toshiba NAND 128MiB 3,3V 8-bit
[    0.721720] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.729583] Scanning device for bad blocks
[    0.859822] Bad eraseblock 768 at 0x000006000000
[    0.906617] Creating 3 MTD partitions on "NAND 128MiB 3,3V 8-bit":
[    0.913029] 0x000000000000-0x000000040000 : "booter"
[    0.920483] 0x000000040000-0x000000400000 : "kernel"
[    0.928224] 0x000000400000-0x000008000000 : "ubi"
[    0.939615] libphy: Fixed MDIO Bus: probed
[    0.954060] libphy: ag71xx_mdio: probed
[    1.685520] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd074, driver=Atheros 8031 ethernet]
[    1.696671] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    1.707637] NET: Registered protocol family 10
[    1.716263] NET: Registered protocol family 17
[    1.720921] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.734363] 8021q: 802.1Q VLAN Support v1.8
[    1.742796] UBI: auto-attach mtd6
[    1.746329] ubi0: attaching mtd6
[    2.051709] ubi0: scanning is finished
[    2.072909] ubi0: attached mtd6 (name "ubi", size 124 MiB)
[    2.078650] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    2.085771] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    2.092778] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    2.099979] ubi0: good PEBs: 991, bad PEBs: 1, corrupted PEBs: 0
[    2.106197] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    2.113659] ubi0: max/mean erase counter: 7/3, WL threshold: 4096, image sequence number: 861613250
[    2.123015] ubi0: available PEBs: 0, total reserved PEBs: 991, PEBs reserved for bad PEB handling: 19
[    2.132643] ubi0: background thread "ubi_bgt0d" started, PID 332
[    2.140885] block ubiblock0_1: created from ubi0:1(rootfs)
[    2.146638] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    2.162558] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    2.171753] Freeing unused kernel memory: 244K
[    2.176388] This architecture does not have kernel memory protection.
[    2.193622] random: fast init done
[    2.774366] init: Console is alive
[    2.778255] init: - watchdog -
[    3.726483] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.796464] usbcore: registered new interface driver usbfs
[    3.802215] usbcore: registered new interface driver hub
[    3.807889] usbcore: registered new device driver usb
[    3.819944] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.828643] ehci-platform: EHCI generic platform driver
[    3.834163] ehci-platform ehci-platform: EHCI Host Controller
[    3.840214] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    3.850532] ehci-platform ehci-platform: TX-TX IDP fix enabled
[    3.856598] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    3.885031] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    3.892533] hub 1-0:1.0: USB hub found
[    3.896951] hub 1-0:1.0: 1 port detected
[    3.904377] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    3.912429] ohci-platform: OHCI generic platform driver
[    3.918816] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.936873] init: - preinit -
[    4.618845] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    4.649916] random: procd: uninitialized urandom read (4 bytes read)
[    6.746588] eth0: link up (100Mbps/Full duplex)
[    6.751322] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.894389] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 400
[    7.968619] UBIFS (ubi0:2): recovery needed
[    8.140727] UBIFS (ubi0:2): recovery completed
[    8.145498] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[    8.153587] UBIFS (ubi0:2): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    8.163857] UBIFS (ubi0:2): FS size: 117325824 bytes (111 MiB, 924 LEBs), journal size 5840896 bytes (5 MiB, 46 LEBs)
[    8.174826] UBIFS (ubi0:2): reserved for root: 4952683 bytes (4836 KiB)
[    8.181675] UBIFS (ubi0:2): media format: w4/r0 (latest is w4/r0), UUID 17CACEC7-E07F-4463-830C-64D72CE18477, small LPT model
[    8.198793] mount_root: switching to ubifs overlay
[    8.237177] urandom-seed: Seeding with /etc/urandom.seed
[    8.426539] eth0: link down
[    8.443437] procd: - early -
[    8.446629] procd: - watchdog -
[    9.099696] procd: - watchdog -
[    9.103286] procd: - ubus -
[    9.209376] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.220046] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.227369] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.235265] procd: - init -
[    9.674338] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.686721] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    9.707520] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[    9.715855] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[    9.726474] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.742789] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    9.816745] xt_time: kernel timezone is -0000
[    9.891643] PPP generic driver version 2.4.2
[    9.899038] NET: Registered protocol family 24
[    9.956025] ath: EEPROM regdomain: 0x0
[    9.956036] ath: EEPROM indicates default country code should be used
[    9.956040] ath: doing EEPROM country->regdmn map search
[    9.956057] ath: country maps to regdmn code: 0x3a
[    9.956063] ath: Country alpha2 being used: US
[    9.956066] ath: Regpair used: 0x3a
[    9.969793] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    9.974704] ieee80211 phy0: Atheros AR9340 Rev:3 mem=0xb8100000, irq=47
[   10.017538] kmodloader: done loading kernel modules from /etc/modules.d/*
[   11.178127] urandom_read: 5 callbacks suppressed
[   11.178137] random: jshn: uninitialized urandom read (4 bytes read)
[   21.413490] br-lan: port 1(eth0) entered blocking state
[   21.418974] br-lan: port 1(eth0) entered disabled state
[   21.424794] device eth0 entered promiscuous mode
[   21.466692] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   23.485421] eth0: link up (100Mbps/Full duplex)
[   23.495160] br-lan: port 1(eth0) entered blocking state
[   23.500581] br-lan: port 1(eth0) entered forwarding state
[   23.516194] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   82.745056] random: crng init done

To simplify the analysis, I will say that in a good router (with working WiFi) there are lines that are not in another:

[    9.956025] ath: EEPROM regdomain: 0x0
[    9.956036] ath: EEPROM indicates default country code should be used
[    9.956040] ath: doing EEPROM country->regdmn map search
[    9.956057] ath: country maps to regdmn code: 0x3a
[    9.956063] ath: Country alpha2 being used: US
[    9.956066] ath: Regpair used: 0x3a
[    9.969793] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    9.974704] ieee80211 phy0: Atheros AR9340 Rev:3 mem=0xb8100000, irq=47

I hope that I will help, and you will help me.

1 Like

switches / jumpers? -> 912

( the long way ) boot with max loglevel and/or build with ATHDEBUG if available...

Hi,

Clear info!
I would like to offer some help here to get this fixed.
Would you be willing to send me the 2 boards for analysis to my address?
I would send them back at any time you want afterwards.

We have dozens of boards similar to this (rb912 and rb922) but they are the 5Ghz versions and we didnt encounter this so far.
But it seems we could if 912 5ghz would have r2 flavours suddenly ..

Thank you,

Koen

I'm afraid not. I live in Russia and there are big delivery problems. Also, the problem seems to be clearing up.
There is an assumption that the transceiver does not work because the routers were started without antennas. With such a start, it is very likely that the transceiver will burn out, and this probability increases with each second of such work. When you try to turn on the wireless interface, a voltage is applied to the network module, which, if no antennas are connected, can burn this module.
Somewhere on the expanses of the Mikrotik forum there is a warning that the antennas should be installed the first time you turn on the RB912UAG-2HPnD r2.

The problem is not with the antennas. Try to read the dump from the flash memory of the working device and upload it to the device where the wifi does not work.

you'd still get a working interface, limited to a range of a meter or two at most

I just received a new batch of 912 boards here at the office .. and they are v2.
I'm seeing the issue now.

The only visual differences are:

  • 2 different capacitors
  • different start of MAC
  • different sticker font

Picture:
http://www.xback.be/rb912v2_1.jpg

I'll check what can be done to support these ..

In my version there is also another chip for voltage monitoring, the old version has ne555 near the SIM card slot, new - ZT2046Q like wap lte.