OpenWrt Forum Archive

Topic: Developing Support for TPLINK WDR4900

The content of this topic has been archived between 5 Oct 2014 and 4 May 2018. Unfortunately there are posts – most likely complete pages – missing.

maxpayne911 wrote:

I like openwrt features ( firewall/settings applied without reboot/vlan support/multil ssid/etc..)
hope stability will stay as it is ...

Brice

Just don't update trunk everyday then ... :-)

I've done a bit of research on this device with the stock firmware to figure out its structure and its different parts.
These are the original mtd partitions:

Creating 6 MTD partitions on "SPIFLASH0":
0x000000000000-0x000000050000 : "SPI (RO) U-Boot Image"
ftl_cs: FTL header not found.
0x000000050000-0x000000060000 : "SPI (RO) DTB Image"
ftl_cs: FTL header not found.
0x000000060000-0x000000300000 : "SPI (RO) Linux Kernel Image"
ftl_cs: FTL header not found.
0x000000300000-0x000000fe0000 : "SPI (RO) Compressed RFS Image"
ftl_cs: FTL header not found.
0x000000fe0000-0x000000ff0000 : "SPI (RW) UC Image"
ftl_cs: FTL header not found.
0x000000ff0000-0x000001000000 : "SPI (RW) Caldata Image"
ftl_cs: FTL header not found.

the kernel also uses the same mtds:

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00050000 00010000 "SPI (RO) U-Boot Image"
mtd1: 00010000 00010000 "SPI (RO) DTB Image"
mtd2: 002a0000 00010000 "SPI (RO) Linux Kernel Image"
mtd3: 00ce0000 00010000 "SPI (RO) Compressed RFS Image"
mtd4: 00010000 00010000 "SPI (RW) UC Image"
mtd5: 00010000 00010000 "SPI (RW) Caldata Image"

U-Boot Image, contains the u-boot bootloader. DTB Image is the Device Tree Blob. u-boot passes the execution to Linux Kernel Image which then decompresses the Squachfs placed in Compressed RFS Image. UC Image probably contains users settings and Caldata Image seems to contain eeprom.
It's unclear to me what RO and RW stand for. probably read-only and read/write . however it would not seem wise that Caldata mtd is set to read/write.
OpenWrt firmware, replaces Linux Kernel and Compressed RFS Image mtds. it also appears to set the rest of the mtds to read-only. so theoretically, going back to the stock firmware, would also mean getting back all the settings you've set there before replacing the firmware with OpenWrt.

There appears to be a wrapper in place in OpenWrt kernel, to replace the original mtd names(It's my understanding that it does not actually replace them in DTB, but it simply causes the kernel to see those names instead of the real ones). you can see the code for that Here

OpenWrt does not make any changes to the original mtd's partitions. but i decided to make a full backup of the flash contents before installing OpenWrt, just in case. unfortunately, i did not find a conventional way to do so (it's very likely that id missed one however) so i decided to use u-boot to load the flash contents to the ram and then dump the data on the screen. this technique could also possibly be used for firmwares with unknown root password or for devices that their firmware is not publicly available.  I'll briefly explain the steps i took to get a full backup(these steps are for WDR4900 however with some minor changes it could probably be used for any u-boot based device (Though I'm not sure if it also applies to NAND flashes or not)).

1- After booting to u-boot cli, enter

sf probe 0

2- then load the whole flash contents to the memory:

sf read 2000000 0 1000000

3- now we try to dump the memory to the console. set your console to save the output to a file (we call it dump1.text)

md.l 2000000 400000

Before starting the dump, make sure that you've closed all the open programs and try to not use your computer at that time. also disable any screen saver. this is so because the serial port is not designed for a reliable transfer and you will most likely end up with some glitches in the dump file. the more your PC is active, the more likely you get more glitches. iirc this step took about 100 minutes for me to complete.

4- do the step 3, 2 more times and save the outputs in different files (we call them dump2.txt and dump3.txt). this step is necessary for the next step which is to eliminate the glitches.

5- open each files and cut out the beginning and the end of the file if necessary, to only contain the dump data. now we need to use one of the dumps as the main one(dump1.txt for example) and use a comparing program(I used WinMerge) to find and eliminate all the glitches in the main dump by comparing it to another dump(dump2.txt). after this, use the third dump(dump3.txt) and compare it to the main one again to ensure it only differs on the third dump file glitches.

6- for the next step we need to use a find&replace program capable of using regex(I used notepad++) and replace ^02 with 00 (for those unfamiliar with regex, it tells the find&replace program to replace 02 with 00 if and only if the line is started with that(which would be every single line)).

7- now at this point, you should have a full dump of the entire flash contents. the last part is to convert it to binary. as it turned out, this text file structure, is completely compatible with xxd. and the developers of that little program, were thoughtful enough to include a reverse hex dump function, which is exactly what we need. it takes a single command to convert the file to its binary equivalent(you probably need linux for that):

xxd -r dump1.txt dump.bin

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

Reverting back to the stock firmware:

You do not need to use that specific firmware mentioned in the wiki to revert back to the stock firmware. if the firmware you want to revert to, contains 'boot' in it's name, you can simply cut it out. assuming it contains boot, the WDR4900, stock firmware file structure, should look like this:

0x0              -            0x200           TP-LINK header
0x200            -            0x50200         u-boot bootloader
0x50200          -            0x60200         DTB
0x60200          -            0x60400         TP-LINK 2nd header
0x60400          -            0x300200        Linux Kernel
0x300200         -            0xfe0200        Compressed RFS Image

Now all that needs to be done, is to cut out the first 0x60200 bytes (WARNING: DO NOT CUT OUT THE 2ND TP-LINK HEADER. IT'S PART OF THE FIRMWARE). after this step, the firmware size should be exactly 0xF80000 or 16,252,928 bytes.

Also, do not try to update the bootloader manually. aside from the fact that its dangerous and if you screw it up, recovering from it could be very hard, there seems to be some device specific values placed in the bootloader (probably the stock kernel is responsible for updating these values before writing the new bootloader to the flash).
These places are(at least for the firmware version 130424):

4FC00 - 4FC05   MAC address
4FD00 - 4FD07   Unknown (Product ID/Version?)
4FE00 - 4FE07   WPS default pin

It is unclear whether resetting those values to the default values supplied via firmware file, would cause bootloader to fail to load or not. (unless I'm sure that I'm able to recover via jtag in case of failure, I'm not gonna try that)

The best and safest way to update the bootloader (if you ever needed to do so and if TP-LINK released a newer version of it that is), is to use the instruction above to cut out the original firmware, revert back to the stock firmware and then try to update the firmware with the original firmware file(without cutting anything out) via the stock firmware's web interface.

There is a very small chance that a future release of the stock firmware, changes the mtd partitions. although this chance is small but because of this, I recommend that you always try to revert back to the same firmware that the device was operating on before you installed OpenWrt. so make sure you save that specific stock firmware version, somewhere safe. after reverting back, you may upgrade the firmware to the latest stock firmware version available (via the web interface).

(Last edited by Hamy on 15 Feb 2014, 15:31)

Hi Hamy

many thanks for theses longs détails

for that :
"is to cut out the first 0x60200 bytes (WARNING: DO NOT CUT OUT THE 2ND TP-LINK HEADER. IT'S PART OF THE FIRMWARE). after this step, the firmware size should be exactly 0xF80000 or 16,252,928 bytes"

how do you do that ? a dd if=tp_firmware-original.bin of=truncatd_firm.bin count=1 bs=16252928 is fine ?

also have you tried to revert to previous tplink firmware from openwrt firmware with your method ?
this would be very helpfull to be sure it's tested and work fine IF tplink release a new firmware , I recall I saw  some post in forums saying tplink may update bootloader to do boot on tftp in failsafe...

Best Regards,
Brice

no, that dd command is wrong, you will cut the last part instead of the first.

here instructions to cut firmware on your pc:


https://forum.openwrt.org/viewtopic.php … 97#p223897

imho it's safer because sometimes you do not have enough free ram in router to fit 2 firmware images.

maxpayne911 wrote:

for that :
"is to cut out the first 0x60200 bytes (WARNING: DO NOT CUT OUT THE 2ND TP-LINK HEADER. IT'S PART OF THE FIRMWARE). after this step, the firmware size should be exactly 0xF80000 or 16,252,928 bytes"

how do you do that ? a dd if=tp_firmware-original.bin of=truncatd_firm.bin count=1 bs=16252928 is fine ?

No. if you want to use dd, you need to use it like this:

dd if=tp_firmware_boot.bin of=tp_firmware_noboot.bin skip=769 bs=512

(769*512=0x60200)

and then you can update the firmware (after uploading it to /tmp if you haven't done it yet):

mtd -r write tp_firmware_noboot.bin firmware
maxpayne911 wrote:

also have you tried to revert to previous tplink firmware from openwrt firmware with your method ?

Yes, i just tested this to ensure. And i can confirm that i was able to easily revert back to the latest stock firmware(at the time of writing: 130424). for that specific firmware, after cutting out the bootloader, the firmware md5sum should be: 55C925DF26E9408AA6357C39D89B45D6

(Last edited by Hamy on 19 Feb 2014, 15:07)

Hi all,

I just backported a patch for the gianfar ethernetdriver used in tplink 4900v1 routers.
Once it gets into trunk from the devel-list, it should fix this problem.
If someone wants to test the patch right now, it can be downloaded from:
220-fix_gianfar_reported_number_of_sent_bytes_to_BQL.patch

Just copy it into your build env under target/linux/mpc85xx/patches-3.10/... and make y fresh image.

Greetings Thomas

owagner wrote:

Just noticed this with r38924:

[ 2343.002104] NETDEV WATCHDOG: eth0 (fsl-gianfar): transmit queue 6 timed out
[ 2343.009163] ------------[ cut here ]------------
[ 2343.013773] WARNING: at net/sched/sch_generic.c:255
[ 2343.018640] Modules linked in: ath9k ath9k_common iptable_nat ath9k_hw ath snd_usb_audio nf_nat_ipv4 nf_conntrack_ipv4 mac80211 iptable_raw iptable_mangle iptable_filter ipt_REJECT ipt_MASQUERADE ip_tables cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_CT x_tables usbhid snd_usbmidi_lib nf_nat_irc nf_nat_ftp nf_nat nf_defrag_ipv4 nf_conntrack_irc nf_conntrack_ftp nf_conntrack hid_generic gpio_keys crc_ccitt compat hid evdev booke_wdt nfsd snd_compress snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_rawmidi snd_seq_device snd_hwdep snd_page_alloc snd soundcore arc4 crypto_blkcipher leds_gpio ehci_platform ehci_hcd fsl_mph_dr_of button_hotplug input_core usbcore nls_base usb_common exportfs crypto_hash
[ 2343.088588] CPU: 0 PID: 0 Comm: swapper Not tainted 3.10.18 #20
[ 2343.094501] task: c036b2e0 ti: c7ff2000 task.ti: c0382000
[ 2343.099891] NIP: c0209284 LR: c0209284 CTR: c019f1cc
[ 2343.104847] REGS: c7ff3e70 TRAP: 0700   Not tainted  (3.10.18)
[ 2343.110669] MSR: 00029000 <CE,EE,ME>  CR: 44042042  XER: 20000000
[ 2343.116768]
[ 2343.116768] GPR00: c0209284 c7ff3f20 c036b2e0 0000003f 00000006 00000005 00006960 75652036
[ 2343.116768] GPR08: c036f174 c0371b80 c0371b84 00000004 00000146 00000000 00000000 00000000
[ 2343.116768] GPR16: c0000a00 c036f3e4 c0300e14 00200000 0007cb1f 00000000 c03ae030 c03ade30
[ 2343.116768] GPR24: c03adc30 00000000 00200200 c03ada30 c0380000 c0370000 00000006 c781c000
[ 2343.146477] NIP [c0209284] dev_watchdog+0x160/0x248
[ 2343.151348] LR [c0209284] dev_watchdog+0x160/0x248
[ 2343.156129] Call Trace:
[ 2343.158569] [c7ff3f20] [c0209284] dev_watchdog+0x160/0x248 (unreliable)
[ 2343.165190] [c7ff3f40] [c002d09c] call_timer_fn.isra.38+0x28/0x80
[ 2343.171279] [c7ff3f60] [c002d254] run_timer_softirq+0x160/0x1a0
[ 2343.177193] [c7ff3fa0] [c0027dc0] __do_softirq+0xbc/0x16c
[ 2343.182595] [c7ff3ff0] [c000b424] call_do_softirq+0x14/0x24
[ 2343.188161] [c0383e70] [c0004374] do_softirq+0x60/0xa0
[ 2343.193295] [c0383e90] [c0027f78] irq_exit+0x4c/0x68
[ 2343.198255] [c0383ea0] [c0007f30] timer_interrupt+0xe8/0x100
[ 2343.203909] [c0383ec0] [c000ca3c] ret_from_except+0x0/0x18
[ 2343.209393] --- Exception: 901 at arch_cpu_idle+0x24/0x58
[ 2343.209393]     LR = arch_cpu_idle+0x24/0x58
[ 2343.219045] [c0383f80] [c005fff8] rcu_idle_enter+0x94/0xac (unreliable)
[ 2343.225662] [c0383f90] [c004ac14] cpu_startup_entry+0xa8/0x100
[ 2343.231490] [c0383fb0] [c000270c] rest_init+0x68/0x78
[ 2343.236542] [c0383fc0] [c03467ac] start_kernel+0x2d0/0x2e4
[ 2343.242021] [c0383ff0] [c00003c0] skpinv+0x2ac/0x2e8
[ 2343.246975] Instruction dump:
[ 2343.249935] 396b0074 4200ffac 4800004c 7fe3fb78 4bfea961 7fe4fb78 7c651b78 3c60c032
[ 2343.257685] 7fc6f378 3863bd44 4cc63182 480a45bd <0fe00000> 38000001 981c0779 813f00e8
[ 2343.265611] ---[ end trace 35d232295b0fb20c ]---

This happened once in an uptime of 11:38. As far as I can tell, the device is seemingly working properly, but I don't use it as a router, just as an AP with benefits.

Anyone else seeing something similiar?

Best Regards,
Olli

I have flashed self built trunk r39634 to my WDR4900 V1. Works stable so far :-)

I flashed today's trunk and I lost internet connectivity.

When I execute an /etc/init.d/netowrk restart, I get :

root@pollen:~# /etc/init.d/network restart
Command failed: Not found
/etc/rc.common: line 1: goto:range(0,65535): not found
root@pollen:~#

Do you know what change could have caused this ?

(Last edited by Bourdieu on 22 Feb 2014, 22:04)

Hi. I flashed the openwrt (bleeding edge, r39789) and it worked like a charm. I got p910nd work and configured bridge to 4-port. But when I enabled 5GHz (modified /etc/config/wireless), the Web UI disappeared when I rebooted the router. The internet and both Wlan are working fine, but I cant access to the WebUi (192.168.1.1). What can i do now?

Hi,

Can you access the router using SSH/telnet?

1 - If you can, check if the webserver (uhttpd) is running using this command:

ps | grep uhttpd

You will see something like this in the output if the process is running:

2245 root      2004 S    /usr/sbin/uhttpd -f -h /www -r OpenWrt -x /cgi-bin

If you have that output, probably its a configuration issue in the /etc/config/uhttpd, check if the "list listen_http" and "list listen_https" options are uncommented and correct, if everything is OK, and still no access, just remove and reinstall the uthhpd package:

opkg update
opkg remove uhttpd uhttpd-mod-ubus
opkg install uhttpd uhttpd-mod-ubus
/etc/init.d/uhttpd start
/etc/init.d/uhttpd enable

2 - If you get no output, try to start it manually:

/etc/init.d/uhttpd start

if you don't get any error, you should be able to access the web interface, to make it permanent in the boot:

/etc/init.d/uhttpd enable

If you get an error starting the Webserver manually (ex.  /etc/init.d/uhttpd: not found), probably the packages/links are missing or damaged, i got a similar problem when i was playing with the Wireless configuration, all the kmod-ath* disappeared from the system, but the free space was kept unchanged...weird yikes

The solution is to reinstall the Web interface:

opkg update
opkg install luci

*optional (to get https access):

opkg install luci-ssl

*optional - Configuring the web access:

vi /etc/config/uhttpd

Change your options (ex: SSL access, Certificate options, Integrated LUA support, etc...)

/etc/init.d/uhttpd start
/etc/init.d/uhttpd enable

After this you should have web access again! smile

About the free space issue, i have exported my setting and have done a new "factory image" flash...

See ya...

(Last edited by genjuro on 10 Mar 2014, 03:55)

genjuro wrote:

Hi,

Can you access the router using SSH/telnet?

1 - If you can, check if the webserver (uhttpd) is running using this command:

ps | grep uhttpd

You will see something like this in the output if the process is running:

2245 root      2004 S    /usr/sbin/uhttpd -f -h /www -r OpenWrt -x /cgi-bin

If you have that output, probably its a configuration issue in the /etc/config/uhttpd, check if the "list listen_http" and "list listen_https" options are uncommented and correct, if everything is OK, and still no access, just remove and reinstall the uthhpd package:

opkg update
opkg remove uhttpd uhttpd-mod-ubus
opkg install uhttpd uhttpd-mod-ubus
/etc/init.d/uhttpd start
/etc/init.d/uhttpd enable

2 - If you get no output, try to start it manually:

/etc/init.d/uhttpd start

if you don't get any error, you should be able to access the web interface, to make it permanent in the boot:

/etc/init.d/uhttpd enable

If you get an error starting the Webserver manually (ex.  /etc/init.d/uhttpd: not found), probably the packages/links are missing or damaged, i got a similar problem when i was playing with the Wireless configuration, all the kmod-ath* disappeared from the system, but the free space was kept unchanged...weird yikes

The solution is to reinstall the Web interface:

opkg update
opkg install luci

*optional (to get https access):

opkg install luci-ssl

*optional - Configuring the web access:

vi /etc/config/uhttpd

Change your options (ex: SSL access, Certificate options, Integrated LUA support, etc...)

/etc/init.d/uhttpd start
/etc/init.d/uhttpd enable

After this you should have web access again! smile

About the free space issue, i have exported my setting and have done a new "factory image" flash...

See ya...

Thanks, it works now! The uhttpd conf had changed. smile

Hey i also have the latest trunk version and installed shaper on it to limit the guest wifi but when i enable it it work with speedtest but after a while the limit doesn't work anymore.
what could that be?

Hi
I bricked my wdr4900 router through trying to flash it to the tp-link firmware.
Nohting to worry about, it put it in reset mode looked in wireshark and bingo 192.168.0.86 looks for tftp from 192.168.0.66
I used Win 7 64 bit and Win Agent tftp server 4.
The router began loading the bin file but before it was finished the programm said client timeout.
What do i need to do press longer on the reset button/set longer timeout on the tftp server?
But before telling me soldering serials on the router give me tipps to get the reset tftp stuff working
nobody any tipps?
thux

(Last edited by thux on 6 Apr 2014, 11:41)

Hi
update I was able to tftp the firmware image to the router but it didn't reboot.
the port lines just blink.
How long do i need to wait which firmware image do i need?
I have the wdr4900 v1.3

Hi all,

If anyone have interest to enable the second network interface in the p1014 soc, so far I have done some investigation and test. I want to play with this feature, but it's harder than I thought.

I have two WDR4900 and both are in version 1.3. Seems they are working fine with the current trunk, but I compiled with 3.12 kernel.

1. Freescale p1014 soc has one RGMII and one SGMII. From the device tree contributed by Gabor Juhos, SGMII is disabled.
2. From the RCB of WDR4900, it is very likely that the Serdes port from the AR8327N Switch is connected to p1014. I guess the SGMII port should have been connected to AR8327.
3. I added sth to the tl-wdr4900-v1.dts according the p1040 RM, p1010rdb and AR8327 datasheet.

        mdio@24000 {
                phy0: ethernet-phy@0 {
                        interrupts = <3 1 0 0>;
                        qca,ar8327-initvals = <
                                        0x00004 0x07600000 /* PAD0_MODE */
                                        0x00008 0x00000000 /* PAD5_MODE */
                                        0x0000c 0x03600080 /* PAD6_MODE */
                                        0x00010 0x40000000 /* POWER_ON_STRIP*/
                                        0x00050 0xcf35cf35 /* LED_CTRL0 */
                                        0x00054 0xcf35cf35 /* LED_CTRL1 */
                                        0x00058 0xcf35cf35 /* LED_CTRL2 */
                                        0x0005c 0x03ffff00 /* LED_CTRL3 */
                                        0x000E0 0xc70164d0 /* serdes ctrl */
                                        0x0007c 0x0000007e /* PORT0_STATUS */
                                        0x00094 0x0000007e /* PORT6_STATUS */
                        >;
                        reg = <0x0>;
                };

                phy1: ethernet-phy@1 {
                        interrupts = <2 1 0 0>;
                        reg = <0x1>;
                };

                tbi-phy@3 {
                        device_type = "tbi-phy";
                        reg = <0x3>;
                };
        };

        mdio@25000 {
                tbi0: tbi-phy@11 {
                        reg = <0x11>;
                        device_type = "tbi-phy";
                };
        };

        mdio@26000 {
                status = "disabled";
        };
        enet0: ethernet@b0000 {
                phy-handle = <&phy0>;
                phy-connection-type = "rgmii-id";
        };

        enet1: ethernet@b1000 {
                phy-handle = <&phy1>;
                tbi-handle = <&tbi0>;
                phy-connection-type = "sgmii";
        };

        enet2: ethernet@b2000 {
                status = "disabled";
        };

4. I also tried to adjust some values in the above modifcation, but the new NIC does not work. It cannot recieve anything, and its MAC by default is 0, I need to assign one for it.

[   33.808906] libphy: Freescale PowerQUICC MII Bus: probed
[   33.814873] libphy: Freescale PowerQUICC MII Bus: probed
[   33.825003] nf_conntrack version 0.5.0 (1979 buckets, 7916 max)
[   33.834300] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   33.845855] booke_wdt: powerpc book-e watchdog driver loaded
[   33.856832] u32 classifier
[   33.859537]     input device check on
[   33.863204]     Actions configured
[   33.867617] Mirror/redirect action on
[   33.873044] Loading modules backported from Linux version master-2014-01-23-0-g62c147d
[   33.880978] Backport generated by backports.git backports-20140124-0-g1256d3e
[   33.890949] fsl-gianfar ethernet.1: enabled errata workarounds, flags: 0x4
[   33.917802] fsl-gianfar ethernet.1 eth0: mac: 00:04:9f:ef:01:01
[   33.923751] fsl-gianfar ethernet.1 eth0: Running with NAPI enabled
[   33.929933] fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[0]: 256
[   33.936462] fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[1]: 256
[   33.942989] fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[2]: 256
[   33.949517] fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[3]: 256
[   33.956044] fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[4]: 256
[   33.962572] fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[5]: 256
[   33.969100] fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[6]: 256
[   33.975627] fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[7]: 256
[   33.982155] fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[0]: 256
[   33.988691] fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[1]: 256
[   33.995220] fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[2]: 256
[   34.001748] fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[3]: 256
[   34.008274] fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[4]: 256
[   34.014802] fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[5]: 256
[   34.021329] fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[6]: 256
[   34.027856] fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[7]: 256
[   34.034555] fsl-gianfar ethernet.2: enabled errata workarounds, flags: 0x4
[   34.062169] fsl-gianfar ethernet.2 eth1: mac: 00:00:00:00:00:00
[   34.068116] fsl-gianfar ethernet.2 eth1: Running with NAPI enabled
[   34.074297] fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[0]: 256
[   34.080826] fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[1]: 256
[   34.087353] fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[2]: 256
[   34.093890] fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[3]: 256
[   34.100416] fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[4]: 256
[   34.106944] fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[5]: 256
[   34.113477] fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[6]: 256
[   34.120004] fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[7]: 256
[   34.126532] fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[0]: 256
[   34.133060] fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[1]: 256
[   34.139587] fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[2]: 256
[   34.146115] fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[3]: 256
[   34.152643] fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[4]: 256
[   34.159170] fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[5]: 256
[   34.165696] fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[6]: 256
[   34.172223] fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[7]: 256
...
[   38.481910] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   38.496906] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   40.482856] libphy: mdio@ffe24000:00 - Link is Up - 1000/Full
[   40.488774] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   43.500929] libphy: mdio@ffe24000:01 - Link is Up - 1000/Full
[   43.507259] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready

Hi Guys,

I know this isn't a developing question. I have a configuration problem.
I have downloaded the openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs-factory.bin here: http://wiki.openwrt.org/toh/tp-link/tl-wdr4900 and now I'm not able to find the router :-(

It would be great if you could give me a hint to solve it. I brouhgt it today and put the openwert image because of issues (no internet connection floor above it).

Many thanks in advance,
Luke

If nebbia88's guess is wrong, you really must provide more details of what you did and have tried subsequently and what you observe:  eg. "to ping or not to ping, that is the question...." :-)

Hello, all!

I am encounter difficulties in mounting USB flash stick or hdd on my new TL-WDR4900 v1.3.
I am migrating from TL-WR1043 v1.8 where i manage ok USB hdd from /dev/sda1 to /mnt/sda1.
Here on WDR4900 configuration is different.
USB devices are under /dev/bus/usb/001/001-003 and i can not mounting on.
Error is somethings about block device...
Some user of wdr4900 have manage to make USB devices on and how?

Thanks in advance!

hi gtdaniel

have you looked at http://wiki.openwrt.org/doc/howto/usb.storage ?
you need ot install some additional kernel modules & userland tools to mount an usb device

you probably  downloaded openwrt for your device from http://downloads.openwrt.org/snapshots/trunk/mpc85xx/
hope you also downloaded all packages at same time, as if no, and if you download packages related to kernel after some days, the kernel in trunk could be a newer one than the one you  have on your device, so could lead to issue.


I followed some (wise) advises in the forum to download all the packages at the time  I moved to openwrt to be able to install kernel packages at same level as my kernel. I put them in my webserver and also I changed in web interface to point there to get packages  (src/gz barrier_breaker http://jwebphp1/openwrt/20140212/packages/, instead of src/gz barrier_breaker http://downloads.openwrt.org/snapshots/ … /packages)

personnally, I mounted a usb key ,and I partionned/formated it from commandline in openwrt without issue


Brice
WDR 4900 v1.3EU , OpenWrt Barrier Breaker r39574 / LuCI Trunk (svn-r9953)

hello maxpayne911!
thanks for a quick answer!
i know the basics of usb storage etc from my previous work with TL-WR1043nd.
There i can manage on openwrt a usb hdd with some mount points and samba share via luci interface or in command line mode. Not problems at all.
Here on wrd4900 some how after installing packages what i need mount command not work.
Hdd is identifying ok on flash stick also identifying ok, but automounting not work and mount command not work...
BTW openwrt firmware for wdr4900 (03.05.2014) brick my device...
After resuscitating, works fine with 24.04.2014 openwrt firmware.

(Last edited by gtdaniel on 4 May 2014, 14:58)

@nebbia88 & ryts,

sorry, i was in a hurry. so i can't reach the router via web by entering the 192.168.1.1
ping via cmd.exe works. ipconfig /all also shows that dhcp works. i can't enter the web interface.

cheers

gtdaniel

can you plug your usb key
wait 1 min
reboot your router
then after reboot, post output of theses commands
lsmod |grep usb
lsmod |grep hci
dmesg |grep -E "(usb|sda)"
opkg list-installed|grep -E "(usb|fs)"
block info
cat /etc/config/fstab
fdisk -l /dev/sda

here is mine:
lsmod |grep usb
nls_base                5126  1 usbcore
scsi_mod               81102  2 usb_storage
usb_common              1124  1 usbcore
usb_storage            37164  1
usbcore               116061  4 usb_storage

lsmod |grep hci
ehci_hcd               33404  1 ehci_platform
ehci_platform           2508  0
ohci_hcd               18408  0


dmesg |grep -E "(usb|sda)"
[    3.817482] usbcore: registered new interface driver usbfs
[    3.823156] usbcore: registered new interface driver hub
[    3.828680] usbcore: registered new device driver usb
[    4.212571] usb 1-1: new high-speed USB device number 2 using fsl-ehci
[    4.632932] usb 1-1.1: new high-speed USB device number 3 using fsl-ehci
[    6.191817] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[    6.198223] scsi0 : usb-storage 1-1.1:1.0
[    6.202812] usbcore: registered new interface driver usb-storage
[    8.747022] sd 0:0:0:0: [sda] 15810048 512-byte logical blocks: (8.09 GB/7.53 GiB)
[    8.766546] sd 0:0:0:0: [sda] Write Protect is off
[    8.771384] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
[    8.776087] sd 0:0:0:0: [sda] No Caching mode page found
[    8.781439] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    8.814574] sd 0:0:0:0: [sda] No Caching mode page found
[    8.819929] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    8.874207]  sda: sda1 sda2
[    8.887674] sd 0:0:0:0: [sda] No Caching mode page found
[    8.893022] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    8.899127] sd 0:0:0:0: [sda] Attached SCSI removable disk
[40498.857429] sd 0:0:0:0: [sda] No Caching mode page found
[40498.862821] sd 0:0:0:0: [sda] Assuming drive cache: write through
[40498.916532]  sda: sda1
[40667.314966] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts:

opkg list-installed|grep -E "(usb|fs)"
e2fsprogs - 1.42.4-1
kmod-fs-ext4 - 3.10.28-1
kmod-usb-core - 3.10.28-1
kmod-usb-ohci - 3.10.28-1
kmod-usb-storage - 3.10.28-1
kmod-usb2 - 3.10.28-1
kmod-usb2-fsl - 3.10.28-1
libext2fs - 1.42.4-1

block info
/dev/mtdblock3: UUID="4c747c25-5c096dbe-01d70200-6f4e87ed" VERSION="4.0" TYPE="squashfs"
/dev/mtdblock4: TYPE="jffs2"
/dev/sda1: UUID="6952daba-0b4d-4f15-a60c-6d955f9f7f7d" NAME="EXT_JOURNAL" VERSION="1.0" TYPE="ext4"

cat /etc/config/fstab
config 'global'
        option  anon_swap       '0'
        option  anon_mount      '0'
        option  auto_swap       '1'
        option  auto_mount      '1'
        option  delay_root      '5'
        option  check_fs        '0'

config 'mount'
        option  target  '/mnt/sda1'
        option  uuid    '6952daba-0b4d-4f15-a60c-6d955f9f7f7d'
        option  enabled '1'


so we can compare

ok.
please stay tune.
in minutes i will post results
thanks

first working conditions:

OpenWrt Barrier Breaker r40569
Linux version 3.10.36

results:

root@OpenWrt:~# lsmod |grep usb
nls_base                5062  1 usbcore
usb_common              1116  1 usbcore
usbcore               115737  2 ehci_platform

root@OpenWrt:~# lsmod |grep hci
ehci_hcd               34092  1 ehci_platform
ehci_platform           2500  0
usbcore               115737  2 ehci_platform

root@OpenWrt:~# dmesg |grep -E "(usb|sda)"
[    3.782150] usbcore: registered new interface driver usbfs
[    3.787817] usbcore: registered new interface driver hub
[    3.793326] usbcore: registered new device driver usb
[    4.176373] usb 1-1: new high-speed USB device number 2 using fsl-ehci
[    4.596730] usb 1-1.2: new high-speed USB device number 3 using fsl-ehci

root@OpenWrt:~# opkg list-installed|grep -E "(usb|fs)"
fstools - 2014-04-17-fe222812cc12d37647fbb8667851eb005ea95331
kmod-usb-core - 3.10.36-1
kmod-usb2 - 3.10.36-1
kmod-usb2-fsl - 3.10.36-1
libusb-1.0 - 1.0.9-1
usbutils - 007-1

root@OpenWrt:~# block info
/dev/mtdblock3: UUID="a2626fad-87abd0df-9f947195-ffe01b1b" VERSION="4.0" TYPE="squashfs"
/dev/mtdblock4: TYPE="jffs2"

root@OpenWrt:~# cat /etc/config/fstab
cat: can't open '/etc/config/fstab': No such file or directory

root@OpenWrt:~# fdisk -l /dev/sda
fdisk: cannot open /dev/sda: No such file or directory

some aditional info:
root@OpenWrt:~# lsusb
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 125f:c93a A-DATA Technology Co., Ltd. 4GB Pen Drive

so, my usb device is on /dev/bus/usb/001/003
any mount command resul in error:
root@OpenWrt:~# ls /dev/bus/usb
001
root@OpenWrt:~# ls /dev/bus/usb/001
001  002  003
root@OpenWrt:~# mount /dev/bus/usb/001/003 /mnt/usb
mount: mounting /dev/bus/usb/001/003 on /mnt/usb failed: Block device required