OpenWrt Forum Archive

Topic: wr740n v4 USB mod! [AR9331] [FW compiled for all wr740/741 versions!]

The content of this topic has been archived between 6 Jun 2015 and 1 May 2018. Unfortunately there are posts – most likely complete pages – missing.

dabyd64 wrote:

Why force? Use 741 v2 firmware!

i forced just now Unfortunately same result.

* web interface not work. 192.168.1.1 "err_connection_refused"
* connecting with putty via telnet root password => "access denied",  then can be change the password via serial connection
* when the control whether work usb without web interface,  still not work usb comminication.

thank you for your attention dabyd64

edited 1 feb 2016
i finished struggle with wr740n v2.1; i bought mr3020 now working on,  thanks again...

(Last edited by david_off on 1 Feb 2016, 14:52)

hi..dabyd64
could you build 'Image Generator' 12.09 for me? i need some packages: etc..openvpn (not enough free size if install from opkg). I can't complie for wr740 with usb driver

phantnang wrote:

hi..dabyd64
could you build 'Image Generator' 12.09 for me? i need some packages: etc..openvpn (not enough free size if install from opkg). I can't complie for wr740 with usb driver


I did successfully, thank your' worrk

I have a TpLink WR740n-V4 router and i would like to add USB support for this.

I have a request for dabyd64.... Can you please provide those images you mentioned in your Original Post (OP)?
or maybe provide some help as to how i can do this mod to get a USB to work with the router.

I have searched on google and i have seen that how i can connect those data wires from main CPU chip but i don't know which wire is for which side of the USB DATA transfer.
Any help would be greatly appreciated.

P.S. If anyone else can provide any information that would be really helpful too.

Thanks.

[Edit]
I saw those pins that need to be soldered and damn those are really tiny. I wonder how can you solder those without messing up the other things nearby.

(Last edited by redd_llining on 5 Mar 2016, 07:06)

Damn! They deleted the pics after 4 years sad
I hope I have them somewhere..

Edit: I found these smile:

Click here for a much bigger and detailed picture!
http://s24.postimg.org/ks47r28f7/usb_740n_v4png.jpg
http://s21.postimg.org/oi585qjjb/ar9331_usb_pins.jpg

(Last edited by dabyd64 on 15 Apr 2016, 22:30)

Recently did the same mod. Thank you for sharing such a useful information! I tried to download binaries provided by dabyd64, but dropbox has blocked his links. Could someone send them(12.09 Attitude Adjustment\14.07 Barrier Breaker\15.05 Chaos Calmer for 740n v4 ) to my mail: hristosvoskres@inbox.lv

Wait few hours, I'll fix the links wink

Awesome!
In the meanwhile i am trying to build binaries at my own, however, after some minutes after issuing make command i received error, that i don't know how to interpret:

make[5]: Leaving directory `/media/DATA/tplinkfirmware_custom/tplinkv1/openwrt/build_dir/host/e2fsprogs-1.42.8/lib/et'
make[5]: Entering directory `/media/DATA/tplinkfirmware_custom/tplinkv1/openwrt/build_dir/host/e2fsprogs-1.42.8/lib/ext2fs'
    SUBST ext2_err.et
    COMPILE_ET ext2_err.et
chmod: ext2_err.h: new permissions are r-xrwxrwx, not r-xr-xr-x
chmod: ext2_err.c: new permissions are r-xrwxrwx, not r-xr-xr-x
make[5]: *** [ext2_err.h] Error 1
make[5]: Leaving directory `/media/DATA/tplinkfirmware_custom/tplinkv1/openwrt/build_dir/host/e2fsprogs-1.42.8/lib/ext2fs'
make[4]: *** [subs] Error 2
make[4]: Leaving directory `/media/DATA/tplinkfirmware_custom/tplinkv1/openwrt/build_dir/host/e2fsprogs-1.42.8'
make[3]: *** [/media/DATA/tplinkfirmware_custom/tplinkv1/openwrt/build_dir/host/e2fsprogs-1.42.8/.built] Error 2
make[3]: Leaving directory `/media/DATA/tplinkfirmware_custom/tplinkv1/openwrt/tools/e2fsprogs'
make[2]: *** [tools/e2fsprogs/compile] Error 2
make[2]: Leaving directory `/media/DATA/tplinkfirmware_custom/tplinkv1/openwrt'
make[1]: *** [/media/DATA/tplinkfirmware_custom/tplinkv1/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyyyyyyyyyyyynyyyyynnyyynyyynnnyy] Error 2
make[1]: Leaving directory `/media/DATA/tplinkfirmware_custom/tplinkv1/openwrt'
make: *** [world] Error 2

found solution here.
It's filesystem trouble:

.... is a linux filesystem? it will not work on FAT or NTFS filesystems

Moved build folder into ext filesystem and it's compiling just fine.

(Last edited by diabolusss on 13 Apr 2016, 12:46)

Hi, I realize this is an old thread, but I believe it still usefull, like it was for me.
After struggling for about a week, not knowing the pin numbers for the usb pins on the AR9331 just doing it by the pics on the original post I could not make it work until I found the pdf for the processor where it clearly shows pins 8 and 9.
and then I got it to work here is my pic.
http://i67.tinypic.com/vxoglx.jpg
Also for BB or CC there is no need to modify any code just compile and include all the necessary modules.
Hope this helps

Well, firmware compilation and installation was successful, but usb doesn't want to work. So it would be great to get sysupgrade.bin from someone who have working usb on 740n v4(because dropbox links are still blocked).

Installed packages:

base-files - 157.2-r49163
busybox - 1.23.2-1
dnsmasq - 2.73-1
dropbear - 2015.67-1
firewall - 2015-07-27
fstools - 2016-01-10-96415afecef35766332067f4205ef3b2c7561d21
hostapd-common - 2015-03-25-1
ip6tables - 1.4.21-1
iptables - 1.4.21-1
iw - 4.3-1
iwinfo - 2015-06-01-ade8b1b299cbd5748db1acf80dd3e9f567938371
jshn - 2015-11-08-10429bccd0dc5d204635e110a7a8fae7b80d16cb
jsonfilter - 2014-06-19-cdc760c58077f44fc40adbbe41e1556a67c1b9a9
kernel - 3.18.29-1-5d766e7372ab026da2ae74ff9dd884d9
kmod-ath - 3.18.29+2016-01-10-1
kmod-ath9k - 3.18.29+2016-01-10-1
kmod-ath9k-common - 3.18.29+2016-01-10-1
kmod-cfg80211 - 3.18.29+2016-01-10-1
kmod-crypto-arc4 - 3.18.29-1
kmod-crypto-core - 3.18.29-1
kmod-crypto-hash - 3.18.29-1
kmod-fs-vfat - 3.18.29-1
kmod-gpio-button-hotplug - 3.18.29-1
kmod-ip6tables - 3.18.29-1
kmod-ipt-conntrack - 3.18.29-1
kmod-ipt-core - 3.18.29-1
kmod-ipt-nat - 3.18.29-1
kmod-ipv6 - 3.18.29-1
kmod-ledtrig-usbdev - 3.18.29-1
kmod-lib-crc-ccitt - 3.18.29-1
kmod-lib-crc16 - 3.18.29-1
kmod-mac80211 - 3.18.29+2016-01-10-1
kmod-nf-conntrack - 3.18.29-1
kmod-nf-conntrack6 - 3.18.29-1
kmod-nf-ipt - 3.18.29-1
kmod-nf-ipt6 - 3.18.29-1
kmod-nf-nat - 3.18.29-1
kmod-nf-nathelper - 3.18.29-1
kmod-nls-base - 3.18.29-1
kmod-nls-cp437 - 3.18.29-1
kmod-nls-cp852 - 3.18.29-1
kmod-nls-iso8859-1 - 3.18.29-1
kmod-nls-utf8 - 3.18.29-1
kmod-ppp - 3.18.29-1
kmod-pppoe - 3.18.29-1
kmod-pppox - 3.18.29-1
kmod-scsi-core - 3.18.29-1
kmod-slhc - 3.18.29-1
kmod-usb-core - 3.18.29-1
kmod-usb-ohci - 3.18.29-1
kmod-usb-storage - 3.18.29-1
kmod-usb2 - 3.18.29-1
libblobmsg-json - 2015-11-08-10429bccd0dc5d204635e110a7a8fae7b80d16cb
libc - 0.9.33.2-1
libext2fs - 1.42.12-1
libgcc - 4.8-linaro-1
libip4tc - 1.4.21-1
libip6tc - 1.4.21-1
libiwinfo - 2015-06-01-ade8b1b299cbd5748db1acf80dd3e9f567938371
libjson-c - 0.12-1
libjson-script - 2015-11-08-10429bccd0dc5d204635e110a7a8fae7b80d16cb
libncurses - 5.9-2
libnl-tiny - 0.1-4
libubox - 2015-11-08-10429bccd0dc5d204635e110a7a8fae7b80d16cb
libubus - 2015-05-25-f361bfa5fcb2daadf3b160583ce665024f8d108e
libuci - 2015-08-27.1-1
libuuid - 2.25.2-4
libxtables - 1.4.21-1
mtd - 21
netifd - 2015-12-16-245527193e90906451be35c2b8e972b8712ea6ab
odhcp6c - 2015-07-29-dc186d6d2b0dd4ad23ca5fc69c00e81f796ff6d9
odhcpd - 2015-11-19-01d3f9d64486ac1daa144848944e877e7f0cb762
opkg - 9c97d5ecd795709c8584e972bfdf3aee3a5b846d-9
ppp - 2.4.7-6
ppp-mod-pppoe - 2.4.7-6
procd - 2015-10-29.1-d5fddd91b966424bb63e943e789704d52382cc18
swconfig - 10
terminfo - 5.9-2
uboot-envtools - 2014.10-2
ubox - 2015-11-22-c086167a0154745c677f8730a336ea9cf7d71031
ubus - 2015-05-25-f361bfa5fcb2daadf3b160583ce665024f8d108e
ubusd - 2015-05-25-f361bfa5fcb2daadf3b160583ce665024f8d108e
uci - 2015-08-27.1-1
usign - 2015-05-08-cf8dcdb8a4e874c77f3e9a8e9b643e8c17b19131
vim - 7.4-2
wpad-mini - 2015-03-25-1

logs seems to be fine, there are no errors:

Fri Apr 15 08:06:30 2016 kern.info kernel: [    4.960000] usbcore: registered new interface driver usbfs
Fri Apr 15 08:06:30 2016 kern.info kernel: [    4.960000] usbcore: registered new interface driver hub
Fri Apr 15 08:06:30 2016 kern.info kernel: [    4.970000] usbcore: registered new device driver usb
Fri Apr 15 08:06:30 2016 kern.notice kernel: [    4.980000] SCSI subsystem initialized
Fri Apr 15 08:06:30 2016 kern.info kernel: [    4.990000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Fri Apr 15 08:06:30 2016 kern.info kernel: [    5.000000] ehci-platform: EHCI generic platform driver
Fri Apr 15 08:06:30 2016 kern.info kernel: [    5.010000] ehci-platform ehci-platform: EHCI Host Controller
Fri Apr 15 08:06:30 2016 kern.info kernel: [    5.010000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
Fri Apr 15 08:06:30 2016 kern.info kernel: [    5.020000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
Fri Apr 15 08:06:30 2016 kern.info kernel: [    5.050000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
Fri Apr 15 08:06:30 2016 kern.info kernel: [    5.050000] hub 1-0:1.0: USB hub found
Fri Apr 15 08:06:30 2016 kern.info kernel: [    5.050000] hub 1-0:1.0: 1 port detected
Fri Apr 15 08:06:30 2016 kern.info kernel: [    5.060000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
Fri Apr 15 08:06:30 2016 kern.info kernel: [    5.070000] ohci-platform: OHCI generic platform driver
Fri Apr 15 08:06:30 2016 kern.info kernel: [    5.080000] usbcore: registered new interface driver usb-storage

I power tp link with 5V source(actually 5.5v), with load(router on) i get almost 5v, and with connected Flash it gets ~4.88V, which seems to be ok for usb. I haven't added capacitor, but it's meant for stability as i understand, so i don't need it(at least for now).
I checked my soldering to the CPU with multimeter in diode mode: on D- pin i get ~500 smth and on D+ ~695 smth(+ placed on the router's ground). So it seems not to be a problem, too.
When i connect flash drive with led it flashes once and 'dies'. I have formatted it into ext4 and fat32 - the same story(actually i don't believe it can cause such problems, but i had to try).
When flash drive is connected i have 2.9v on D+ pin and 0v on D-. Without it D-+ are zeros.
Thin wires connected to the cpu are less than 3cm long, the rest is native usb shielded wiring.

#UPDATE#
After i switched D+ and D- wires in place i received error(finally, something). However, led blinked only once and then switched off again. Now i have 0v on D+ and ~3.1V on D-.

Fri Apr 15 08:07:40 2016 kern.err kernel: [   84.890000] usb usb1-port1: connect-debounce failed

I receive this error only once after connecting flash drive. If i connect it again(without full reboot) then there is no action at all.
I don't know what to do next. Hope someone could give a hint and working firmware.

Links updated!
Sorry, I've been very busy! smile
I had the debounce error because the wires were too long and thin.
I only left 5cm of the thin wire, then soldered thicker wires to the thin wire and wired it to the usb socket, then it worked!

(Last edited by dabyd64 on 15 Apr 2016, 22:53)

Thank you for links and tip.
however, i found my problem: i soldered usb-dp pin with the next one...  but i know how to check soldering for sure now: raw usb-dm have 450 and usb-dp - 500 when listening by multimeter in diode mode, the same values i need to get after soldering(which i get on one pin and thats why i got debounce error when i reversed connections).  i messed up with  cpu pins and i am waiting for stronger lens to correct that(12x zoom is far too small).

dabyd64 wrote:

If you want to compile your own, and enable USB, you must do this changes:

Compile it for the first time, with the modules/settings you want.
For mounting USB drives, select kernel kmod modules:
        USB support: usb2, ohci, storage
        Filesystems: ext4, ntfs, vfat
        Native language support: cp437,cp852,iso-8859-1, utf8.

If you want R/W NTFS support, select:
        Utilities/filesystems/ntfs-3g
        
Then go to build_dir/linux-ar71xx_generic/linux-3.3.8/arch/mips/ath79
(In Chaos Calmer 15.05: build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.18.23/arch/mips/ath79)
Edit this files:
 
        mach-tl-wr741nd-v4.c
add        #include "dev-usb.h"           at the top of the file
add        ath79_register_usb();          before ath79_register_m25p80(&tl_wr741ndv4_flash_data)

        Kconfig
add        select ATH79_DEV_USB           under "config ATH79_MACH_TL_WR741ND_V4"

Now, run make again. Now the USB will work.

(Thanks to DarkSky and twinclouds)

Regards

This path would be correct:

 /target/linux/ar71xx/files/arch/mips/ath79/ 

After changes to the files (if previously compiled),enter the command to prepare the kernel tree :

make target/linux/{clean,prepare} V=s QUILT=1

After which it will be possible to compile.

zabses wrote:
hoatienii wrote:

Please share how to mod sd card. And share PCB.

MMC Mod
PCB in Sprint Layout 6 format
P.S. I could not raise the firmware sd mod in Chaos Calmer, Barrier Breaker at all going without errors.

+ Patch to add support for usb and mmc in TL-WR740(1)N(D) v.4 (Barrier Breaker)

index 9323b31..a30f4c1 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-m25p80.c
@@ -51,6 +51,7 @@ void __init ath79_register_m25p80(struct flash_platform_data *pdata)
 {
     ath79_spi_data.bus_num = 0;
-    ath79_spi_data.num_chipselect = 1;
+    ath79_spi_data.num_chipselect = 2;
     ath79_spi0_cdata.is_flash = true;
     ath79_spi_info[0].platform_data = pdata;
     ath79_register_spi(&ath79_spi_data, ath79_spi_info, 1);
index 851b762..81f3813 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd-v4.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd-v4.c
@@ -8,7 +8,11 @@
  *  by the Free Software Foundation.
  */
 
+#include "dev-usb.h"
 #include <linux/gpio.h>
+#include <linux/mmc/host.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/mmc_spi.h>
 
 #include <asm/mach-ath79/ath79.h>
 #include <asm/mach-ath79/ar71xx_regs.h>
@@ -17,11 +21,13 @@
 #include "dev-eth.h"
 #include "dev-gpio-buttons.h"
 #include "dev-leds-gpio.h"
+#include "dev-spi.h"
 #include "dev-m25p80.h"
 #include "dev-usb.h"
 #include "dev-wmac.h"
 #include "machtypes.h"
 
+#define TL_WR741NDV4_GPIO_CS1_MMC    7
 #define TL_WR741NDV4_GPIO_BTN_RESET    11
 #define TL_WR741NDV4_GPIO_BTN_WPS    26
 
@@ -43,6 +49,29 @@
 #define TL_WR741NDV4_KEYS_POLL_INTERVAL    20    /* msecs */
 #define TL_WR741NDV4_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR741NDV4_KEYS_POLL_INTERVAL)
 
+static struct mmc_spi_platform_data ath79_mmc_data = {
+       .get_ro = NULL,
+       .get_cd = NULL,
+       .detect_delay = 100, /* msecs */ 
+    .ocr_mask    = MMC_VDD_32_33 | MMC_VDD_33_34,
+};
+
+static struct ath79_spi_controller_data ath79_spi1_cdata = {
+    .cs_type = ATH79_SPI_CS_TYPE_GPIO,
+    .cs_line = TL_WR741NDV4_GPIO_CS1_MMC,
+};
+
+static struct spi_board_info ath79_spi_info[] = {
+    {
+        .bus_num    = 0,
+        .chip_select    = 1,
+        .max_speed_hz    = 25000000,
+        .modalias    = "mmc_spi",
+        .platform_data    = &ath79_mmc_data,
+        .controller_data = &ath79_spi1_cdata,
+    }
+};
+
 static const char *tl_wr741ndv4_part_probes[] = {
     "tp-link",
     NULL,
@@ -142,6 +171,7 @@ static void __init tl_ap121_setup(void)
                     AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
                     AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
 
+    ath79_register_usb();
     ath79_register_m25p80(&tl_wr741ndv4_flash_data);
     ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
     ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1);
@@ -151,6 +181,9 @@ static void __init tl_ap121_setup(void)
     ath79_register_eth(0);
 
     ath79_register_wmac(ee, mac);
+
+    spi_register_board_info(ath79_spi_info,
+                            ARRAY_SIZE(ath79_spi_info));
 }
 
 static void __init tl_wr741ndv4_setup(void)

Command:

patch -p1 < 740v4.patch

P.S. Sorry for my english

(Last edited by zabses on 7 May 2016, 17:54)

diabolusss wrote:

however, i found my problem: i soldered usb-dp pin with the next one...  but i know how to check soldering for sure now: raw usb-dm have 450 and usb-dp - 500 when listening by multimeter in diode mode, the same values i need to get after soldering(which i get on one pin and thats why i got debounce error when i reversed connections).  i messed up with  cpu pins and i am waiting for stronger lens to correct that(12x zoom is far too small).

I messed up them very well and pins are so small that i cannot repair it(i suppose my skill is too low for such soldering). Luckily i have found 841nd router and attached usb there and it's perfectly working. I have a question(which is about hardware): connecting usb directly it's working fine, but if i connect hub and flash drive into that hub it gives me an error after a while.

I run router with 9v dc(with 5v it doesn't work), so to power usb i made voltage divider with 34 and 47 ohm resistors.
When i connect 4-port hub voltage drops to 4.85v, and with flash drive attached it drops almost to 4v(conecting flash drive directly i have stable 5.2v). Is it possible to make stable 5 volts o\p to flash drive attached to a hub using only resistors\capacitors? Or is it safe to use step up boost converter(1-5v to 5v)? (the easiest way is to use proper step-down converter, but i don't have such by hand right now).

Full log:

[ 1452.240000] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 1956.430000] usb 1-1: USB disconnect, device number 9
[ 1992.210000] usb 1-1: new full-speed USB device number 10 using ehci-platform
[ 1992.370000] hub 1-1:1.0: USB hub found
[ 1992.370000] hub 1-1:1.0: 4 ports detected
[ 2035.290000] usb 1-1.3: new full-speed USB device number 11 using ehci-platform
[ 2035.410000] usb 1-1.3: not running at top speed; connect to a high speed hub
[ 2035.430000] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[ 2035.430000] scsi3 : usb-storage 1-1.3:1.0
[ 2036.440000] scsi 3:0:0:0: Direct-Access     SanDisk  Cruzer           8.02 PQ: 0 ANSI: 0 CCS
[ 2036.460000] sd 3:0:0:0: [sda] 7913471 512-byte logical blocks: (4.05 GB/3.77 GiB)
[ 2036.470000] sd 3:0:0:0: [sda] Write Protect is off
[ 2036.470000] sd 3:0:0:0: [sda] Mode Sense: 45 00 00 08
[ 2036.480000] sd 3:0:0:0: [sda] No Caching mode page found
[ 2036.480000] sd 3:0:0:0: [sda] Assuming drive cache: write through
[ 2036.500000] sd 3:0:0:0: [sda] No Caching mode page found
[ 2036.510000] sd 3:0:0:0: [sda] Assuming drive cache: write through
[ 2036.540000]  sda: sda1 sda2 sda3
[ 2036.590000] sd 3:0:0:0: [sda] No Caching mode page found
[ 2036.600000] sd 3:0:0:0: [sda] Assuming drive cache: write through
[ 2036.600000] sd 3:0:0:0: [sda] Attached SCSI removable disk
[ 2050.150000] usb 1-1.3: USB disconnect, device number 11
[ 2050.280000] usb 1-1: reset full-speed USB device number 10 using ehci-platform
[ 2050.940000] usb 1-1.3: new full-speed USB device number 12 using ehci-platform
[ 2051.060000] usb 1-1.3: not running at top speed; connect to a high speed hub
[ 2051.080000] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[ 2051.080000] scsi4 : usb-storage 1-1.3:1.0
[ 2052.090000] scsi 4:0:0:0: Direct-Access     SanDisk  Cruzer           8.02 PQ: 0 ANSI: 0 CCS
[ 2052.110000] sd 4:0:0:0: [sda] 7913471 512-byte logical blocks: (4.05 GB/3.77 GiB)
[ 2052.120000] sd 4:0:0:0: [sda] Write Protect is off
[ 2052.120000] sd 4:0:0:0: [sda] Mode Sense: 45 00 00 08
[ 2052.120000] sd 4:0:0:0: [sda] No Caching mode page found
[ 2052.130000] sd 4:0:0:0: [sda] Assuming drive cache: write through
[ 2052.150000] sd 4:0:0:0: [sda] No Caching mode page found
[ 2052.160000] sd 4:0:0:0: [sda] Assuming drive cache: write through
[ 2052.190000]  sda: sda1 sda2 sda3
[ 2052.210000] sd 4:0:0:0: [sda] No Caching mode page found
[ 2052.210000] sd 4:0:0:0: [sda] Assuming drive cache: write through
[ 2052.220000] sd 4:0:0:0: [sda] Attached SCSI removable disk
[ 2063.850000] usb 1-1.3: USB disconnect, device number 12
[ 2063.980000] usb 1-1: reset full-speed USB device number 10 using ehci-platform
[ 2064.600000] usb 1-1.3: new full-speed USB device number 13 using ehci-platform
[ 2064.660000] hub 1-1:1.0: hub_port_status failed (err = -71)
[ 2064.980000] usb 1-1.3: not running at top speed; connect to a high speed hub
[ 2065.000000] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[ 2065.000000] scsi5 : usb-storage 1-1.3:1.0
[ 2066.010000] scsi 5:0:0:0: Direct-Access     SanDisk  Cruzer           8.02 PQ: 0 ANSI: 0 CCS
[ 2066.030000] sd 5:0:0:0: [sda] 7913471 512-byte logical blocks: (4.05 GB/3.77 GiB)
[ 2066.040000] sd 5:0:0:0: [sda] Write Protect is off
[ 2066.040000] sd 5:0:0:0: [sda] Mode Sense: 45 00 00 08
[ 2066.040000] sd 5:0:0:0: [sda] No Caching mode page found
[ 2066.050000] sd 5:0:0:0: [sda] Assuming drive cache: write through
[ 2066.070000] sd 5:0:0:0: [sda] No Caching mode page found
[ 2066.080000] sd 5:0:0:0: [sda] Assuming drive cache: write through
[ 2066.110000]  sda: sda1 sda2 sda3
[ 2066.130000] sd 5:0:0:0: [sda] No Caching mode page found
[ 2066.140000] sd 5:0:0:0: [sda] Assuming drive cache: write through
[ 2066.140000] sd 5:0:0:0: [sda] Attached SCSI removable disk
[ 2074.980000] usb 1-1.3: USB disconnect, device number 13
[ 2075.120000] usb 1-1: reset full-speed USB device number 10 using ehci-platform
[ 2075.270000] usb 1-1: device descriptor read/all, error 2
[ 2075.410000] usb 1-1: reset full-speed USB device number 10 using ehci-platform
[ 2075.570000] usb 1-1: device descriptor read/all, error 10
[ 2075.710000] usb 1-1: reset full-speed USB device number 10 using ehci-platform
[ 2075.760000] usb 1-1: device descriptor read/all, error 10
[ 2075.890000] usb 1-1: reset full-speed USB device number 10 using ehci-platform
[ 2075.930000] usb 1-1: device firmware changed
[ 2076.040000] hub 1-1:1.0: activate --> -19
[ 2076.040000] usb 1-1: USB disconnect, device number 10
[ 2076.170000] usb 1-1: new full-speed USB device number 14 using ehci-platform
[ 2076.350000] usb 1-1: device descriptor read/all, error 2
[ 2076.490000] usb 1-1: new full-speed USB device number 15 using ehci-platform
[ 2076.660000] usb 1-1: device descriptor read/all, error 2
[ 2076.800000] usb 1-1: new full-speed USB device number 16 using ehci-platform
[ 2076.870000] usb 1-1: device descriptor read/all, error 2
[ 2077.000000] usb 1-1: new full-speed USB device number 17 using ehci-platform
[ 2077.130000] usb 1-1: device descriptor read/8, error -71
[ 2077.310000] usb 1-1: device descriptor read/8, error -61
[ 2077.430000] hub 1-0:1.0: unable to enumerate USB device on port 1

That resistor divider is a crappy way to lower the voltage. As the usb requires more power the voltage will go lower and lower and finally causing weird things.
Use at least a voltage regulator like a lm7805 or similar, they are very cheap but must have heatsink if it heats too much

(Last edited by dabyd64 on 9 May 2016, 13:13)

Yeah, thank you. simply i had a little hope that there are other options. Connected 1-5v to 5v step up boost converter to voltage divider and as a result fried one of vd resistors. However strange things happen. For testing purposes i am running router usb from laptop usb power. 4 port hub with two flash drives is working fine, but after a while some errors happens:

[  490.960000] usb 1-1.3: USB disconnect, device number 7
[  491.100000] usb 1-1: reset full-speed USB device number 6 using ehci-platform
[  491.250000] usb 1-1: device descriptor read/all, error 10
[  491.380000] usb 1-1: reset full-speed USB device number 6 using ehci-platform
[  491.530000] usb 1-1: device firmware changed
[  491.640000] hub 1-1:1.0: activate --> -19
[  491.640000] usb 1-1: USB disconnect, device number 6
[  491.770000] usb 1-1: new full-speed USB device number 8 using ehci-platform
[  491.920000] usb 1-1: config index 0 descriptor too short (expected 25, got 17)
[  491.930000] usb 1-1: config 1 has an invalid descriptor of length 0, skipping remainder of the config
[  491.940000] usb 1-1: config 1 has 0 interfaces, different from the descriptor's value: 1

After ejecting flash drives i got this error, and only one of four ports was working:

[11356.520000] usb 1-1.1: USB disconnect, device number 10
[11358.180000] usb 1-1.3: USB disconnect, device number 11
[11484.500000] hub 1-1:1.0: hub_port_status failed (err = -79)
[11484.500000] hub 1-1:1.0: connect-debounce failed, port 3 disabled

but after few seconds it died:

[11827.820000] usb 1-1.2: USB disconnect, device number 13
[11827.960000] usb 1-1: reset full-speed USB device number 9 using ehci-platform
[11828.110000] usb 1-1: device firmware changed
[11828.220000] hub 1-1:1.0: activate --> -19
[11828.220000] usb 1-1: USB disconnect, device number 9
[11828.350000] usb 1-1: new full-speed USB device number 14 using ehci-platform
[11828.500000] usb 1-1: config index 0 descriptor too short (expected 25, got 17)
[11828.510000] usb 1-1: config 1 has an invalid descriptor of length 0, skipping remainder of the config
[11828.520000] usb 1-1: config 1 has 0 interfaces, different from the descriptor's value: 1

Full log:

[   72.760000] hub 1-1:1.0: 4 ports detected
[  108.770000] usb 1-1.3: new full-speed USB device number 5 using ehci-platform
[  108.890000] usb 1-1.3: not running at top speed; connect to a high speed hub
[  108.910000] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[  108.910000] scsi1 : usb-storage 1-1.3:1.0
[  109.920000] scsi 1:0:0:0: Direct-Access     SanDisk  Cruzer           8.02 PQ: 0 ANSI: 0 CCS
[  109.940000] sd 1:0:0:0: [sda] 7913471 512-byte logical blocks: (4.05 GB/3.77 GiB)
[  109.950000] sd 1:0:0:0: [sda] Write Protect is off
[  109.950000] sd 1:0:0:0: [sda] Mode Sense: 45 00 00 08
[  109.950000] sd 1:0:0:0: [sda] No Caching mode page found
[  109.960000] sd 1:0:0:0: [sda] Assuming drive cache: write through
[  109.980000] sd 1:0:0:0: [sda] No Caching mode page found
[  109.990000] sd 1:0:0:0: [sda] Assuming drive cache: write through
[  110.020000]  sda: sda1 sda2 sda3
[  110.040000] sd 1:0:0:0: [sda] No Caching mode page found
[  110.050000] sd 1:0:0:0: [sda] Assuming drive cache: write through
[  110.050000] sd 1:0:0:0: [sda] Attached SCSI removable disk
[  299.350000] usb 1-1.3: USB disconnect, device number 5
[  299.490000] usb 1-1: reset full-speed USB device number 3 using ehci-platform
[  299.640000] usb 1-1: device firmware changed
[  299.750000] hub 1-1:1.0: activate --> -19
[  299.750000] usb 1-1: USB disconnect, device number 3
[  299.880000] usb 1-1: new full-speed USB device number 6 using ehci-platform
[  300.050000] hub 1-1:1.0: USB hub found
[  300.050000] hub 1-1:1.0: 4 ports detected
[  300.490000] usb 1-1.3: new full-speed USB device number 7 using ehci-platform
[  300.610000] usb 1-1.3: not running at top speed; connect to a high speed hub
[  300.630000] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[  300.630000] scsi2 : usb-storage 1-1.3:1.0
[  301.640000] scsi 2:0:0:0: Direct-Access     SanDisk  Cruzer           8.02 PQ: 0 ANSI: 0 CCS
[  301.660000] sd 2:0:0:0: [sda] 7913471 512-byte logical blocks: (4.05 GB/3.77 GiB)
[  301.670000] sd 2:0:0:0: [sda] Write Protect is off
[  301.670000] sd 2:0:0:0: [sda] Mode Sense: 45 00 00 08
[  301.670000] sd 2:0:0:0: [sda] No Caching mode page found
[  301.680000] sd 2:0:0:0: [sda] Assuming drive cache: write through
[  301.700000] sd 2:0:0:0: [sda] No Caching mode page found
[  301.710000] sd 2:0:0:0: [sda] Assuming drive cache: write through
[  301.740000]  sda: sda1 sda2 sda3
[  301.760000] sd 2:0:0:0: [sda] No Caching mode page found
[  301.770000] sd 2:0:0:0: [sda] Assuming drive cache: write through
[  301.770000] sd 2:0:0:0: [sda] Attached SCSI removable disk
[  490.960000] usb 1-1.3: USB disconnect, device number 7
[  491.100000] usb 1-1: reset full-speed USB device number 6 using ehci-platform
[  491.250000] usb 1-1: device descriptor read/all, error 10
[  491.380000] usb 1-1: reset full-speed USB device number 6 using ehci-platform
[  491.530000] usb 1-1: device firmware changed
[  491.640000] hub 1-1:1.0: activate --> -19
[  491.640000] usb 1-1: USB disconnect, device number 6
[  491.770000] usb 1-1: new full-speed USB device number 8 using ehci-platform
[  491.920000] usb 1-1: config index 0 descriptor too short (expected 25, got 17)
[  491.930000] usb 1-1: config 1 has an invalid descriptor of length 0, skipping remainder of the config
[  491.940000] usb 1-1: config 1 has 0 interfaces, different from the descriptor's value: 1
[ 7427.030000] usb 1-1: USB disconnect, device number 8
[ 7685.390000] usb 1-1: new full-speed USB device number 9 using ehci-platform
[ 7685.550000] hub 1-1:1.0: USB hub found
[ 7685.550000] hub 1-1:1.0: 4 ports detected
[ 7686.050000] usb 1-1.1: new full-speed USB device number 10 using ehci-platform
[ 7686.170000] usb 1-1.1: not running at top speed; connect to a high speed hub
[ 7686.190000] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[ 7686.190000] scsi3 : usb-storage 1-1.1:1.0
[ 7686.450000] usb 1-1.3: new full-speed USB device number 11 using ehci-platform
[ 7686.570000] usb 1-1.3: not running at top speed; connect to a high speed hub
[ 7686.590000] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[ 7686.590000] scsi4 : usb-storage 1-1.3:1.0
[ 7687.280000] scsi 3:0:0:0: Direct-Access     Kingston DT 100 G2        PMAP PQ: 0 ANSI: 4
[ 7687.600000] scsi 4:0:0:0: Direct-Access     SanDisk  Cruzer           8.02 PQ: 0 ANSI: 0 CCS
[ 7687.620000] sd 4:0:0:0: [sdb] 7913471 512-byte logical blocks: (4.05 GB/3.77 GiB)
[ 7687.630000] sd 4:0:0:0: [sdb] Write Protect is off
[ 7687.640000] sd 4:0:0:0: [sdb] Mode Sense: 45 00 00 08
[ 7687.640000] sd 4:0:0:0: [sdb] No Caching mode page found
[ 7687.650000] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 7687.670000] sd 4:0:0:0: [sdb] No Caching mode page found
[ 7687.680000] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 7687.710000]  sdb: sdb1 sdb2 sdb3
[ 7687.750000] sd 4:0:0:0: [sdb] No Caching mode page found
[ 7687.750000] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 7687.760000] sd 4:0:0:0: [sdb] Attached SCSI removable disk
[ 7688.040000] sd 3:0:0:0: [sda] 15470592 512-byte logical blocks: (7.92 GB/7.37 GiB)
[ 7688.050000] sd 3:0:0:0: [sda] Write Protect is off
[ 7688.050000] sd 3:0:0:0: [sda] Mode Sense: 23 00 00 00
[ 7688.060000] sd 3:0:0:0: [sda] No Caching mode page found
[ 7688.060000] sd 3:0:0:0: [sda] Assuming drive cache: write through
[ 7688.090000] sd 3:0:0:0: [sda] No Caching mode page found
[ 7688.100000] sd 3:0:0:0: [sda] Assuming drive cache: write through
[ 7688.130000]  sda: sda1
[ 7688.170000] sd 3:0:0:0: [sda] No Caching mode page found
[ 7688.170000] sd 3:0:0:0: [sda] Assuming drive cache: write through
[ 7688.180000] sd 3:0:0:0: [sda] Attached SCSI removable disk
[ 8284.320000] EXT4-fs (sdb1): recovery complete
[ 8284.320000] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[11356.520000] usb 1-1.1: USB disconnect, device number 10
[11358.180000] usb 1-1.3: USB disconnect, device number 11
[11484.500000] hub 1-1:1.0: hub_port_status failed (err = -79)
[11484.500000] hub 1-1:1.0: connect-debounce failed, port 3 disabled
[11613.490000] usb 1-1.1: new full-speed USB device number 12 using ehci-platform
[11625.570000] usb 1-1.2: new full-speed USB device number 13 using ehci-platform
[11625.690000] usb 1-1.2: not running at top speed; connect to a high speed hub
[11625.710000] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[11625.710000] scsi5 : usb-storage 1-1.2:1.0
[11626.720000] scsi 5:0:0:0: Direct-Access     SanDisk  Cruzer           8.02 PQ: 0 ANSI: 0 CCS
[11626.740000] sd 5:0:0:0: [sda] 7913471 512-byte logical blocks: (4.05 GB/3.77 GiB)
[11626.750000] sd 5:0:0:0: [sda] Write Protect is off
[11626.750000] sd 5:0:0:0: [sda] Mode Sense: 45 00 00 08
[11626.750000] sd 5:0:0:0: [sda] No Caching mode page found
[11626.760000] sd 5:0:0:0: [sda] Assuming drive cache: write through
[11626.780000] sd 5:0:0:0: [sda] No Caching mode page found
[11626.790000] sd 5:0:0:0: [sda] Assuming drive cache: write through
[11626.820000]  sda: sda1 sda2 sda3
[11626.850000] sd 5:0:0:0: [sda] No Caching mode page found
[11626.860000] sd 5:0:0:0: [sda] Assuming drive cache: write through
[11626.860000] sd 5:0:0:0: [sda] Attached SCSI removable disk
[11827.820000] usb 1-1.2: USB disconnect, device number 13
[11827.960000] usb 1-1: reset full-speed USB device number 9 using ehci-platform
[11828.110000] usb 1-1: device firmware changed
[11828.220000] hub 1-1:1.0: activate --> -19
[11828.220000] usb 1-1: USB disconnect, device number 9
[11828.350000] usb 1-1: new full-speed USB device number 14 using ehci-platform
[11828.500000] usb 1-1: config index 0 descriptor too short (expected 25, got 17)
[11828.510000] usb 1-1: config 1 has an invalid descriptor of length 0, skipping remainder of the config
[11828.520000] usb 1-1: config 1 has 0 interfaces, different from the descriptor's value: 1

(Last edited by diabolusss on 9 May 2016, 22:12)

How long are the wires? Don't use the thin wire from the CPU up to the USB connector.
Leave 5cm of the thin wire, then cut, secure with hot glue and solder thicker wires until the USB connector

I have used 1 cm long thin wire to the 2pin connector. And then i connect usb port with original wires. it's ~20cm long and ~5cm of its shielding is missing.
This error seems to occur only when i use 4 port hub. No glitches catched with flash drive only.

UPDATE: My mistake, catched something:

[22331.150000] usb 1-1: USB disconnect, device number 2
[22331.240000] Buffer I/O error on device sda2, logical block 327680
[22331.240000] lost page write due to I/O error on sda2
[22331.250000] JBD2: Error -5 detected when updating journal superblock for sda2-8.
[22331.460000] usb 1-1: new high-speed USB device number 3 using ehci-platform
[22331.620000] usb-storage 1-1:1.0: USB Mass Storage device detected
[22331.620000] scsi1 : usb-storage 1-1:1.0
[22332.630000] scsi 1:0:0:0: Direct-Access     SanDisk  Cruzer           8.02 PQ: 0 ANSI: 0 CCS
[22332.640000] sd 1:0:0:0: [sdb] 7913471 512-byte logical blocks: (4.05 GB/3.77 GiB)
[22332.650000] sd 1:0:0:0: [sdb] Write Protect is off
[22332.650000] sd 1:0:0:0: [sdb] Mode Sense: 45 00 00 08
[22332.650000] sd 1:0:0:0: [sdb] No Caching mode page found
[22332.660000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[22332.670000] sd 1:0:0:0: [sdb] No Caching mode page found
[22332.670000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[22332.690000]  sdb: sdb1 sdb2 sdb3
[22332.700000] sd 1:0:0:0: [sdb] No Caching mode page found
[22332.710000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[22332.710000] sd 1:0:0:0: [sdb] Attached SCSI removable disk
[22334.560000] EXT4-fs (sdb2): recovery complete
[22334.570000] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: 
[22334.630000] Adding 65532k swap on /dev/sdb3.  Priority:-2 extents:1 across:65532k 
[41256.090000] EXT4-fs error (device sda1): ext4_find_entry:1309: inode #11: comm luci: reading directory lblock 0
[41259.990000] Read-error on swap-device (8:0:64)
[41260.000000] Read-error on swap-device (8:0:72)
[41260.000000] Read-error on swap-device (8:0:80)
[41318.500000] EXT4-fs error (device sda1): ext4_find_entry:1309: inode #46: comm ash: reading directory lblock 0
[41318.510000] EXT4-fs error (device sda1): ext4_find_entry:1309: inode #75: comm ash: reading directory lblock 0
[41336.450000] EXT4-fs error (device sda1): ext4_find_entry:1309: inode #46: comm ash: reading directory lblock 0

(Last edited by diabolusss on 10 May 2016, 21:10)

dabyd64 wrote:

That resistor divider is a crappy way to lower the voltage. As the usb requires more power the voltage will go lower and lower and finally causing weird things.
Use at least a voltage regulator like a lm7805 or similar, they are very cheap but must have heatsink if it heats too much

I have found some transistors, but i don't know can i use them instead of lm7805. I have kt837n, kt626b, kt805bm, kt961A, kt814g, kt815b. i'll appreciate any help.

You can't use a transistor alone to make a voltage regulator...
7805 is an extremely common regulator, for example you can find them inside most of computer power supplies.
LM317, LM350 are also very common, they are adjustable regulators.
You can make a regulator with a transistor, but  you need more components:
The simplest circuit I found was this.
http://darrenyates.com.au/wp-content/uploads/2011/03/ELEC0001.jpg
Be careful, always measure first before connecting the usb device, you don't want burned usb drives!

For searching transistor specs, this site is good: http://hlev.info/

So far, the best for this circuit are kt961A and kt815b. You still need the 5.6V zener diode

(Last edited by dabyd64 on 11 May 2016, 23:54)

Excellent, thank you!

Please reup FW compiled.
Thanks!

Hi, my Mega account was deleted.
They said that a single complaint caused this, as they can't bother checking if a complaint has reason or not, so they just deleted it. The funniest is that the complaint didn't had reason for copyright, it was for a phone firmware backup to restore it in the case it bricks...
Luckly I had a copy on my dropbox.Currently re-uploading, will update soon wink

Edit: Done! smile

(Last edited by dabyd64 on 10 Aug 2016, 15:40)

Shahid wrote:

Good News for everyone, No more compilation required
recently i discovered TL-MR3220 v2 & TL-WR741 v4 Both uses AR9331 CPU
I have successfully tried these firmwares in my TL-WR741ND V4
15.05 Chaos Calmer https://downloads.openwrt.org/chaos_cal … pgrade.bin
14.07 Barrier Breaker https://downloads.openwrt.org/barrier_b … pgrade.bin
Install using mtd and force it

Everything just works fine
USB is working great with no errors at all
Install these packages if you want to mount usb storage
kmod-usb-storage-extras kmod-fs-vfat kmod-fs-ext4

Install these packages to enable tether your 3G and 4G USB dongles and Android tethering
usb-modeswitch kmod-usb-net-rndis kmod-usb-net-cdc-ether kmod-usb-net

For mounting your USB as rootfs or  extroot http://wiki.openwrt.org/doc/howto/extroot

Yes, you are right, for example: TP-Link TL-WR740N v1 is similar to TL-WR741ND v1 and similar to TL-WA701ND v1 (with universal repeater oem support and similar to TL-WA730RE v1) and similar to TL-MR3220 v1 (with USB support) maybe with USB support with D- in pin 73 of CPU or R100 resistor 15KOhm and D+ in pin 74 of CPU or R101 resistor 15KOhm plus LM2574 voltage regulator and 470uF 16V electrolitic capacitor.

(Last edited by cjrs on 10 Aug 2016, 20:13)

dabyd64 wrote:

Hi, my Mega account was deleted.
They said that a single complaint caused this, as they can't bother checking if a complaint has reason or not, so they just deleted it. The funniest is that the complaint didn't had reason for copyright, it was for a phone firmware backup to restore it in the case it bricks...
Luckly I had a copy on my dropbox.Currently re-uploading, will update soon wink

Edit: Done! smile

You're my hero, thank you!!

The discussion might have continued from here.