OpenWrt Forum Archive

Topic: Comtrend WAP-5813n. Boot-OK, but no access to 192.168.1.1 static

The content of this topic has been archived on 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

My Comtrend WAP-5813n version a bit differs from oficially supported and so problem arised (error - partitions extend beyond the end of device):
BCM96368 vs BCM96369
32MB RAM vs 64MB RAM
4MB flash vs 8MB flash

I'm new, but already know how to compile custom openwrt and to use serial connection using Putty. I created firmware using lede-imagebuilder-17.01.2-brcm63xx-smp.Linux-x86_64.tar.xz. I changed offsets in wap-5813n.dts according to other 4MB flash BCM63xx routers before compiling:

cfe@0 {
        label = "CFE";
        reg = <0x000000 0x010000>;
        read-only;
    };

    linux@10000 {
        label = "linux";
        reg = <0x010000 0x3e0000>;
    };

    nvram@3f0000 {
        label = "nvram";
        reg = <0x3f0000 0x010000>;

And changed profile to 4MB in bcm63xx.mk

define Device/WAP-5813n
  $(Device/bcm63xx)
  DEVICE_TITLE := Comtrend WAP-5813n
  DEVICE_DTS := wap-5813n
  CFE_BOARD_ID := 96369R-1231N
  CFE_CHIP_ID := 6368
  FLASH_MB := 4
  DEVICE_PACKAGES := \
    $(B43_PACKAGES) $(USB2_PACKAGES)
endef

Here is LEDE 17.01.2 bootlog via serial connection:

CFE>
Flashing root file system and kernel at 0xb8010000: ......................................
*** Image flash done *** !
Resetting board...

CFE version 1.0.37-106.5-6 for BCM96368 (32bit,SP,BE)
Build Date: Thu Apr 29 17:22:55 CST 2010 (asdrick@rd5-linux)
Copyright (C) 2000-2009 Broadcom Corporation.

Parallel flash device: name MX29LV320AB, id 0x22a8 size 4096KB
Total Flash size: 4096K with 71 sectors
ethsw: found bcm53115!
Chip ID: BCM6369B2, MIPS: 400MHz
Main Thread: TP0
Total Memory: 33554432 bytes (32MB)
Boot Address: 0xb8000000

Board IP address                  : 192.168.1.1:ffffff00
Host IP address                   : 192.168.1.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id (0-15)                   : 96369R-1231N
Number of MAC Addresses (1-32)    : 5
Base MAC Address                  : 64:68:0c:c7:08:78
PSI Size (1-64) KBytes            : 24
Enable Backup PSI [0|1]           : 0
System Log Size (0-256) KBytes    : 0
Main Thread Number [0|1]          : 0
Serial Number                     : 0
Voice Board Configuration (0-19)  : MVWG

*** Press any key to stop auto run (1 seconds) ***
Auto run second count down: 0
Booting from only image (0xb8010000) ...
Code Address: 0x80A00000, Entry Address: 0x80a00000
LZMA: Prossible old LZMA format, trying to decompress..
Decompression OK!
Entry at 0x80a00000
Closing network.
Disabling Switch ports.
Flushing Receive Buffers...
46 buffers found.
Closing DMA Channels.
Starting program at 0x80a00000
[    0.000000] Linux version 4.4.71 (buildbot@builds-02.infra.lede-project.org) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3101-bce140e) ) #0 SMP Thu Jun 8 10:18:56 2017
[    0.000000] Detected Broadcom 0x6368 CPU revision b2
[    0.000000] CPU frequency is 400 MHz
[    0.000000] 32MB of RAM installed
[    0.000000] board_bcm963xx: Boot address 0xb8000000
[    0.000000] board_bcm963xx: CFE version: 1.0.37-106.5-6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0002a031 (Broadcom BMIPS4350)
[    0.000000] board: board name: 96369R-1231N
[    0.000000] MIPS: machine is Comtrend WAP-5813n
[    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 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 16 bytes.
[    0.000000] Primary data cache 32kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[    0.000000] PERCPU: Embedded 9 pages/cpu @81046000 s8016 r8192 d20656 u36864
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
[    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] Memory: 26716K/32768K available (3381K kernel code, 152K rwdata, 516K rodata, 1320K init, 208K bss, 6052K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:256
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000016] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.008154] Calibrating delay loop... 397.82 BogoMIPS (lpj=795648)
[    0.042790] pid_max: default: 32768 minimum: 301
[    0.047808] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.054589] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.068082] SMP: Booting CPU1...
[   10.279638] Primary instruction cache 64kB, VIPT, 4-way, linesize 16 bytes.
[   10.279657] Primary data cache 32kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[   10.280061] CPU1 revision is: 0002a031 (Broadcom BMIPS4350)
[    0.124380] Synchronize counters for CPU 1:
[    0.124381] SMP: CPU1 is running
[    0.124386] done.
[    0.124604] Brought up 2 CPUs
[    0.134343] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.134381] futex hash table entries: 512 (order: 1, 8192 bytes)
[    0.138435] NET: Registered protocol family 16
[    0.147002] Can't analyze schedule() prologue at 80017240
[    0.169587] registering PCI controller with io_map_base unset
[    0.175607] registering PCI controller with io_map_base unset
[    0.203145] PCI host bridge to bus 0000:00
[    0.207586] pci_bus 0000:00: root bus resource [mem 0x30000000-0x37ffffff]
[    0.214649] pci_bus 0000:00: root bus resource [io  0x8000000-0x8007fff]
[    0.221535] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.228527] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.245380] pci 0000:00:01.0: BAR 0: assigned [mem 0x30000000-0x30003fff]
[    0.253212] PCI host bridge to bus 0000:01
[    0.257457] pci_bus 0000:01: root bus resource [mem 0x38000000-0x3fffffff]
[    0.264500] pci_bus 0000:01: root bus resource [io  0x8008000-0x800ffff]
[    0.271397] pci_bus 0000:01: root bus resource [??? 0x00000000 flags 0x0]
[    0.278385] pci_bus 0000:01: No busn resource found for root bus, will use [bus 01-ff]
[    0.287079] pci 0000:01:1e.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.295806] pci 0000:01:1e.0: BAR 10: assigned [mem 0x38000000-0x3fffffff]
[    0.302902] pci 0000:01:1e.0: BAR 7: assigned [io  0x8008000-0x80080ff]
[    0.309679] pci 0000:01:1e.0: BAR 8: assigned [io  0x8008400-0x80084ff]
[    0.316487] pci 0000:01:1e.0: CardBus bridge to [bus 02-05]
[    0.322219] pci 0000:01:1e.0:   bridge window [io  0x8008000-0x80080ff]
[    0.329033] pci 0000:01:1e.0:   bridge window [io  0x8008400-0x80084ff]
[    0.335841] pci 0000:01:1e.0:   bridge window [mem 0x38000000-0x3fffffff]
[    0.346448] clocksource: Switched to clocksource MIPS
[    0.355100] PCI: Enabling device 0000:00:01.0 (0000 -> 0002)
[    0.383064] ssb: Found chip with id 0x4322, rev 0x01 and package 0x09
[    0.453121] ssb: Sonics Silicon Backplane found on PCI device 0000:00:01.0
[    0.461070] NET: Registered protocol family 2
[    0.467432] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.474706] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.481272] TCP: Hash tables configured (established 1024 bind 1024)
[    0.488063] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.494129] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.501060] NET: Registered protocol family 1
[    0.508904] Crashlog allocated RAM at address 0x1f00000
[    0.540723] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.546822] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.564655] io scheduler noop registered
[    0.568771] io scheduler deadline registered (default)
[    0.577050] bcm63xx_uart.0: ttyS0 at MMIO 0xb0000100 (irq = 10, base_baud = 1562500) is a bcm63xx_uart
[    0.586780] console [ttyS0] enabled
[    0.586780] console [ttyS0] enabled
[    0.593946] bootconsole [early0] disabled
[    0.593946] bootconsole [early0] disabled
[    0.603316] bcm63xx-rng bcm63xx-rng: registered RNG driver
[    0.610991] 18000000.nor: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
[    0.621577] Amd/Fujitsu Extended Query Table at 0x0040
[    0.626845]   Amd/Fujitsu Extended Query version 1.1.
[    0.632020] number of CFI chips: 1
[    0.636017] bcm63xxpart: CFE boot tag found with version 6 and board type 96369R-1231N
[    0.644487] 5 bcm63xxpart partitions found on MTD device 18000000.nor
[    0.651148] Creating 5 MTD partitions on "18000000.nor":
[    0.656605] 0x000000000000-0x000000010000 : "CFE"
[    0.665427] 0x000000010100-0x00000015a7b0 : "kernel"
[    0.673680] 0x00000015a7b0-0x0000007f0000 : "rootfs"
[    0.678922] mtd: partition "rootfs" extends beyond the end of device "18000000.nor" -- size truncated to 0x2a5850
[    0.693317] mtd: device 2 (rootfs) set to be root filesystem
[    0.699350] 1 squashfs-split partitions found on MTD device rootfs
[    0.705753] 0x000000350000-0x000000400000 : "rootfs_data"
[    0.715858] 0x000000010000-0x0000007f0000 : "linux"
[    0.720997] mtd: partition "linux" extends beyond the end of device "18000000.nor" -- size truncated to 0x3f0000
[    0.735530] 0x0000007f0000-0x000000800000 : "nvram"
[    0.740596] mtd: partition "nvram" is out of reach -- disabled
[    0.753209] bcm63xx-spi bcm6358-spi: at [mem 0xb0000800-0xb0000f0b flags 0x200] (irq 9, FIFOs size 542)
[    0.776101] b53_common: found switch: BCM53115, rev 8
[    0.819214] bcm63xx-wdt bcm63xx-wdt:  started, timer margin: 30 sec
[    0.833549] NET: Registered protocol family 10
[    0.841010] NET: Registered protocol family 17
[    0.845823] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    0.858848] 8021q: 802.1Q VLAN Support v1.8
[    0.873908] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    0.897520] Freeing unused kernel memory: 1320K (80406000 - 80550000)
[    2.397879] init: Console is alive
[    2.402081] init: - watchdog -
[    3.741559] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.883326] usbcore: registered new interface driver usbfs
[    3.889273] usbcore: registered new interface driver hub
[    3.895026] usbcore: registered new device driver usb
[    3.910070] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.918626] ehci-platform: EHCI generic platform driver
[    4.026038] ehci-platform ehci-platform: EHCI Host Controller
[    4.032055] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    4.040491] ehci-platform ehci-platform: irq 15, io mem 0xb0001500
[    4.057995] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00, overcurrent ignored
[    4.068259] hub 1-0:1.0: USB hub found
[    4.072317] hub 1-0:1.0: 1 port detected
[    4.082121] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.090577] ohci-platform: OHCI generic platform driver
[    4.096249] ohci-platform ohci-platform: Generic Platform OHCI controller
[    4.103294] ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
[    4.111715] ohci-platform ohci-platform: irq 13, io mem 0xb0001600
[    4.180155] hub 2-0:1.0: USB hub found
[    4.184208] hub 2-0:1.0: 1 port detected
[    4.190640] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.206776] init: - preinit -
[    5.257759] random: jshn: uninitialized urandom read (4 bytes read, 69 bits of entropy available)
[    5.452610] random: jshn: uninitialized urandom read (4 bytes read, 72 bits of entropy available)
[    5.672141] random: jshn: uninitialized urandom read (4 bytes read, 75 bits of entropy available)
[    5.757398] random: jshn: uninitialized urandom read (4 bytes read, 77 bits of entropy available)
[    5.864762] random: jshn: uninitialized urandom read (4 bytes read, 80 bits of entropy available)
[    6.292808] random: procd: uninitialized urandom read (4 bytes read, 92 bits of entropy available)
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.610098] random: nonblocking pool is initialized
[    9.823845] jffs2: notice: (388) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    9.842470] mount_root: switching to jffs2 overlay
[    9.860732] urandom-seed: Seeding with /etc/urandom.seed
[   10.074443] procd: - early -
[   10.077542] procd: - watchdog -
[   10.753513] procd: - ubus -
[   10.811557] procd: - init -
Please press Enter to activate this console.
[   11.466918] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.481787] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.509909] Loading modules backported from Linux version wt-2017-01-31-0-ge882dff19e7f
[   11.518435] Backport generated by backports.git backports-20160324-13-g24da7d3c
[   11.530771] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.549749] nf_conntrack version 0.5.0 (438 buckets, 1752 max)
[   11.655216] xt_time: kernel timezone is -0000
[   11.779054] PPP generic driver version 2.4.2
[   11.787390] NET: Registered protocol family 24
[   11.830989] b43-phy0: Broadcom 4322 WLAN found (core revision 16)
[   11.869984] b43-phy0: Found PHY: Analog 8, Type 4 (N), Revision 4
[   11.876290] b43-phy0: Found Radio: Manuf 0x17F, ID 0x2056, Revision 3, Version 0
[   11.896099] Broadcom 43xx driver loaded [ Features: PNL ]
[   11.928633] kmodloader: done loading kernel modules from /etc/modules.d/*
[   19.267574] device eth0.1 entered promiscuous mode
[   19.272795] device eth0 entered promiscuous mode
[   19.293705] br-lan: port 1(eth0.1) entered forwarding state
[   19.299782] br-lan: port 1(eth0.1) entered forwarding state
[   21.302160] br-lan: port 1(eth0.1) entered forwarding state

(Last edited by Romandas on 17 Aug 2017, 17:47)

User mk24 noted in another thread that the Image Builder does not re-compile the kernel.

Maybe the changes you've made to the DTS file are not being applied, as the kernel is not being re-compiled? Perhaps you should clone the full repo and apply your changes there instead of using the Image Builder.

(Last edited by Antek on 15 Aug 2017, 14:25)

Your advice helped in this situation. I overcame (partitions extend beyond the end of device) error with dts settings by compiling firmware from source, but another problem arised. How to debug this: Code: (Bad address in epc)?

Fragment:

[    1.121414] [<800104a8>] ret_from_kernel_thread+0x14/0x1c
[    1.126967]
[    1.128481]
Code: (Bad address in epc)
[    1.132512]
[    1.134216] ---[ end trace e9844ad86a0de221 ]---
[    1.141629] Fatal exception: panic in 5 seconds
[    6.149496] Kernel panic - not syncing: Fatal exception
[    6.156762] Rebooting in 1 seconds..
[    7.161442] triggering watchdog soft-reset...

Full bootlog:

CFE version 1.0.37-106.5-6 for BCM96368 (32bit,SP,BE)
Build Date: Thu Apr 29 17:22:55 CST 2010 (asdrick@rd5-linux)
Copyright (C) 2000-2009 Broadcom Corporation.

Parallel flash device: name MX29LV320AB, id 0x22a8 size 4096KB
Total Flash size: 4096K with 71 sectors
ethsw: found bcm53115!
Chip ID: BCM6369B2, MIPS: 400MHz
Main Thread: TP0
Total Memory: 33554432 bytes (32MB)
Boot Address: 0xb8000000

Board IP address                  : 192.168.1.1:ffffff00
Host IP address                   : 192.168.1.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id (0-15)                   : 96369R-1231N
Number of MAC Addresses (1-32)    : 5
Base MAC Address                  : 64:68:0c:c7:08:78
PSI Size (1-64) KBytes            : 24
Enable Backup PSI [0|1]           : 0
System Log Size (0-256) KBytes    : 0
Main Thread Number [0|1]          : 0
Serial Number                     : 0
Voice Board Configuration (0-19)  : MVWG

*** Press any key to stop auto run (1 seconds) ***
Auto run second count down: 0
Booting from only image (0xb8010000) ...
Code Address: 0x80A00000, Entry Address: 0x80a00000
LZMA: Prossible old LZMA format, trying to decompress..
Decompression OK!
Entry at 0x80a00000
Closing network.
Disabling Switch ports.
Flushing Receive Buffers...
46 buffers found.
Closing DMA Channels.
Starting program at 0x80a00000
[    0.000000] Linux version 4.4.79 (romandas@romandas-Aspire-5737Z) (gcc version 5.4.0 (LEDE GCC 5.4.0 r4696-df3295f50e) ) #0 SMP Fri Aug 11 16:12:56 2017
[    0.000000] Detected Broadcom 0x6368 CPU revision b2
[    0.000000] CPU frequency is 400 MHz
[    0.000000] 32MB of RAM installed
[    0.000000] board_bcm963xx: Boot address 0xb8000000
[    0.000000] board_bcm963xx: CFE version: 1.0.37-106.5-6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0002a031 (Broadcom BMIPS4350)
[    0.000000] board: board name: 96369R-1231N
[    0.000000] MIPS: machine is Comtrend WAP-5813n
[    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 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 16 bytes.
[    0.000000] Primary data cache 32kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[    0.000000] PERCPU: Embedded 9 pages/cpu @8104a000 s8016 r8192 d20656 u36864
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
[    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] Memory: 26448K/32768K available (3358K kernel code, 159K rwdata, 812K rodata, 1296K init, 207K bss, 6320K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:256
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000016] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.008157] Calibrating delay loop... 397.82 BogoMIPS (lpj=795648)
[    0.042800] pid_max: default: 32768 minimum: 301
[    0.047826] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.054614] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.068540] SMP: Booting CPU1...
[   10.358634] Primary instruction cache 64kB, VIPT, 4-way, linesize 16 bytes.
[   10.358654] Primary data cache 32kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[   10.359066] CPU1 revision is: 0002a031 (Broadcom BMIPS4350)
[    0.124865] Synchronize counters for CPU 1:
[    0.124866] SMP: CPU1 is running
[    0.124873] done.
[    0.125096] Brought up 2 CPUs
[    0.138283] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.148483] futex hash table entries: 512 (order: 1, 8192 bytes)
[    0.155005] pinctrl core: initialized pinctrl subsystem
[    0.162097] NET: Registered protocol family 16
[    0.191532] registering PCI controller with io_map_base unset
[    0.228417] PCI host bridge to bus 0000:00
[    0.232773] pci_bus 0000:00: root bus resource [mem 0x30000000-0x37ffffff]
[    0.239837] pci_bus 0000:00: root bus resource [io  0x8000000-0x800ffff]
[    0.246724] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.253708] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.270640] pci 0000:00:01.0: BAR 0: assigned [mem 0x30000000-0x30003fff]
[    0.281597] clocksource: Switched to clocksource MIPS
[    0.292101] PCI: Enabling device 0000:00:01.0 (0000 -> 0002)
[    0.318671] ssb: Found chip with id 0x4322, rev 0x01 and package 0x09
[    0.388954] ssb: Sonics Silicon Backplane found on PCI device 0000:00:01.0
[    0.397363] NET: Registered protocol family 2
[    0.403559] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.410879] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.417565] TCP: Hash tables configured (established 1024 bind 1024)
[    0.424512] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.430656] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.437988] NET: Registered protocol family 1
[    0.447522] Crashlog allocated RAM at address 0x1f00000
[    0.483642] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.489891] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.509038] io scheduler noop registered
[    0.513238] io scheduler deadline registered (default)
[    0.521074] bcm6368-pinctrl 10000080.pin-controller: registered at mmio b0000080
[    0.532184] bcm63xx_uart.0: ttyS0 at MMIO 0xb0000100 (irq = 10, base_baud = 1562500) is a bcm63xx_uart
[    0.541926] console [ttyS0] enabled
[    0.541926] console [ttyS0] enabled
[    0.549094] bootconsole [early0] disabled
[    0.549094] bootconsole [early0] disabled
[    0.558907] bcm63xx-rng bcm63xx-rng: registered RNG driver
[    0.567452] 18000000.nor: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
[    0.578143] Amd/Fujitsu Extended Query Table at 0x0040
[    0.583448]   Amd/Fujitsu Extended Query version 1.1.
[    0.588627] number of CFI chips: 1
[    0.592560] bcm63xxpart: CFE boot tag found with version 6 and board type 96369R-1231N
[    0.600888] 5 bcm63xxpart partitions found on MTD device 18000000.nor
[    0.607586] Creating 5 MTD partitions on "18000000.nor":
[    0.613072] 0x000000000000-0x000000010000 : "CFE"
[    0.621815] 0x000000010100-0x00000016c180 : "kernel"
[    0.630676] 0x00000016c180-0x0000003f0000 : "rootfs"
[    0.639334] mtd: device 2 (rootfs) set to be root filesystem
[    0.645270] 1 squashfs-split partitions found on MTD device rootfs
[    0.651642] 0x000000360000-0x0000003f0000 : "rootfs_data"
[    0.660823] 0x000000010000-0x0000003f0000 : "linux"
[    0.669458] 0x0000003f0000-0x000000400000 : "nvram"
[    0.682162] bcm63xx-spi 10000800.spi: at [mem 0x10000800-0x10000f0b flags 0x200] (irq 9, FIFOs size 542)
[    0.705059] b53_common: found switch: BCM53115, rev 8
[    0.745379] bcm63xx-wdt bcm63xx-wdt:  started, timer margin: 30 sec
[    0.754796] CPU 1 Unable to handle kernel paging request at virtual address 00000000, epc == 00000000, ra == 8020876c
[    0.765709] Oops[#1]:
[    0.768036] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.4.79 #0
[    0.774125] task: 81838000 ti: 81834000 task.ti: 81834000
[    0.779671] $ 0   : 00000000 10008b00 00000000 00000174
[    0.785045] $ 4   : 00000000 00000000 0000000f 00000000
[    0.790421] $ 8   : 8140c094 8140c000 803da17e 3a2f7573
[    0.795797] $12   : 803c0000 ffffff80 00000000 7764743a
[    0.801172] $16   : b0000098 00000000 0000000f 00000000
[    0.806549] $20   : 10008b01 00000001 00000000 818d7e10
[    0.811925] $24   : 00000000 801fecc0
[    0.817300] $28   : 81834000 81835b18 81007828 8020876c
[    0.822677] Hi    : 00000000
[    0.825634] Lo    : 00000174
[    0.828593] epc   : 00000000   (null)
[    0.832395] ra    : 8020876c regmap_update_bits+0x34/0x80
[    0.837909] Status: 10008b02 KERNEL EXL
[    0.841945] Cause : 00800008 (ExcCode 02)
[    0.846063] BadVA : 00000000
[    0.849022] PrId  : 0002a031 (Broadcom BMIPS4350)
[    0.853857] Modules linked in:
[    0.857004] Process swapper/0 (pid: 1, threadinfo=81834000, task=81838000, tls=00000000)
[    0.865325] Stack : 80440000 00000000 00000001 0000000a ffffffff ffffffff 803da0fc 803ee030
          803edebc 81943a10 81943a44 801c5c68 803dc1cc 81835bb8 801a32d8 803dda4c
          00000000 81a0fc00 81a0ec00 8043fffc 818fa580 0000001f 81a0a40c 801bf070
          81a0a40c 000001ff 81a0ec00 0000001f 81943a48 801a32d8 81835c6c 81a0a40c
          818fa580 81a0ec00 0000001f 81943a48 803dda4c 801bf830 81007828 805c0000
          ...
[    0.901885] Call Trace:
[    0.904416] [<801c5c68>] bcm6368_gpio_request_enable+0xa8/0xdc
[    0.910428] [<801a32d8>] kasprintf+0x1c/0x28
[    0.914816] [<801bf070>] pin_request+0x1a0/0x25c
[    0.919550] [<801a32d8>] kasprintf+0x1c/0x28
[    0.923948] [<801bf830>] pinmux_request_gpio+0x58/0x98
[    0.929232] [<801bc7c4>] pinctrl_request_gpio+0xbc/0x1a4
[    0.934701] [<801ff04c>] class_dev_iter_next+0x18/0x54
[    0.939982] [<801c703c>] __gpiod_request+0x9c/0x138
[    0.944999] [<801c8ee4>] gpiod_request+0x5c/0xa4
[    0.949745] [<801c8fa4>] fwnode_get_named_gpiod+0x78/0x108
[    0.955390] [<801a16b0>] snprintf+0x18/0x24
[    0.959690] [<801c6734>] devm_get_gpiod_from_child+0xd4/0x174
[    0.965611] [<80243a14>] devm_led_classdev_release+0x0/0x8
[    0.971262] [<80248cc4>] of_get_next_available_child+0x78/0xa4
[    0.977253] [<80245ae4>] gpio_led_probe+0x150/0x380
[    0.982291] [<8044c2e8>] repair_env_string+0x0/0x9c
[    0.987292] [<801ffc1c>] platform_drv_probe+0x28/0x70
[    0.992484] [<80247854>] of_match_node+0x4c/0x6c
[    0.997240] [<8013e868>] sysfs_create_dir_ns+0x54/0xa0
[    1.002518] [<801fe218>] driver_probe_device+0x124/0x28c
[    1.007987] [<801ffee0>] platform_match+0x60/0x110
[    1.012911] [<801fe3fc>] __driver_attach+0x7c/0xb4
[    1.017836] [<801fc624>] next_device+0x10/0x30
[    1.022408] [<801fe380>] __driver_attach+0x0/0xb4
[    1.027244] [<801fc6e0>] bus_for_each_dev+0x9c/0xac
[    1.032269] [<8035431c>] klist_add_tail+0x24/0x70
[    1.037104] [<80467c7c>] gpio_led_driver_init+0x0/0x10
[    1.042390] [<801fd90c>] bus_add_driver+0xe8/0x208
[    1.047324] [<801a3298>] kvasprintf+0x70/0x94
[    1.051799] [<801fe9b8>] driver_find+0x1c/0x48
[    1.056367] [<80467c7c>] gpio_led_driver_init+0x0/0x10
[    1.061654] [<801feb4c>] driver_register+0xa8/0xf8
[    1.066581] [<80467c7c>] gpio_led_driver_init+0x0/0x10
[    1.071867] [<80467c7c>] gpio_led_driver_init+0x0/0x10
[    1.077161] [<8001abb8>] do_one_initcall+0x200/0x22c
[    1.082271] [<80132e6c>] proc_register+0x30/0x124
[    1.087099] [<80467c7c>] gpio_led_driver_init+0x0/0x10
[    1.092391] [<8004fb30>] parse_args+0x2b4/0x3ec
[    1.097046] [<8044cdb0>] kernel_init_freeable+0x17c/0x23c
[    1.102609] [<8044c2e8>] repair_env_string+0x0/0x9c
[    1.107626] [<8001539c>] kernel_init+0x0/0x114
[    1.112193] [<800153ac>] kernel_init+0x10/0x114
[    1.116850] [<8001539c>] kernel_init+0x0/0x114
[    1.121414] [<800104a8>] ret_from_kernel_thread+0x14/0x1c
[    1.126967]
[    1.128481]
Code: (Bad address in epc)
[    1.132512]
[    1.134216] ---[ end trace e9844ad86a0de221 ]---
[    1.141629] Fatal exception: panic in 5 seconds
[    6.149496] Kernel panic - not syncing: Fatal exception
[    6.156762] Rebooting in 1 seconds..
▒    7.161442] triggering watchdog soft-reset...

(Last edited by Romandas on 15 Aug 2017, 20:08)

Debugging kernel oopses is quite a tedious process. Here's a link to a web page which walks through analyzing the registers on a MIPS platform. It might be different from the platform your router is using, but the basic principles are very similar to each other: http://wiki.dreamrunner.org/public_html … nMIPS.html

You might need to re-build the kernel using more debug and tracing options. Unfortunately I have never had the need to use those options, so I can't really say what they are.

Looking at the error report (the stack trace, to be specific), it seems there's something wrong with the GPIO LED devices. I am not familiar with your specific platform and PCB wiring so I can't really help you on how exactly to solve this. I would probably look at how the GPIOs and the LED devices are defined in the DTS file, and then probably compare these definitions to the actual wirings on-board the device.

Perhaps there might be some subtle differences between the BCM96368 and BCM96369?

Ok, I will check that later, but now I'm making several builds also with earlier Openwrt versions and will see. Also it's not clear to me about patches in source. I saw there is one patch file in patches-4.4 directory inside source for my router. Do I have to specify that file in terminal with make command or compiling automatically finds it and includes in the build?

(Last edited by Romandas on 17 Aug 2017, 13:55)

I compiled latest OpenWrt with luci and now boot sems ok, but by default I cannot access 192.168.1.1 gataway from static adress. In Windows network conection is "Initializing....."

Full bootlog

CFE version 1.0.37-106.5-6 for BCM96368 (32bit,SP,BE)
Build Date: Thu Apr 29 17:22:55 CST 2010 (asdrick@rd5-linux)
Copyright (C) 2000-2009 Broadcom Corporation.

Parallel flash device: name MX29LV320AB, id 0x22a8 size 4096KB
Total Flash size: 4096K with 71 sectors
ethsw: found bcm53115!
Chip ID: BCM6369B2, MIPS: 400MHz
Main Thread: TP0
Total Memory: 33554432 bytes (32MB)
Boot Address: 0xb8000000

Board IP address                  : 192.168.1.1:ffffff00
Host IP address                   : 192.168.1.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id (0-15)                   : 96369R-1231N
Number of MAC Addresses (1-32)    : 5
Base MAC Address                  : 64:68:0c:c7:08:78
PSI Size (1-64) KBytes            : 24
Enable Backup PSI [0|1]           : 0
System Log Size (0-256) KBytes    : 0
Main Thread Number [0|1]          : 0
Serial Number                     : 0
Voice Board Configuration (0-19)  : MVWG

*** Press any key to stop auto run (1 seconds) ***
Auto run second count down: 0
Booting from only image (0xb8010000) ...
Code Address: 0x80A00000, Entry Address: 0x80a00000
LZMA: Prossible old LZMA format, trying to decompress..
Decompression OK!
Entry at 0x80a00000
Closing network.
Disabling Switch ports.
Flushing Receive Buffers...
1 buffers found.
Closing DMA Channels.
Starting program at 0x80a00000
[    0.000000] Linux version 4.4.14 (tom@ubuntu) (gcc version 5.3.0 (OpenWrt GCC 5.3.0 50108) ) #1 SMP Thu Aug 17 12:45:39 UTC 2017
[    0.000000] Detected Broadcom 0x6368 CPU revision b2
[    0.000000] CPU frequency is 400 MHz
[    0.000000] 32MB of RAM installed
[    0.000000] board_bcm963xx: Boot address 0xb8000000
[    0.000000] board_bcm963xx: CFE version: 1.0.37-106.5-6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0002a031 (Broadcom BMIPS4350)
[    0.000000] board: board name: 96369R-1231N
[    0.000000] MIPS: machine is Comtrend WAP-5813n
[    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 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 16 bytes.
[    0.000000] Primary data cache 32kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[    0.000000] PERCPU: Embedded 9 pages/cpu @81046000 s8016 r8192 d20656 u36864
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs 2 noinitrd console=ttyS0,115200
[    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] Memory: 26656K/32768K available (3220K kernel code, 149K rwdata,760K rodata, 1304K init, 207K bss, 6112K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:256
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000017] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.008145] Calibrating delay loop... 397.82 BogoMIPS (lpj=795648)
[    0.042795] pid_max: default: 32768 minimum: 301
[    0.047807] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.054589] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.068472] SMP: Booting CPU1...
[    8.553148] Primary instruction cache 64kB, VIPT, 4-way, linesize 16 bytes.
[    8.553166] Primary data cache 32kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[    8.553571] CPU1 revision is: 0002a031 (Broadcom BMIPS4350)
[    0.124748] Synchronize counters for CPU 1:
[    0.124749] SMP: CPU1 is running
[    0.124774] done.
[    0.124982] Brought up 2 CPUs
[    0.134638] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.137370] NET: Registered protocol family 16
[    0.161778] registering PCI controller with io_map_base unset
[    0.194332] PCI host bridge to bus 0000:00
[    0.198652] pci_bus 0000:00: root bus resource [mem 0x30000000-0x37ffffff]
[    0.205708] pci_bus 0000:00: root bus resource [io  0x8000000-0x800ffff]
[    0.212594] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.219586] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.236542] pci 0000:00:01.0: BAR 0: assigned [mem 0x30000000-0x30003fff]
[    0.247395] clocksource: Switched to clocksource MIPS
[    0.257407] PCI: Enabling device 0000:00:01.0 (0000 -> 0002)
[    0.284498] ssb: Found chip with id 0x4322, rev 0x01 and package 0x09
[    0.354691] ssb: Sonics Silicon Backplane found on PCI device 0000:00:01.0
[    0.362959] NET: Registered protocol family 2
[    0.369129] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.376444] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.383067] TCP: Hash tables configured (established 1024 bind 1024)
[    0.390010] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.396135] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.403280] NET: Registered protocol family 1
[    0.411832] futex hash table entries: 512 (order: 1, 8192 bytes)
[    0.446131] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.452330] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.468861] io scheduler noop registered
[    0.473005] io scheduler deadline registered (default)
[    0.482210] bcm63xx_uart.0: ttyS0 at MMIO 0xb0000100 (irq = 10, base_baud = 1562500) is a bcm63xx_uart
[    0.491948] console [ttyS0] enabled
[    0.491948] console [ttyS0] enabled
[    0.499105] bootconsole [early0] disabled
[    0.499105] bootconsole [early0] disabled
[    0.508923] bcm63xx-rng bcm63xx-rng: registered RNG driver
[    0.517407] 18000000.nor: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
[    0.528032] Amd/Fujitsu Extended Query Table at 0x0040
[    0.533314]   Amd/Fujitsu Extended Query version 1.1.
[    0.538486] number of CFI chips: 1
[    0.542442] bcm63xxpart: CFE boot tag found with version 6 and board type 96369R-1231N
[    0.550769] 5 bcm63xxpart partitions found on MTD device 18000000.nor
[    0.557456] Creating 5 MTD partitions on "18000000.nor":
[    0.562965] 0x000000000000-0x000000010000 : "CFE"
[    0.571573] 0x000000010100-0x000000160f40 : "kernel"
[    0.580635] 0x000000160f40-0x0000003f0000 : "rootfs"
[    0.589522] mtd: device 2 (rootfs) set to be root filesystem
[    0.595496] 1 squashfs-split partitions found on MTD device rootfs
[    0.601855] 0x000000340000-0x0000003f0000 : "rootfs_data"
[    0.610742] 0x000000010000-0x0000003f0000 : "linux"
[    0.619774] 0x0000003f0000-0x000000400000 : "nvram"
[    0.631076] bcm63xx-spi bcm6358-spi: at [mem 0xb0000800-0xb0000f0b flags 0x200] (irq 9, FIFOs size 542)
[    0.653780] b53_common: found switch: BCM53115, rev 8
[    0.696692] bcm63xx-wdt bcm63xx-wdt:  started, timer margin: 30 sec
[    0.711147] NET: Registered protocol family 10
[    0.718697] NET: Registered protocol family 17
[    0.723691] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    0.736738] 8021q: 802.1Q VLAN Support v1.8
[    0.753051] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    0.776230] Freeing unused kernel memory: 1304K (8041a000 - 80560000)
[    2.243615] init: Console is alive
[    2.247621] init: - watchdog -
[    3.498500] init: - preinit -
ip: RTNETLINK answers: File exists
[    4.091699] random: procd urandom read with 59 bits of entropy available
ip: RTNETLINK answers: File exists
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
ip: RTNETLINK answers: File exists
[    7.635991] jffs2: notice: (339) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    7.654195] mount_root: switching to jffs2 overlay
[    7.709974] procd: - early -
[    7.713487] procd: - watchdog -
[    8.515854] procd: - ubus -
[    8.574169] procd: - init -
Please press Enter to activate this console.
[    9.250675] random: nonblocking pool is initialized
[    9.802549] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    9.832072] Loading modules backported from Linux version wt-2016-05-12-0-g7a                      
54796
[    9.839958] Backport generated by backports.git backports-20160216-0-ge3c56e4
[    9.852457] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.874458] nf_conntrack version 0.5.0 (436 buckets, 1744 max)
[    9.983828] xt_time: kernel timezone is -0000
[   10.073746] PPP generic driver version 2.4.2
[   10.082006] NET: Registered protocol family 24
[   10.112825] b43-phy0: Broadcom 4322 WLAN found (core revision 16)
[   10.151386] b43-phy0: Found PHY: Analog 8, Type 4 (N), Revision 4
[   10.157684] b43-phy0: Found Radio: Manuf 0x17F, ID 0x2056, Revision 3, Version 0
[   10.177425] Broadcom 43xx driver loaded [ Features: PNL ]
[   18.505417] device eth0.1 entered promiscuous mode
[   18.510580] device eth0 entered promiscuous mode
[   18.526685] br-lan: port 1(eth0.1) entered forwarding state
[   18.532654] br-lan: port 1(eth0.1) entered forwarding state
[   20.535348] br-lan: port 1(eth0.1) entered forwarding state

swconfig dev switch0 show

root@OpenWrt:/# swconfig dev switch0 show
Global attributes:
        enable_vlan: 1
        ports: 0x003f
        reset_mib: ???
        enable_jumbo: 0
        allow_vid_4095: 0
Port 0:
        mib: TxOctets            : 0
TxDropPkts          : 0
TxBroadcastPkts     : 0
TxMulticastPkts     : 0
TxUnicastPkts       : 0
TxCollisions        : 0
TxSingleCollision   : 0
TxMultipleCollision : 0
TxDeferredTransmit  : 0
TxLateCollision     : 0
TxExcessiveCollision: 0
TxPausePkts         : 0
RxOctets            : 0
RxUndersizePkts     : 0
RxPausePkts         : 0
Pkts64Octets        : 0
Pkts65to127Octets   : 0
Pkts128to255Octets  : 0
Pkts256to511Octets  : 0
Pkts512to1023Octets : 0
Pkts1024to1522Octets: 0
RxOversizePkts      : 0
RxJabbers           : 0
RxAlignmentErrors   : 0
RxFCSErrors         : 0
RxGoodOctets        : 0
RxDropPkts          : 0
RxUnicastPkts       : 0
RxMulticastPkts     : 0
RxBroadcastPkts     : 0
RxSAChanges         : 0
RxFragments         : 0
RxJumboPkts         : 0
RxSymbolErrors      : 0
RxDiscarded         : 0

        pvid: 1
        link: port:0 link:down
Port 1:
        mib: TxOctets            : 0
TxDropPkts          : 0
TxBroadcastPkts     : 0
TxMulticastPkts     : 0
TxUnicastPkts       : 0
TxCollisions        : 0
TxSingleCollision   : 0
TxMultipleCollision : 0
TxDeferredTransmit  : 0
TxLateCollision     : 0
TxExcessiveCollision: 0
TxPausePkts         : 0
RxOctets            : 0
RxUndersizePkts     : 0
RxPausePkts         : 0
Pkts64Octets        : 0
Pkts65to127Octets   : 0
Pkts128to255Octets  : 0
Pkts256to511Octets  : 0
Pkts512to1023Octets : 0
Pkts1024to1522Octets: 0
RxOversizePkts      : 0
RxJabbers           : 0
RxAlignmentErrors   : 0
RxFCSErrors         : 0
RxGoodOctets        : 0
RxDropPkts          : 0
RxUnicastPkts       : 0
RxMulticastPkts     : 0
RxBroadcastPkts     : 0
RxSAChanges         : 0
RxFragments         : 0
RxJumboPkts         : 0
RxSymbolErrors      : 0
RxDiscarded         : 0

        pvid: 1
        link: port:1 link:down
Port 2:
        mib: TxOctets            : 0
TxDropPkts          : 0
TxBroadcastPkts     : 0
TxMulticastPkts     : 0
TxUnicastPkts       : 0
TxCollisions        : 0
TxSingleCollision   : 0
TxMultipleCollision : 0
TxDeferredTransmit  : 0
TxLateCollision     : 0
TxExcessiveCollision: 0
TxPausePkts         : 0
RxOctets            : 0
RxUndersizePkts     : 0
RxPausePkts         : 0
Pkts64Octets        : 0
Pkts65to127Octets   : 0
Pkts128to255Octets  : 0
Pkts256to511Octets  : 0
Pkts512to1023Octets : 0
Pkts1024to1522Octets: 0
RxOversizePkts      : 0
RxJabbers           : 0
RxAlignmentErrors   : 0
RxFCSErrors         : 0
RxGoodOctets        : 0
RxDropPkts          : 0
RxUnicastPkts       : 0
RxMulticastPkts     : 0
RxBroadcastPkts     : 0
RxSAChanges         : 0
RxFragments         : 0
RxJumboPkts         : 0
RxSymbolErrors      : 0
RxDiscarded         : 0

        pvid: 1
        link: port:2 link:down
Port 3:
        mib: TxOctets            : 0
TxDropPkts          : 0
TxBroadcastPkts     : 0
TxMulticastPkts     : 0
TxUnicastPkts       : 0
TxCollisions        : 0
TxSingleCollision   : 0
TxMultipleCollision : 0
TxDeferredTransmit  : 0
TxLateCollision     : 0
TxExcessiveCollision: 0
TxPausePkts         : 0
RxOctets            : 65952
RxUndersizePkts     : 0
RxPausePkts         : 0
Pkts64Octets        : 185
Pkts65to127Octets   : 349
Pkts128to255Octets  : 58
Pkts256to511Octets  : 32
Pkts512to1023Octets : 0
Pkts1024to1522Octets: 0
RxOversizePkts      : 0
RxJabbers           : 0
RxAlignmentErrors   : 0
RxFCSErrors         : 0
RxGoodOctets        : 65952
RxDropPkts          : 0
RxUnicastPkts       : 0
RxMulticastPkts     : 264
RxBroadcastPkts     : 360
RxSAChanges         : 1
RxFragments         : 0
RxJumboPkts         : 0
RxSymbolErrors      : 0
RxDiscarded         : 624

        pvid: 1
        link: port:3 link:up speed:100baseT full-duplex auto
Port 4:
        mib: TxOctets            : 0
TxDropPkts          : 0
TxBroadcastPkts     : 0
TxMulticastPkts     : 0
TxUnicastPkts       : 0
TxCollisions        : 0
TxSingleCollision   : 0
TxMultipleCollision : 0
TxDeferredTransmit  : 0
TxLateCollision     : 0
TxExcessiveCollision: 0
TxPausePkts         : 0
RxOctets            : 10426
RxUndersizePkts     : 0
RxPausePkts         : 0
Pkts64Octets        : 48
Pkts65to127Octets   : 40
Pkts128to255Octets  : 2
Pkts256to511Octets  : 10
Pkts512to1023Octets : 0
Pkts1024to1522Octets: 0
RxOversizePkts      : 0
RxJabbers           : 0
RxAlignmentErrors   : 0
RxFCSErrors         : 0
RxGoodOctets        : 10426
RxDropPkts          : 0
RxUnicastPkts       : 100
RxMulticastPkts     : 0
RxBroadcastPkts     : 0
RxSAChanges         : 12
RxFragments         : 0
RxJumboPkts         : 0
RxSymbolErrors      : 0
RxDiscarded         : 100

        pvid: 2
        link: port:4 link:up speed:100baseT full-duplex auto
Port 5:
        mib: TxOctets            : 0
TxDropPkts          : 0
TxBroadcastPkts     : 0
TxMulticastPkts     : 0
TxUnicastPkts       : 0
TxCollisions        : 0
TxSingleCollision   : 0
TxMultipleCollision : 0
TxDeferredTransmit  : 0
TxLateCollision     : 0
TxExcessiveCollision: 0
TxPausePkts         : 0
RxOctets            : 0
RxUndersizePkts     : 0
RxPausePkts         : 0
Pkts64Octets        : 0
Pkts65to127Octets   : 0
Pkts128to255Octets  : 0
Pkts256to511Octets  : 0
Pkts512to1023Octets : 0
Pkts1024to1522Octets: 0
RxOversizePkts      : 0
RxJabbers           : 0
RxAlignmentErrors   : 0
RxFCSErrors         : 0
RxGoodOctets        : 0
RxDropPkts          : 0
RxUnicastPkts       : 0
RxMulticastPkts     : 0
RxBroadcastPkts     : 0
RxSAChanges         : 0
RxFragments         : 0
RxJumboPkts         : 0
RxSymbolErrors      : 0
RxDiscarded         : 0

        pvid: 0
        link: port:5 link:up speed:1000baseT full-duplex
VLAN 1:
        ports: 0 1 2 3 5t
VLAN 2:
        ports: 4 5t

(Last edited by Romandas on 17 Aug 2017, 17:49)

If your OpenWRT makefile is following the default structure then you should not need to do anything special in order to apply the patches during a 'make' command.

Romandas wrote:

I compiled latest OpenWrt with luci and now boot sems ok, but by default I cannot access 192.168.1.1 gataway from static adress. In Windows network conection is "Initializing....."

How are you trying to connect to the device? If it's through SSH, then remember that you need to set the root password through serial console or by using plain telnet before the Dropbear daemon is started. If you are trying to reach LuCI, then make sure the necessary services are started (uhttpd).

Since you have serial console access, I'd also check the network, firewall and dhcp configuration files for any oddities. The switch config seems fine to my eye.

Yes I set  strong pasword via serial connection. Only then I wrote via serial connection "uci set wireless.@wifi-device[0].disabled=0; uci commit wireless; wifi" and turned off windows firewall, then I was able to connect via ssh using that wireless open connection, but by LAN - no way.
I feel that I'm close, only my little knowlidge about configuring network stops runing router fully at the moment.
I think I have to start LAN connection similar, like I started wireless, I just don't know what to write in CLI yet.

Also I cannot access 192.168.1.1 by wireless also. How to check if Luci is realy installed? I checked Make menuconfig, and yes I haven't selected luci-app-uhttpd.. In next build I will include it. I must learn what Luci packages are essential.

Here are some configuration cheks:

root@OpenWrt:/# uci show network
network.loopback=interface
network.loopback.ifname='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127. 0. 0 .1'
network.loopback.netmask='255 .0. 0.0'
network.globals=globals
network.globals.ula_prefix='fd43:e3f7:558c::/48'
network.lan=interface
network.lan.type='bridge'
network.lan.ifname='eth0.1'
network.lan.proto='static'
network.lan.ipaddr='192. 168. 1.1'
network.lan.netmask='255. 255. 255.0'
network.lan.ip6assign='60'
network.wan=interface
network.wan.ifname='eth0.2'
network.wan.proto='dhcp'
network.wan6=interface
network.wan6.ifname='eth0.2'
network.wan6.proto='dhcpv6'
network.@switch[0]=switch
network.@switch[0].name='switch0'
network.@switch[0].reset='1'
network.@switch[0].enable_vlan='1'
network.@switch_vlan[0]=switch_vlan





root@OpenWrt:/# uci show dhcp
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].boguspriv='1'
dhcp.@dnsmasq[0].filterwin2k='0'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].nonegcache='0'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.auto'
dhcp.@dnsmasq[0].localservice='1'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.leasetime='12h'
dhcp.lan.dhcpv6='server'
dhcp.lan.ra='server'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'




root@OpenWrt:/# config dhcp lan
network.@switch_vlan[0].device='switch0'
network.@switch_vlan[0].vlan='1'
network.@switch_vlan[0].ports='0 1 2 3 5t'
network.@switch_vlan[1]=switch_vlan
network.@switch_vlan[1].device='switch0'
network.@switch_vlan[1].vlan='2'
network.@switch_vlan[1].ports='4 5t'




root@OpenWrt:/# cat /etc/config/wireless
config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:01.0/ssb0:0'
        option disabled '0'

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'




ifconfig
br-lan    Link encap:Ethernet  HWaddr xxxxxxxxxxxxxx
          inet addr:192.168.1.1  Bcast:192. 168. 1. 255  Mask:255. 255. 255.0
          inet6 addr: fd43:e3f7:558c::1/60 Scope:Global
          inet6 addr: fe80::6668:cff:fec7:878/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4838 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3952 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:371708 (362.9 KiB)  TX bytes:356131 (347.7 KiB)

eth0      Link encap:Ethernet  HWaddr xxxxxxxxxxxxxxx
          inet6 addr: fe80::6668:cff:fec7:878/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1252 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:233560 (228.0 KiB)

eth0.1    Link encap:Ethernet  HWaddr xxxxxxxxxxxxxx
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:784 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:74897 (73.1 KiB)

eth0.2    Link encap:Ethernet  HWaddr xxxxxxxxxxxxxxx
          inet6 addr: fe80::6668:cff:fec7:878/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:454 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:149964 (146.4 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:796 errors:0 dropped:0 overruns:0 frame:0
          TX packets:796 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:54240 (52.9 KiB)  TX bytes:54240 (52.9 KiB)

wlan0     Link encap:Ethernet  HWaddr xxxxxxxxxxxxxxxx
          inet6 addr: fe80::21a:2bff:fe80:d59b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:828 errors:0 dropped:0 overruns:0 frame:0
          TX packets:743 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:76103 (74.3 KiB)  TX bytes:83307 (81.3 KiB)





root@OpenWrt:~# cat /etc/config/firewall
config defaults
        option syn_flood        1
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT
# Uncomment this line to disable ipv6 rules
#       option disable_ipv6     1

config zone
        option name             lan
        list   network          'lan'
        option input            ACCEPT
        option output           ACCEPT
        option forward          ACCEPT

config zone
        option name             wan
        list   network          'wan'
        list   network          'wan6'
        option input            REJECT
        option output           ACCEPT
        option forward          REJECT
        option masq             1
        option mtu_fix          1

config forwarding
        option src              lan
        option dest             wan

# We need to accept udp packets on port 68,
# see  
config rule
        option name             Allow-DHCP-Renew
        option src              wan
        option proto            udp
        option dest_port        68
        option target           ACCEPT
        option family           ipv4

# Allow IPv4 ping
config rule
        option name             Allow-Ping
        option src              wan
        option proto            icmp
        option icmp_type        echo-request
        option family           ipv4
        option target           ACCEPT

config rule
        option name             Allow-IGMP
        option src              wan
        option proto            igmp
        option family           ipv4
        option target           ACCEPT

# Allow DHCPv6 replies
# see 
config rule
        option name             Allow-DHCPv6
        option src              wan
        option proto            udp
        option src_ip           fc00::/6
        option dest_ip          fc00::/6
        option dest_port        546
        option family           ipv6
        option target           ACCEPT

config rule
        option name             Allow-MLD
        option src              wan
        option proto            icmp
        option src_ip           fe80::/10
        list icmp_type          '130/0'
        list icmp_type          '131/0'
        list icmp_type          '132/0'
        list icmp_type          '143/0'
        option family           ipv6
        option target           ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
        option name             Allow-ICMPv6-Input
        option src              wan
        option proto    icmp
        list icmp_type          echo-request
        list icmp_type          echo-reply
        list icmp_type          destination-unreachable
        list icmp_type          packet-too-big
        list icmp_type          time-exceeded
        list icmp_type          bad-header
        list icmp_type          unknown-header-type
        list icmp_type          router-solicitation
        list icmp_type          neighbour-solicitation
        list icmp_type          router-advertisement
        list icmp_type          neighbour-advertisement
        option limit            1000/sec
        option family           ipv6
        option target           ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
        option name             Allow-ICMPv6-Forward
        option src              wan
        option dest             *
        option proto            icmp
        list icmp_type          echo-request
        list icmp_type          echo-reply
        list icmp_type          destination-unreachable
        list icmp_type          packet-too-big
        list icmp_type          time-exceeded
        list icmp_type          bad-header
        list icmp_type          unknown-header-type
        option limit            1000/sec
        option family           ipv6
        option target           ACCEPT

# include a file with users custom iptables rules
config include
        option path /etc/firewall.user


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option dest             wan
#       option proto    tcp
#       option target   REJECT

# block a specific mac on wan
#config rule
#       option dest             wan
#       option src_mac  xxxxxxxxxxxx
#       option target   REJECT

# block incoming ICMP traffic on a zone
#config rule
#       option src              lan
#       option proto    ICMP
#       option target   DROP

# port redirect port coming in on wan to lan
#config redirect
#       option src                      wan
#       option src_dport        80
#       option dest                     lan
#       option dest_ip          192.168.16.235
#       option dest_port        80
#       option proto            tcp

# port redirect of remapped ssh port (22001) on wan
#config redirect
#       option src              wan
#       option src_dport        22001
#       option dest             lan
#       option dest_port        22
#       option proto            tcp

# allow IPsec/ESP and ISAKMP passthrough
config rule
        option src              wan
        option dest             lan
        option proto            esp
        option target           ACCEPT

config rule
        option src              wan
        option dest             lan
        option dest_port        500
        option proto            udp
        option target           ACCEPT

### FULL CONFIG SECTIONS
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  xxxxxxxxxxxxx
#       option src_port 80
#       option dest             wan
#       option dest_ip  194.25.2.129
#       option dest_port        120
#       option proto    tcp
#       option target   REJECT

#config redirect
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  xxxxxxxxxxxxxxxx
#       option src_port         1024
#       option src_dport        80
#       option dest_ip  194.25.2.129
#       option dest_port        120
#       option proto    tcp





root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option localservice '1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv6 'server'
        option ra 'server'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'




root@OpenWrt:~# cat /etc/config/dropbear
config dropbear
        option PasswordAuth 'on'
        option RootPasswordAuth 'on'
        option Port         '22'
#       option BannerFile   '/etc/banner'



root@OpenWrt:~# cat /etc/config/system
config system
        option hostname OpenWrt
        option timezone UTC
        option ttylogin 0

config timeserver ntp
        list server     0.openwrt.pool.ntp.org
        list server     1.openwrt.pool.ntp.org
        list server     2.openwrt.pool.ntp.org
        list server     3.openwrt.pool.ntp.org
        option enabled 1
        option enable_server 0





root@OpenWrt:/# uci set wireless.@wifi-device[0].disabled=0; uci commit wireless
; wifi
root@OpenWrt:/# [  711.255275] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07)
[  711.372098] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  711.385837] device wlan0 entered promiscuous mode
[  711.412059] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  711.419567] br-lan: port 2(wlan0) entered forwarding state
[  711.425390] br-lan: port 2(wlan0) entered forwarding state
[  713.427173] br-lan: port 2(wlan0) entered forwarding state
[  721.699717] device wlan0 left promiscuous mode
[  721.704628] br-lan: port 2(wlan0) entered disabled state
[  722.539255] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07)
[  722.656135] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  722.669118] device wlan0 entered promiscuous mode
[  722.674457] br-lan: port 2(wlan0) entered forwarding state
[  722.680360] br-lan: port 2(wlan0) entered forwarding state
[  722.712072] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  724.683165] br-lan: port 2(wlan0) entered forwarding state

(Last edited by Romandas on 18 Aug 2017, 16:51)

I think I need to configure network settings (like creating my own "Factory" settings) in source before compiling, if it's possible. Because starting configuring from serial connection is not practical.

(Last edited by Romandas on 18 Aug 2017, 08:05)

Romandas wrote:

Yes I set  strong pasword via serial connection. Only then I wrote via serial connection "uci set wireless.@wifi-device[0].disabled=0; uci commit wireless" and turned off windows firewall, then I was able to connect via ssh using that wireless open connection, but by LAN - no way.

This sounds like correct behavior as by default, the wireless AP is not enabled.

Romandas wrote:

I think I have to start LAN connection similar, like I started wireless, I just don't know what to write in CLI yet.

This should not be necessary. The LAN network is up and running, as shown by your 'ifconfig' output.

Romandas wrote:

Also I cannot access 192.168.1.1 by wireless also.

First you say you can reach SSH via wireless, and then you say you cannot. Which one is it? Or is it that you can reach SSH through wireless, but not the LuCI web interface? And through the LAN connection, you can't reach either? If this is the case, then I'd look for the problem in the client-side. Is DHCP being used by the cabled network connection? If not, are the static address and netmask settings correct in relation to the LAN network on the router?

Romandas wrote:

How to check if Luci is realy installed? I checked Make menuconfig, and yes I haven't selected luci-app-uhttpd.. In next build I will include it. I must learn what Luci packages are essential.

The 'luci-app-base' is the only mandatory package. Selecting it should select all dependent packages correctly.

Note that LuCI is not a stand-alone "daemon" or "service". It is a web interface implemented in Lua scripting language, and it runs over the uhttpd web server service. When you make a HTTP request to address 192.168.1.1, the uhttpd web server redirects your request to the Lua handler, and it, in turn, will generate the HTML pages that you see as the LuCI web interface.

If you can reach SSH through wireless, but not LuCI, then ensure 'uhttpd' daemon is running -> 'ps' command will tell you. Both the cabled network interface and the wireless network interface are part of the 'LAN' logical network and belong to the 'LAN' firewall zone. As a result, the access rules and IP ranges are the same. It should make no difference what connection medium you use.

(Last edited by Antek on 18 Aug 2017, 10:21)

I compiled new openwrt and accessed 192.168.1.1 via wirelles after these comands via serial connection:
uci set wireless.@wifi-device[0].disabled=0; uci commit wireless; wifi
/etc/init.d/uhttpd start
/etc/init.d/uhttpd enable

Jeee! At last I can access Luci through wireless, but still no access to router by wire - no ssh to 192.168.1.1.
Is this OpenWrt settings fault, or hardware doesn't work?

https://image.ibb.co/mT8V95/Untitled.png

(Last edited by Romandas on 19 Aug 2017, 12:08)

I think your OpenWRT settings are good. If they weren't, then accessing the router through wireless would not work either: both the wireless and the wired connections are part of the same logical network called LAN. Same rules apply to both of them.

It is either a hardware issue at the router, or a problem in the client settings on the PC. But the OpenWRT settings, they're good.

In LAN physical settings, is eth0.1 connected to the LAN?  eth0 without a VLAN number should not be connected to anything.

When you unplug the cable to your PC, does the switch page show port 1 becoming disconnected?  Sometimes the port numbering is out of order.

mk24 wrote:

In LAN physical settings, is eth0.1 connected to the LAN?  eth0 without a VLAN number should not be connected to anything.

When you unplug the cable to your PC, does the switch page show port 1 becoming disconnected?  Sometimes the port numbering is out of order.

LAN Physical settings:
https://image.ibb.co/eVhYE5/LAN_physical.png

WAN physical settings:
https://image.ibb.co/dJjYgk/WAN_physical.png

WAN and wire LAN cables connected to router:
P.S. On my router box where I plugged LAN cable is written "1X", here is "LAN4", but maybe it's not important
https://image.ibb.co/gpt9Mk/plugged.png

WAN and wire LAN cables disconnected from router:
https://image.ibb.co/nvUS7Q/unplugged.png


In LEDE version wap-5813n.dst file I found this code, which is not in Openwrt wap-5813n.dst file, which I'm using:

&lsspi {
    switch@0 {
        compatible = "brcm,bcm53115";
        reg = <0>;
        spi-max-frequency = <781000>;

        lede,alias = "eth0";

        ports {
            #address-cells = <1>;
            #size-cells = <0>;

            lan@0 {
                reg = <0>;
                label = "lan4";
            };

            lan@1 {
                reg = <1>;
                label = "lan3";
            };

            lan@2 {
                reg = <2>;
                label = "lan2";
            };

            lan@3 {
                reg = <3>;
                label = "lan1";
            };

            wan@4 {
                reg = <4>;
                label = "wan";
            };

            cpu@5 {
                reg = <5>;
                label = "cpu";

                fixed-link {
                    speed = <1000>;
                    full-duplex;
                    asym-pause;
                    pause;
                };
            };
        };
    };
};

(Last edited by Romandas on 20 Aug 2017, 10:48)

Antek wrote:

It is either a hardware issue at the router, or a problem in the client settings on the PC. But the OpenWRT settings, they're good.

in my another thread (https://forum.openwrt.org/viewtopic.php?id=71824)
rj-45 wrote, that br-lan and wan have the same mac address.

My ethernet adapter settings:
https://image.ibb.co/huwaRk/Wire.png

(Last edited by Romandas on 20 Aug 2017, 07:47)

Romandas wrote:

In LEDE version wap-5813n.dst file I found this code, which is not in Openwrt wap-5813n.dst file, which I'm using:

This looks like the hardware configuration of the switch device. If these settings are incorrect for your router, then the LAN ports will most likely not work. That would explain the strange phenomenon. I do not know, nor can I find out the correct settings for your router, you'd need to consult the technical docs of the switch chip in order to find the correct settings.

@Romandas could you upload the compiled lede/openwrt image that you managed to make work? Also, have you found a way to use the router without access to a serial connection first?

Many thanks

aquarix, I did not manage to access openwrt/lede without serial TTL connection, so router still is useless. Do you have tools for serial acceess? You have 4MB flash router?

I do have the router (I assume we both got it from TEO / zebra), however not the required tools. I guess in my case I will have to change the defaults for wifi and the web-page server (which I apparently am not allowed to type in the message) pre-compile.. However I have not looked where these things are specified in the source. Any pointers? Do you think it's a reasonable way forward?

Yes, I'm also thinking to change settings in source, but didn't search for this yet. Also I think something is wrong with routers switch settings (it ports numbering etc.) - I think all problems related with it. It would be good to find switch settings in source.
I use standard commands for compiling, so can you in Linux.

git clone https://git.lede-project.org/source.git

Open "source" folder in terminal:
git fetch --tags
git tag -l
git checkout v17.01.2
sudo apt-get install
./scripts/feeds update -a
./scripts/feeds install -a
./scripts/feeds install tcpdump
make menuconfig (make adjustments to this router)
make -j 3 V=s

Yeah I have compiled it myself multiple times now, but no luck. Just FYI just attempted changing the default in package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh to start the wifi, but no luck.

In lede it's

--- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
+++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
@@ -463,7 +463,7 @@ detect_broadcom() {
                        set wireless.wl${i}.channel=${channel:-11}
                        set wireless.wl${i}.txantenna=3
                        set wireless.wl${i}.rxantenna=3
-                       set wireless.wl${i}.disabled=1
+                       # set wireless.wl${i}.disabled=1
 
                        set wireless.default_wl${i}=wifi-iface
                        set wireless.default_wl${i}.device=wl${i}

while in openwrt

diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
index a9c4de22e9..57698fe4a9 100644
--- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
+++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
@@ -463,7 +463,7 @@ config wifi-device  wl${i}
        option txantenna 3
        option rxantenna 3
        # REMOVE THIS LINE TO ENABLE WIFI:
-       option disabled 1
+       # option disabled 1
 
 config wifi-iface
        option device   wl${i}

Did you try to compile and boot with "set wireless.wl${i}.disabled=0"?

Sorry for the delay - yeah, I tried that, still no luck. Since I can't access the router, maybe the wifi does not start if it's not properly configured (and it's not by default)?

Actually advice from others how to enable wifi upon fresh install would be useful...

aquarix wrote:

Sorry for the delay - yeah, I tried that, still no luck. Since I can't access the router, maybe the wifi does not start if it's not properly configured (and it's not by default)?

Actually advice from others how to enable wifi upon fresh install would be useful...

In Lede forum, I got this answer:

You can build an image that includes your own custom network configuration file with wireless enabled
https://wiki.openwrt.org/doc/howto/build#custom_files

The discussion might have continued from here.