Hi, I sucessfully made a USB mod for the TP-Link wr740n v4.
Searching, I found this: http://www.zhigao5191.com/computer-netw … sbkou.html
There I saw what pins I had to scratch and solder.
I saw lots of cool things being developed for the wr703n, so, being the same hardware as the 740n v4, I decided to try it out.
The hardest part was to scratch and solder that incredibly small copper tracks. But I got it in 15 minutes!
I used a very thin enamelled copper wire taken from a transformer of and old phone charger. It is thin like human hair or even less, I don't know what AWG size is it.
Keep the thin wire as shorter as possible!! put about 2-3cm, then put some hot glue to secure it, and continue the route with a thicker wire. A long and so thin wire will cause errors due the high impedance at high frequencies. Look at the last photo to see what I'm talking about.
30-03-2016: Images deleted
I only could find these...
As we all know, USB requires power to work, between 4.5 and 5.5V and 100-500mA. In this router, I only had 3.3V, or the voltage directly from the wall adapter which I measured and it was about 8.5V.
But I wouldn't have started this, without previously having looked how to solve that! .
Months ago, I had bought a crappy Ebay mp3-to-FM player, which could use USB drive or SD card, from ebay. It heard horrible so I claimed to the seller and got my money back.
Some time ago I opened it to see what was inside. As it powered form the car battery (12V), there was a step-down converter to 5V built in a corner of the board. How convenient! I cleaned all the components from the board, except those required for the converter to work. Also I added better capacitors.
*EDIT*
I uploaded a new image explaining how to power USB from external adapter.
Click on the image for a hi-res version:
I mounted everything, I crossed my fingers...let's go!
I turned it on,opened telnet and set "logread -f" to see new changes. I plugged in my Kingstom 4GB pendrive.
I saw nothing on the screen. Tried to reverse the usb data wires, still the same.
I thought that 740n v4 openwrt firmware didn't have the USB modules/kernel/etc (I still don't understand well the linux stuff xD).
I flashed the openwrt's wr703n firmware version, forcing it.
Again, I turned it on, set the logread -f and plugged the pendrive.
At first I saw some kind of errors, repeating every few seconds. Sorry I didn't copy it, i forgot . I remember it said something about "debouncing".
Hey, somethings occurs, that's something! I reversed the USB data wires and tried again.
And this time it worked! See the log:
Sep 8 15:45:29 OpenWrt kern.info kernel: [ 119.400000] usb 1-1: new high-speed USB device number 2 using ehci-platform
Sep 8 15:45:29 OpenWrt kern.info kernel: [ 119.550000] scsi0 : usb-storage 1-1:1.0
Sep 8 15:45:30 OpenWrt kern.notice kernel: [ 120.550000] scsi 0:0:0:0: Direct-Access Kingston DataTraveler 2.0 1.00 PQ: 0 ANSI: 2
Sep 8 15:45:30 OpenWrt kern.notice kernel: [ 120.560000] sd 0:0:0:0: [sda] 8089600 512-byte logical blocks: (4.14 GB/3.85 GiB)
Sep 8 15:45:30 OpenWrt kern.notice kernel: [ 120.560000] sd 0:0:0:0: [sda] Write Protect is off
Sep 8 15:45:30 OpenWrt kern.debug kernel: [ 120.570000] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
Sep 8 15:45:30 OpenWrt kern.err kernel: [ 120.570000] sd 0:0:0:0: [sda] No Caching mode page present
Sep 8 15:45:30 OpenWrt kern.err kernel: [ 120.570000] sd 0:0:0:0: [sda] Assuming drive cache: write through
Sep 8 15:45:30 OpenWrt kern.err kernel: [ 120.590000] sd 0:0:0:0: [sda] No Caching mode page present
Sep 8 15:45:30 OpenWrt kern.err kernel: [ 120.590000] sd 0:0:0:0: [sda] Assuming drive cache: write through
Sep 8 15:45:30 OpenWrt kern.info kernel: [ 120.670000] sda: sda1
Sep 8 15:45:30 OpenWrt kern.err kernel: [ 120.680000] sd 0:0:0:0: [sda] No Caching mode page present
Sep 8 15:45:30 OpenWrt kern.err kernel: [ 120.680000] sd 0:0:0:0: [sda] Assuming drive cache: write through
Sep 8 15:45:30 OpenWrt kern.notice kernel: [ 120.690000] sd 0:0:0:0: [sda] Attached SCSI removable disk
Sep 8 15:45:31 OpenWrt user.crit mountd[2178]: new mount : Disc-A1 -> sda1 (FAT)
Sep 8 15:45:31 OpenWrt user.crit mountd[2178]: mounting /tmp/run/mountd/sda1
Sep 8 15:45:31 OpenWrt user.crit mountd[2318]: mount -t vfat -o rw,uid=1000,gid=1000 /dev/sda1 /tmp/run/mountd/sda1
Sep 8 15:45:31 OpenWrt user.crit mountd[2178]: ----------> mount ret = 0
So, that's it! its no easy, but not incredibly hard.
The step-down converters require as most as 1.5V higher that its output voltage, usually its 1.25V for linear reguladors, and 0,7V for switching step-down regulators. Switching regulators that use Mosfet instead bipolar transistor doesn't drop any voltage, they can source the same voltage as the input.
This router has a switching step-down converter, so instead of building another step down or step-up converter for the USB, you can power the whole router with a 5V adapter.
The router will be able to convert it to 3.3V for the processor and the other ICs(5V is 1.7V higher that 3.3V, it will work for sure!), and you can take that 5V directly to the USB and making everything much easier.
Just solder some big capacitor in the usb connector, a 100uF 16V will work, but a bigger one like 220uF or 330uF, will ensure better stability.
The trunk 740n firmware doesn't work with just install/plug, even installing the kernel modules.
You must compile yourself, or download a modified version by somebody
You can download my compiled versions here:
I also uploaded for the rest of the 740/741 versions as they are compiled at the same time .
Available versions
- 12.09 Attitude Adjustment
- 14.07 Barrier Breaker
- 15.05 Chaos Calmer
All compiled for 740nv1, 740nv3, 740nv4, 741nv1, 741nv2, 741nv4, 743nv1, 743nv2.
Mega folder with all firmwares:
https://mega.nz/#F!QNgBDayJ!ip2Eksp6cQOqbSBgF8V1BA
Performance
With fat32 formatted USB flash drive, I got 24MB/s read and 14MB/s write
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
(Last edited by dabyd64 on 10 Aug 2016, 15:42)