1 (edytowany przez Heinz 2016-09-08 23:25:11)

Temat: TP-Link EAP120

Witam. Jestem w trakcie dorabiana LEDE na tego AP.
Ogólnie obraz działa tylko bez najważniejszego. Nie wykrywa kabla w porcie lan.
Bootlog:

TP-LINK SafeLoader (Build time: Jul 28 2014 - 15:11:53)
CPU: 560MHz AHB: 440MHz DDR: 64MB
Performing LED check.  PASS
Press CTRL+B to enter SafeLoader: 1
>>>>>> malloc failed! 2-0x12000
>>>>>> malloc failed! 2-0x12000
open user-config failed.
>>>>>> malloc failed! 2-0x12000
open user-config failed.
Allocated memory for elf segment ok: addr: 0x80060000, size 0x140535
Loading .text @ 0x80060000 (1312053 bytes)

Starting kernel



OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... done!
Starting kernel at 80060000...

[    0.000000] Linux version 4.4.19 (hyniu@o2.pl) (gcc version 5.4.0 (LEDE GCC 5.4.0 r1519) ) #0 Thu Sep 8 13:28:39 2016
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] No valid device tree found, continuing without
[    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] 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] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  board=EAP120 mtdparts=spi0.0:128k(u-boot)ro,64k(pation-table)ro,64k(product-info)ro,1536k(kernel),14336k(rootfs),192k(config)ro,64k(ART)ro,15872k@0x40000(firmware) console=ttyS0,115200 rootfstype=squashfs,jffs2 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: 60164K/65536K available (2957K kernel code, 155K rwdata, 748K rodata, 292K init, 200K bss, 5372K 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:560.000MHz, DDR:450.000MHz, AHB:225.000MHz, Ref:40.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6825930166 ns
[    0.000009] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[    0.009049] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.082155] pid_max: default: 32768 minimum: 301
[    0.087642] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.095335] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.106309] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.118490] NET: Registered protocol family 16
[    0.125133] MIPS: machine is TP-LINK EAP120
[    0.362256] clocksource: Switched to clocksource MIPS
[    0.369528] NET: Registered protocol family 2
[    0.375459] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.383612] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.391001] TCP: Hash tables configured (established 1024 bind 1024)
[    0.398481] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.405309] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.412919] NET: Registered protocol family 1
[    0.422488] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.429662] Crashlog allocated RAM at address 0x3f00000
[    0.449872] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.456717] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.470909] io scheduler noop registered
[    0.475527] io scheduler deadline registered (default)
[    0.481690] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.489562] console [ttyS0] disabled
[    0.513819] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 2500000) is a 16550A
[    0.523848] console [ttyS0] enabled
[    0.523848] console [ttyS0] enabled
[    0.531261] bootconsole [early0] disabled
[    0.531261] bootconsole [early0] disabled
[    0.543073] m25p80 spi0.0: found s25fl128s, expected m25p80
[    0.548747] m25p80 spi0.0: s25fl128s (16384 Kbytes)
[    0.553783] 8 cmdlinepart partitions found on MTD device spi0.0
[    0.559782] Creating 8 MTD partitions on "spi0.0":
[    0.564668] 0x000000000000-0x000000020000 : "u-boot"
[    0.572047] 0x000000020000-0x000000030000 : "pation-table"
[    0.579416] 0x000000030000-0x000000040000 : "product-info"
[    0.586783] 0x000000040000-0x0000001c0000 : "kernel"
[    0.593595] 0x0000001c0000-0x000000fc0000 : "rootfs"
[    0.600336] mtd: device 4 (rootfs) set to be root filesystem
[    0.606213] 1 squashfs-split partitions found on MTD device rootfs
[    0.612508] 0x000000390000-0x000000fc0000 : "rootfs_data"
[    0.619746] 0x000000fc0000-0x000000ff0000 : "config"
[    0.626569] 0x000000ff0000-0x000001000000 : "ART"
[    0.633133] 0x000000040000-0x000000fc0000 : "firmware"
[    0.655791] libphy: ag71xx_mdio: probed
[    1.244025] ag71xx-mdio.1: Found an AR934X built-in switch
[    1.286443] eth0: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    1.294784] NET: Registered protocol family 10
[    1.303409] NET: Registered protocol family 17
[    1.308001] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.320972] 8021q: 802.1Q VLAN Support v1.8
[    1.333130] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    1.342010] Freeing unused kernel memory: 292K (80427000 - 80470000)
[    2.493219] init: Console is alive
[    2.496911] init: - watchdog -
[    3.414757] init: - preinit -
[    3.967511] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    4.002953] random: procd: uninitialized urandom read (4 bytes read, 6 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
[    7.329823] jffs2: notice: (351) 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.347157] mount_root: switching to jffs2 overlay
[    7.361364] urandom-seed: Seeding with /etc/urandom.seed
[    7.568106] procd: - early -
[    7.571153] procd: - watchdog -
[    8.201010] procd: - ubus -
[    8.255465] random: ubusd: uninitialized urandom read (4 bytes read, 13 bits of entropy available)
[    8.265113] random: ubusd: uninitialized urandom read (4 bytes read, 13 bits of entropy available)
[    8.274376] random: ubusd: uninitialized urandom read (4 bytes read, 13 bits of entropy available)
[    8.283948] random: ubusd: uninitialized urandom read (4 bytes read, 13 bits of entropy available)
[    8.293192] random: ubusd: uninitialized urandom read (4 bytes read, 13 bits of entropy available)
[    8.303511] random: ubusd: uninitialized urandom read (4 bytes read, 13 bits of entropy available)
[    8.312963] random: ubusd: uninitialized urandom read (4 bytes read, 13 bits of entropy available)
[    8.322586] procd: - init -
Please press Enter to activate this console.
[    8.648810] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    8.667987] Loading modules backported from Linux version wt-2016-06-20-0-gbc17424
[    8.675725] Backport generated by backports.git backports-20160216-7-g5735958
[    8.686222] ip_tables: (C) 2000-2006 Netfilter Core Team
[    8.701932] nf_conntrack version 0.5.0 (944 buckets, 3776 max)
[    8.746913] xt_time: kernel timezone is -0000
[    8.815248] PPP generic driver version 2.4.2
[    8.822390] NET: Registered protocol family 24
[    8.893359] ieee80211 phy0: Atheros AR9340 Rev:2 mem=0xb8100000, irq=47
[   10.780821] random: jshn: uninitialized urandom read (4 bytes read, 17 bits of entropy available)
[   10.875020] random: ubusd: uninitialized urandom read (4 bytes read, 17 bits of entropy available)
[   16.499974] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   16.534822] device eth0.1 entered promiscuous mode
[   16.539696] device eth0 entered promiscuous mode
[   16.554805] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   16.608134] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready



BusyBox v1.24.2 () built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (HEAD, r1535)
    \________\/    -----------------------------------------------------------

 -----------------------------------------------------------------------------
 | Machine: TP-Link EAP120 v1.0, Name: lede                                  |
 | System uptime: 00:00:46, Now: 2016-09-08 13:30:23                         |
 | System load: 0.18, 0.06, 0.02                                             |
 | RootFS: total: 12.2MB, used: 468KB, 3.8%, free: 11.7MB                    |
 | Memory: total: 59.0MB, used: 10.2MB, 17.3%, free: 48.8MB                  |
 | LAN: 192.168.1.1/24(br-lan)                                               |
 | DHCP: 192.168.1.100-249, dhcp.leases: 0                                   |
 -----------------------------------------------------------------------------
root@lede:/# [   78.522289] random: nonblocking pool is initialized

root@lede:/# swconfig dev switch0 show
Global attributes:
        enable_vlan: 1
Port 0:
        pvid: 0
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
        pvid: 0
        link: port:1 link:down
Port 2:
        pvid: 0
        link: port:2 link:down
Port 3:
        pvid: 0
        link: port:3 link:down
Port 4:
        pvid: 2
        link: port:4 link:down
Port 5:
        pvid: 1
        link: port:5 link:down
VLAN 0:
        vid: 0
        ports: 0t 1 2 3
VLAN 1:
        vid: 1
        ports: 0t 5
VLAN 2:
        vid: 2
        ports: 0t 4
root@lede:/# ifconfig -a
br-lan    Link encap:Ethernet  HWaddr 14:CC:20:2D:57:91
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fde4:1b1d:3449::1/60 Scope:Global
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 14:CC:20:2D:57:91
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:5

eth0.1    Link encap:Ethernet  HWaddr 14:CC:20:2D:57:91
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0.2    Link encap:Ethernet  HWaddr 14:CC:20:2D:57:91
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

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:128 errors:0 dropped:0 overruns:0 frame:0
          TX packets:128 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:8376 (8.1 KiB)  TX bytes:8376 (8.1 KiB)

wlan0     Link encap:Ethernet  HWaddr 14:CC:20:2D:57:91
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@lede:/#

sorki za sysinfo, ale mi się podobało.

obojętnie czy ustawię vlany czy nie w swconfig zawsze inne porty niż 0 są down.
Na komputerze pokazuje że kabel podłączony, ale nie ma żadnego ruchu.

To co na razie zmieniłem: https://github.com/heinzek/eap120/commi … db9114a9c7
Bazowałem głównie na CPE510:
https://wiki.openwrt.org/toh/tp-link/tl-cpe510
https://wiki.openwrt.org/toh/tp-link/tl-cpe210

Gdzie szukać przyczyny? Bo wydaje mi się że switch nie ma połączenia z SoC.

Z działających rzeczy to WiFi, MAC, ledy, przycisk, sysupgrade, wgranie przez oficjalne firmware (ale tylko w wersji UN, dla EU i US firmware ma podpis RSA i sprawdza go przed aktualizacją)

https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos

2

Odp: TP-Link EAP120

1. Nazwy dla LEDów - nie powinno być model:kolor:funkcja? Może daj status? Coś chyba w OFW te diody robią?
2. Dlaczego wyłączasz JTAG skoro i tak nie korzystasz z GPIO0-3? Jak ja nie lubię kopiowania na ślepo bez zrozumienia...
3. Sieć... może zacznijmy od tego, co jest na PCB, a potem przejdziemy do kwestii obsłużenia tego w kodzie.

3

Odp: TP-Link EAP120

1. Może powinno, lepiej wygląda. Nazwałem system, bo większość tplinków tak miała. Na OFW ta dioda cały czas świeci na zielono tylko podczas aktualizacji zmienia kolor na zółty.
2. Miałem to zakomentowane, odkomentowałem dla próby i już zapomniałem zakomentować. - naprawione
3. http://tplink-forum.pl/uploader/uploads/1473404623.JPG
http://tplink-forum.pl/uploader/uploads/1473405428.jpg

Widać jest tam AR8035 który nie jest widoczny w bootlogu.
ps. tam jest tylko jeden port LAN ten drugi to port "CONSOLE" przez który idzie się podłączyć do zwykłego portu RS232( konwerter napięc ZT1385LEEA jest pod spodem płytki)

Ktoś coś?

https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos

4

Odp: TP-Link EAP120

Doszedłem do etapu że szuka tego switcha ale nie potrafi znaleźć:

[    0.643087] libphy: ag71xx_mdio: probed
[    1.233529] ag71xx ag71xx.0: no PHY found with phy_mask=00000008

W kodzie zmieniłem:
    ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0);
    ath79_init_mac(ath79_eth0_data.mac_addr,mac , 0);

    ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
    ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
   
    ath79_register_mdio(0, ~BIT(3));
    ath79_eth0_data.phy_mask = BIT(3);
    ath79_register_eth(0);

Próbowałem ustawiałem ten bit z phy_mask od 0 do 5 i dalej nie wyszukuje switcha.

Z źródeł dostępnych na oficjalnej stronie udało mi się tylko znaleźć

[..]#eap phy
export ETH_CONFIG2=_ar8033
export ATH_GMAC0_MII=ATHR_RGMII

#sgmii defines
export ATH_CFG_SGMII=1
export ATH_SGMII_FORCED=1
export ATH_RGMII_CAL=1

#func def for eap
export CONFIG_EAP_SUPPORT=1
export CONFIG_FLASH_SIZE=16
export CONFIG_8035_PHY0_ADDR=0x4

export CONFIG_SUPPORT_DRIVER_9_5_3_16=1

jednak nie mam pojęcia co z tego by szło użyć.


Dziś już chyba wypróbowałem z 30 różnych ustawień, ale nie mam pojęcia co i jak.

https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos

5

Odp: TP-Link EAP120

No tak, masz zewnętrzny switch i dlatego Ci to nie działa.
Spróbuj dodać:

static struct at803x_platform_data eap120_ar8035_data = {
    .enable_rgmii_tx_delay = 1,
    .enable_rgmii_rx_delay = 1,
};

static struct mdio_board_info eap120_mdio0_info[] = {
    {
        .bus_id = "ag71xx-mdio.0",
        .phy_addr = 0,
        .platform_data = &eap120_ar8035_data,
    },
};

I zaraz przed ath79_register_mdio():

mdiobus_register_board_info(eap120_mdio0_info, ARRAY_SIZE(eap120_mdio0_info));

Tylko musisz sobie metodą prób i błędów sprawdzić na którym mdio i do którego gmac to jest podłączone smile
Albo najlepiej, weź z udostępnionych źródeł.

6

Odp: TP-Link EAP120

Brakowało jeszcze wpisu na początku: 

#include <linux/platform_data/phy-at803x.h>


Ale sytuacja bez zmian. W oficjalnych źródłach nic nie umiem wyszukać na temat tego AR8035.
Co do mdio to na 0 jest raczej ten switch, bo na mdio1 jest switch wbudowany w SoC.

ps. Jak zmienie coś w tym pliku to pliku to przy wykonaniu polecenia make za każdym razem buduje kernel ( make[2] target/compile, make[3] -C target/linux compile)od nowa a jak zmiany są złe to błędy są dopiero przy "instalowaniu" (make[2] target/install make[3] -C target/linux install). Czy trzeba za każdym razem kompilować od nowa?

https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos

7

Odp: TP-Link EAP120

Przeszukałem trochę kodu i znalazłem taką "funkcję" of_mdio.c w źródłach LEDE:

/*
 * OF helpers for the MDIO (Ethernet PHY) API
 *
 * Copyright (c) 2009 Secret Lab Technologies, Ltd.
 *
 * This file is released under the GPLv2
 *
 * This file provides helper functions for extracting PHY device information
 * out of the OpenFirmware device tree and using it to populate an mii_bus.
 */

#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/netdevice.h>
#include <linux/err.h>
#include <linux/phy.h>
#include <linux/phy_fixed.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
#include <linux/of_irq.h>
#include <linux/of_mdio.h>
#include <linux/module.h>

MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
MODULE_LICENSE("GPL");

/* Extract the clause 22 phy ID from the compatible string of the form
 * ethernet-phy-idAAAA.BBBB */
static int of_get_phy_id(struct device_node *device, u32 *phy_id)
{
    struct property *prop;
    const char *cp;
    unsigned int upper, lower;

    of_property_for_each_string(device, "compatible", prop, cp) {
        if (sscanf(cp, "ethernet-phy-id%4x.%4x", &upper, &lower) == 2) {
            *phy_id = ((upper & 0xFFFF) << 16) | (lower & 0xFFFF);
            return 0;
        }
    }
    return -EINVAL;
}

static int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *child,
                   u32 addr)
{
    struct phy_device *phy;
    bool is_c45;
    int rc;
    u32 phy_id;

    is_c45 = of_device_is_compatible(child,
                     "ethernet-phy-ieee802.3-c45");

    if (!is_c45 && !of_get_phy_id(child, &phy_id))
        phy = phy_device_create(mdio, addr, phy_id, 0, NULL);
    else
        phy = get_phy_device(mdio, addr, is_c45);
    if (!phy || IS_ERR(phy))
        return 1;

    rc = irq_of_parse_and_map(child, 0);
    if (rc > 0) {
        phy->irq = rc;
        if (mdio->irq)
            mdio->irq[addr] = rc;
    } else {
        if (mdio->irq)
            phy->irq = mdio->irq[addr];
    }

    if (of_property_read_bool(child, "broken-turn-around"))
        mdio->phy_ignore_ta_mask |= 1 << addr;

    /* Associate the OF node with the device structure so it
     * can be looked up later */
    of_node_get(child);
    phy->dev.of_node = child;

    /* All data is now stored in the phy struct;
     * register it */
    rc = phy_device_register(phy);
    if (rc) {
        phy_device_free(phy);
        of_node_put(child);
        return 1;
    }

    dev_dbg(&mdio->dev, "registered phy %s at address %i\n",
        child->name, addr);

    return 0;
}

int of_mdio_parse_addr(struct device *dev, const struct device_node *np)
{
    u32 addr;
    int ret;

    ret = of_property_read_u32(np, "reg", &addr);
    if (ret < 0) {
        dev_err(dev, "%s has invalid PHY address\n", np->full_name);
        return ret;
    }

    /* A PHY must have a reg property in the range [0-31] */
    if (addr >= PHY_MAX_ADDR) {
        dev_err(dev, "%s PHY address %i is too large\n",
            np->full_name, addr);
        return -EINVAL;
    }

    return addr;
}
EXPORT_SYMBOL(of_mdio_parse_addr);

/**
 * of_mdiobus_register - Register mii_bus and create PHYs from the device tree
 * @mdio: pointer to mii_bus structure
 * @np: pointer to device_node of MDIO bus.
 *
 * This function registers the mii_bus structure and registers a phy_device
 * for each child node of @np.
 */
int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
{
    struct device_node *child;
    const __be32 *paddr;
    bool scanphys = false;
    int addr, rc, i;

    /* Mask out all PHYs from auto probing.  Instead the PHYs listed in
     * the device tree are populated after the bus has been registered */
    mdio->phy_mask = ~0;

    /* Clear all the IRQ properties */
    if (mdio->irq)
        for (i=0; i<PHY_MAX_ADDR; i++)
            mdio->irq[i] = PHY_POLL;

    mdio->dev.of_node = np;

    /* Register the MDIO bus */
    rc = mdiobus_register(mdio);
    if (rc)
        return rc;

    /* Loop over the child nodes and register a phy_device for each one */
    for_each_available_child_of_node(np, child) {
        addr = of_mdio_parse_addr(&mdio->dev, child);
        if (addr < 0) {
            scanphys = true;
            continue;
        }

        rc = of_mdiobus_register_phy(mdio, child, addr);
        if (rc)
            continue;
    }

    if (!scanphys)
        return 0;

    /* auto scan for PHYs with empty reg property */
    for_each_available_child_of_node(np, child) {
        /* Skip PHYs with reg property set */
        paddr = of_get_property(child, "reg", NULL);
        if (paddr)
            continue;

        for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
            /* skip already registered PHYs */
            if (mdio->phy_map[addr])
                continue;

            /* be noisy to encourage people to set reg property */
            dev_info(&mdio->dev, "scan phy %s at address %i\n",
                 child->name, addr);

            rc = of_mdiobus_register_phy(mdio, child, addr);
            if (rc)
                continue;
        }
    }

    return 0;
}
EXPORT_SYMBOL(of_mdiobus_register);

/* Helper function for of_phy_find_device */
static int of_phy_match(struct device *dev, void *phy_np)
{
    return dev->of_node == phy_np;
}

/**
 * of_phy_find_device - Give a PHY node, find the phy_device
 * @phy_np: Pointer to the phy's device tree node
 *
 * If successful, returns a pointer to the phy_device with the embedded
 * struct device refcount incremented by one, or NULL on failure.
 */
struct phy_device *of_phy_find_device(struct device_node *phy_np)
{
    struct device *d;
    if (!phy_np)
        return NULL;

    d = bus_find_device(&mdio_bus_type, NULL, phy_np, of_phy_match);
    return d ? to_phy_device(d) : NULL;
}
EXPORT_SYMBOL(of_phy_find_device);

/**
 * of_phy_connect - Connect to the phy described in the device tree
 * @dev: pointer to net_device claiming the phy
 * @phy_np: Pointer to device tree node for the PHY
 * @hndlr: Link state callback for the network device
 * @iface: PHY data interface type
 *
 * If successful, returns a pointer to the phy_device with the embedded
 * struct device refcount incremented by one, or NULL on failure. The
 * refcount must be dropped by calling phy_disconnect() or phy_detach().
 */
struct phy_device *of_phy_connect(struct net_device *dev,
                  struct device_node *phy_np,
                  void (*hndlr)(struct net_device *), u32 flags,
                  phy_interface_t iface)
{
    struct phy_device *phy = of_phy_find_device(phy_np);
    int ret;

    if (!phy)
        return NULL;

    phy->dev_flags = flags;

    ret = phy_connect_direct(dev, phy, hndlr, iface);

    /* refcount is held by phy_connect_direct() on success */
    put_device(&phy->dev);

    return ret ? NULL : phy;
}
EXPORT_SYMBOL(of_phy_connect);

/**
 * of_phy_attach - Attach to a PHY without starting the state machine
 * @dev: pointer to net_device claiming the phy
 * @phy_np: Node pointer for the PHY
 * @flags: flags to pass to the PHY
 * @iface: PHY data interface type
 *
 * If successful, returns a pointer to the phy_device with the embedded
 * struct device refcount incremented by one, or NULL on failure. The
 * refcount must be dropped by calling phy_disconnect() or phy_detach().
 */
struct phy_device *of_phy_attach(struct net_device *dev,
                 struct device_node *phy_np, u32 flags,
                 phy_interface_t iface)
{
    struct phy_device *phy = of_phy_find_device(phy_np);
    int ret;

    if (!phy)
        return NULL;

    ret = phy_attach_direct(dev, phy, flags, iface);

    /* refcount is held by phy_attach_direct() on success */
    put_device(&phy->dev);

    return ret ? NULL : phy;
}
EXPORT_SYMBOL(of_phy_attach);

#if defined(CONFIG_FIXED_PHY)
/*
 * of_phy_is_fixed_link() and of_phy_register_fixed_link() must
 * support two DT bindings:
 * - the old DT binding, where 'fixed-link' was a property with 5
 *   cells encoding various informations about the fixed PHY
 * - the new DT binding, where 'fixed-link' is a sub-node of the
 *   Ethernet device.
 */
bool of_phy_is_fixed_link(struct device_node *np)
{
    struct device_node *dn;
    int len, err;
    const char *managed;

    /* New binding */
    dn = of_get_child_by_name(np, "fixed-link");
    if (dn) {
        of_node_put(dn);
        return true;
    }

    err = of_property_read_string(np, "managed", &managed);
    if (err == 0 && strcmp(managed, "auto") != 0)
        return true;

    /* Old binding */
    if (of_get_property(np, "fixed-link", &len) &&
        len == (5 * sizeof(__be32)))
        return true;

    return false;
}
EXPORT_SYMBOL(of_phy_is_fixed_link);

int of_phy_register_fixed_link(struct device_node *np)
{
    struct fixed_phy_status status = {};
    struct device_node *fixed_link_node;
    const __be32 *fixed_link_prop;
    int link_gpio;
    int len, err;
    struct phy_device *phy;
    const char *managed;

    err = of_property_read_string(np, "managed", &managed);
    if (err == 0) {
        if (strcmp(managed, "in-band-status") == 0) {
            /* status is zeroed, namely its .link member */
            phy = fixed_phy_register(PHY_POLL, &status, -1, np);
            return IS_ERR(phy) ? PTR_ERR(phy) : 0;
        }
    }

    /* New binding */
    fixed_link_node = of_get_child_by_name(np, "fixed-link");
    if (fixed_link_node) {
        status.link = 1;
        status.duplex = of_property_read_bool(fixed_link_node,
                              "full-duplex");
        if (of_property_read_u32(fixed_link_node, "speed", &status.speed))
            return -EINVAL;
        status.pause = of_property_read_bool(fixed_link_node, "pause");
        status.asym_pause = of_property_read_bool(fixed_link_node,
                              "asym-pause");
        link_gpio = of_get_named_gpio_flags(fixed_link_node,
                            "link-gpios", 0, NULL);
        of_node_put(fixed_link_node);
        if (link_gpio == -EPROBE_DEFER)
            return -EPROBE_DEFER;

        phy = fixed_phy_register(PHY_POLL, &status, link_gpio, np);
        return IS_ERR(phy) ? PTR_ERR(phy) : 0;
    }

    /* Old binding */
    fixed_link_prop = of_get_property(np, "fixed-link", &len);
    if (fixed_link_prop && len == (5 * sizeof(__be32))) {
        status.link = 1;
        status.duplex = be32_to_cpu(fixed_link_prop[1]);
        status.speed = be32_to_cpu(fixed_link_prop[2]);
        status.pause = be32_to_cpu(fixed_link_prop[3]);
        status.asym_pause = be32_to_cpu(fixed_link_prop[4]);
        phy = fixed_phy_register(PHY_POLL, &status, -1, np);
        return IS_ERR(phy) ? PTR_ERR(phy) : 0;
    }

    return -ENODEV;
}
EXPORT_SYMBOL(of_phy_register_fixed_link);
#endif

Czy to się nadaje do przeszukiwania phy? Jak to użyć?
Choć całkiem możliwe że jest to już używane.



kolejna sprawa to te błędy w ubus:
[    8.255465] random: ubusd: uninitialized urandom read (4 bytes read, 13 bits of entropy available)

Czy to jest coś ważnego?

https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos

8

Odp: TP-Link EAP120

Tyle to w/w funkcje czytają z dtsu....

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

9

Odp: TP-Link EAP120

Może jakiś pomysł co tam wpisać żeby uruchomić te wyszukiwanie?

https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos

10

Odp: TP-Link EAP120

Trudna sprawa z tym switchem.
Znalazłem patcha do TP-Link RE450 ( https://patchwork.ozlabs.org/patch/564149/ ), który też ma w switch na AR8035. Tam był on podłączony do MDIO-GPIO więc poszukałem datasheet do AR8035 ( http://www.redeszone.net/app/uploads/2014/04/AR8035.pdf ) i zlokalizowałem piny MDC oraz MDIO. Sprawdziłem połączenia i wyszło, że idą do linii GPIO dokładniej 16 i 17.
Dodałem w mach-eap120.c obsługę tego wszystkiego jednak dalej bez skutku:

[    0.646011] libphy: GPIO Bitbanged MDIO: probed
[    1.233123] ag71xx ag71xx.0: no PHY found with phy_mask=000000ff

Aktualnie konfiguracja wygląda tak:

/*
 *  TP-LINK EAP120 board support
 */

#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <linux/platform_data/mdio-gpio.h> 
#include <asm/mach-ath79/ath79.h>
#include <asm/mach-ath79/ar71xx_regs.h>
#include <linux/platform_data/phy-at803x.h>

#include "common.h"
#include "dev-eth.h"
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"
#include "dev-m25p80.h"
#include "dev-wmac.h"
#include "machtypes.h"


#define EAP120_GPIO_LED_RED    12
#define EAP120_GPIO_LED_YEL    13
#define EAP120_GPIO_LED_GRN    15
#define EAP120_GPIO_BTN_RESET    4

#define EAP120_KEYS_POLL_INTERVAL    20 /* msecs */
#define EAP120_KEYS_DEBOUNCE_INTERVAL    (3 * EAP120_KEYS_POLL_INTERVAL)

#define EAP120_GPIO_SMI_MDIO        17
#define EAP120_GPIO_SMI_MDC        16

#define EAP120_LAN_PHYADDR        4

static struct gpio_led eap120_leds_gpio[] __initdata = {
    {
        .name        = "eap120:red:system",
        .gpio        = EAP120_GPIO_LED_RED,
        .active_low    = 1,
    }, {
        .name        = "eap120:yellow:system",
        .gpio        = EAP120_GPIO_LED_YEL,
        .active_low    = 1,
    }, {
        .name        = "eap120:green:system",
        .gpio        = EAP120_GPIO_LED_GRN,
        .active_low    = 1,
    },
};

static struct gpio_keys_button eap120_gpio_keys[] __initdata = {
    {
        .desc        = "Reset button",
        .type        = EV_KEY,
        .code        = KEY_RESTART,
        .debounce_interval = EAP120_KEYS_DEBOUNCE_INTERVAL,
        .gpio        = EAP120_GPIO_BTN_RESET,
        .active_low    = 1,
    }
};

static struct mdio_gpio_platform_data eap120_mdio = {
    .mdc        = EAP120_GPIO_SMI_MDC,
    .mdio        = EAP120_GPIO_SMI_MDIO,
    .phy_mask    = ~BIT(EAP120_LAN_PHYADDR),
};

static struct platform_device eap120_phy_device = {
    .name    = "mdio-gpio",
    .id    = 0,
    .dev    = {
        .platform_data = &eap120_mdio,
    },
};

static void __init eap_setup(u8 *mac)
{
    /* Disable JTAG, enabling GPIOs 0-3 */
    /* Configure OBS4 line, for GPIO 4*/
/*    ath79_gpio_function_setup(AR934X_GPIO_FUNC_JTAG_DISABLE,
                  AR934X_GPIO_FUNC_CLK_OBS4_EN);*/

    ath79_register_leds_gpio(-1, ARRAY_SIZE(eap120_leds_gpio),
                 eap120_leds_gpio);

    ath79_register_gpio_keys_polled(1, EAP120_KEYS_POLL_INTERVAL,
                    ARRAY_SIZE(eap120_gpio_keys),
                    eap120_gpio_keys);

    ath79_register_m25p80(NULL);

    /* MDIO Interface */
    platform_device_register(&eap120_phy_device);

    ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0);

    /* GMAC0 is connected to the RGMII interface to an Atheros AR8035-A */
    ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
    ath79_eth0_data.mii_bus_dev = &eap120_phy_device.dev;
    ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
    ath79_eth0_data.phy_mask = BIT(EAP120_LAN_PHYADDR);
    ath79_eth0_pll_data.pll_1000 = 0xa6000000;
    ath79_eth0_pll_data.pll_100 = 0xa0000101;
    ath79_eth0_pll_data.pll_10 = 0x80001313;
    ath79_register_eth(0);
}

static void __init eap120_setup(void)
{
    u8 *mac = (u8 *) KSEG1ADDR(0x1f030008);
    u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);

    eap_setup(mac);

    ath79_register_wmac(ee, mac);
}

MIPS_MACHINE(ATH79_MACH_EAP120, "EAP120", "TP-LINK EAP120",
         eap120_setup);

Jakieś pomysły?

https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos

11 (edytowany przez Heinz 2016-09-18 19:25:07)

Odp: TP-Link EAP120

No zadziałało jakoś się zagapiłem i wpisałem odwrotnie gpio.

Switch jest wykrywany:

[    0.644090] libphy: GPIO Bitbanged MDIO: probed
[    1.312556] ag71xx ag71xx.0: connected to PHY at gpio-0:04 [uid=004dd072, driver=Atheros 8035 ethernet]
[    1.322850] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII

Wykrywa kabel i ustawia połączenie na 1000Mbit/s jednak nie ma ruchu.

[  388.682669] eth0: link down
[  388.685896] br-lan: port 1(eth0) entered disabled state
[  393.683840] eth0: link up (1000Mbps/Full duplex)
[  393.688715] br-lan: port 1(eth0) entered forwarding state
[  393.694304] br-lan: port 1(eth0) entered forwarding state
[  395.692057] br-lan: port 1(eth0) entered forwarding state

network:

root@(none):/# cat /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fd5e:3b17:1fe7::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

swconfig nie wykrywa nic.

root@lede:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr 14:CC:20:2D:57:91
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd05:8c87:cb72::1/60 Scope:Global
          inet6 addr: fe80::16cc:20ff:fe2d:5791/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:968 errors:0 dropped:0 overruns:0 frame:0
          TX packets:459 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:70410 (68.7 KiB)  TX bytes:39667 (38.7 KiB)

eth0      Link encap:Ethernet  HWaddr 14:CC:20:2D:57:91
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:355 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:29837 (29.1 KiB)
          Interrupt:4

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:288 errors:0 dropped:0 overruns:0 frame:0
          TX packets:288 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:18720 (18.2 KiB)  TX bytes:18720 (18.2 KiB)

wlan0     Link encap:Ethernet  HWaddr 14:CC:20:2D:57:91
          inet6 addr: fe80::16cc:20ff:fe2d:5791/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1166 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1005 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:134215 (131.0 KiB)  TX bytes:108416 (105.8 KiB)
https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos

12

Odp: TP-Link EAP120

W końcu udało się.
Brakowało wpisu:

+static struct at803x_platform_data eap120_ar8035_data = {
    .disable_smarteee = 0,
    .enable_rgmii_rx_delay = 1,
    .enable_rgmii_tx_delay = 0,
    .fixup_rgmii_tx_delay = 1,
};
https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos

13

Odp: TP-Link EAP120

Brawo.
To teraz wyślij łatki, a dobre, zimne piwko podane przez skąpo odzianą, blond piękność, będzie Ci się należeć jak psu buda!

14 (edytowany przez Cezary 2016-09-21 07:45:46)

Odp: TP-Link EAP120

Ekstra! Kolejny router opanowany.

PS: MR200 masz to też byś zrobił, bo człowiek na forum openwrt.org płacze...

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

15

Odp: TP-Link EAP120

Łatki pojechały. zobaczymy czy wszystko będzie dla nich OK.

Tego MR200 da się zrobić, jednak wgranie przez GUI jak na mnie chyba nie do osiągnięcia.

Kolejna sprawa której nie umiem ruszyć to GPIO dla ledów od zasięgu, te ledy zapalają się jak podłącza się kabel do portów lan.

Ale zacznę to w osobnym temacie.

https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos

16

Odp: TP-Link EAP120

Gość pisał że przez tftp się da? Jeżeli tak to IMO wystarczy, ważne że jest sposób.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

17

Odp: TP-Link EAP120

A co takiego magicznego jest z obrazem dla MR200?

18

Odp: TP-Link EAP120

Tamten firmware ma w sobie nagłówek, bootloader, firmware, firmware dla modemu. razem zajmuje ponad 60MB

Sprubuje, może coś wykombinuje.

Takie pytanko w sprawie github: Normalnie zawsze robię folk i w master zrobiłem zmiany które posłałem w PR. Nie chciał bym jeszcze tego usuwać a zacząć nowe zmiany dla mr200. Co najlepiej zrobić?

https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos

19

Odp: TP-Link EAP120

Nowy branch. Generalnie to https://github.com/Kunena/Kunena-Forum/ … e-branches i podobne historyjki.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

20

Odp: TP-Link EAP120

Heinz napisał/a:

Takie pytanko w sprawie github: Normalnie zawsze robię folk i w master zrobiłem zmiany które posłałem w PR. Nie chciał bym jeszcze tego usuwać a zacząć nowe zmiany dla mr200. Co najlepiej zrobić?

ZAWSZE swoje zmiany, które chcesz wysłać w PR robisz w osobnej gałęzi. Dzięki temu możesz potem wypchnąć od siebie kolejne zmiany albo przebazować je na zaktualizowaną główną gałąź jak PR długo leży i już nie można go łatwo włączyć, bo są konflikty.

21

Odp: TP-Link EAP120

Z takich prób na szybko:
info o oficjalnym firmware (UN):

File name              : /home/hyniu/Pulpit/Archer MR200v1_0.9.1_0.0_update_1041_1021_2009.bin
File size              : 0x03486273 / 55075443 bytes
Version 2 Header size  : 0x00000200 /      512 bytes
Unknown value 1        : 0x01000000 / 16777216 bytes
Header MD5Sum1         : bb c0 50 dc c2 34 0f e2 fa 17 9c f6 47 20 b2 a3 (*ERROR*)
          --> expected : 72 f7 b1 a3 b2 72 3f 2a 24 d1 07 56 ab 9c 21 8f 
Header MD5Sum2         : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff (purpose yet unknown, unchecked here)

Firmware version       : ver. 2.0
Hardware ID            : 0xd7500001 (ArcherMR200)
Hardware Revision      : 0x0000004a (ok)
Software version       : 0.9.1-0.0

Kernel data offset     : 0x00000200 /      512 bytes
Kernel data length     : 0x00136338 /  1270584 bytes
Kernel load address    : 0x00000080                  (OpenWrt default: 0x80000000)
Kernel entry point     : 0x50c10080                  (OpenWrt default: 0x80000000)
Rootfs data offset     : 0x00140000 /  1310720 bytes (== OpenWrt default)
Rootfs data length     : 0x00483000 /  4730880 bytes
Boot loader data offset: 0x00000000 /        0 bytes
Boot loader data length: 0x0001d6ac /   120492 bytes
Total firmware length  : 0x007d0200 /  8192512 bytes

Najnowsza oficjalna wersja (EU):

File size              : 0x0348871b / 55084827 bytes
Version 2 Header size  : 0x00000200 /      512 bytes
Header MD5Sum1         : ce cd 33 a1 a5 62 08 e2 03 7c 2f 47 d1 61 d5 37 (*ERROR*)
          --> expected : 8d 9b b8 d7 67 66 5e 76 5d d9 51 f2 ac bc 16 28 
Header MD5Sum2         : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff (purpose yet unknown, unchecked here)

Firmware version       : ver. 2.0
Hardware ID            : 0xd7500001 (ArcherMR200)
Hardware Revision      : 0x0000004a (ok)
Software version       : 0.9.1-0.0

Kernel data offset     : 0x00000200 /      512 bytes
Kernel data length     : 0x001361ec /  1270252 bytes
Kernel load address    : 0x00000080                  (OpenWrt default: 0x80000000)
Kernel entry point     : 0x50c10080                  (OpenWrt default: 0x80000000)
Rootfs data offset     : 0x00140000 /  1310720 bytes (== OpenWrt default)
Rootfs data length     : 0x00481000 /  4722688 bytes
Boot loader data offset: 0x00000000 /        0 bytes
Boot loader data length: 0x0001d74c /   120652 bytes
Total firmware length  : 0x007d0200 /  8192512 bytes

Z tego co widać trzeba by użyć innego "salt" żeby wyliczyć MD5.

https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos

22

Odp: TP-Link EAP120

Co tak ładnie nagłówek rozkłada na czynniki pierwsze?

23

Odp: TP-Link EAP120

w głównym katalogu ( gdzie wpisuje się make)wystarczy uruchomić:
build_dir/host/firmware-utils/bin/mktplinkfw2 -i  firmware.bin

Oczywiście firmware musi mieć nagłowek w wersji 3 ( pierwszy bit)

https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos

24 (edytowany przez pepe2k 2016-09-22 16:42:50)

Odp: TP-Link EAP120

Raczej pierwszy bajt wink

Dobra, ja nadal nie rozumiem w czym niby jest problem? Przecież to standardowy nagłówek TP-Linka, co z tego że w wersji 3? Wszystkie wersje U-Boot od TP-Linka, z którymi miałem do czynienia, po prostu ignorowały sumę MD5, co najwyżej sprawdzana była suma CRC nagłówka. Czy tutaj jest inaczej? Może załóż w końcu nowy temat i zmęczymy ten router wspólnymi siłami.

Edit: no tak, zapomniałem, że sumę MD5 sprawdza firmware przy update przez GUI...

25

Odp: TP-Link EAP120

Pomożecie? Jak pewnie zauważyliście mój PR nie przeszedł bo wymaga poprawek, jednak jest większy problem bo skasowałem tego folka z którego wysłałem PR.
Czy da się z tym cokolwiek zrobić?
https://github.com/lede-project/source/pull/328

https://tplinkforum.pl - Polskie forum poświęcone tematyce urządzeń firmy TP-Link i Neffos