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.

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 sad
I only could find these...

http://s21.postimg.org/oi585qjjb/ar9331_usb_pins.jpg


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! big_smile.
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:
http://s24.postimg.org/ks47r28f7/usb_740n_v4png.jpg

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 sad. 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 wink.
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 smile


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)

Dude. That is the craziest way of accessing CPU pins that I have ever seen.

Hahaha I know!
But thats the problem with the MLF package...there are no visible pins!
Everything is under de body of the CPU...and unless you find and alternative point, there's no way! :S
In this case, the USB pads inside the CPU are just there and they're not routed to anywhere.
So I had to do it in the hard way method as you see. Drill it! Well I just scratched it by hand with a cutter and a lime...it took me 10 minutes and had to do it very carefully...because if you press too hard you will scratch that small copper tracks...surely damaging the router.

But, hey! it's working! tongue

(Last edited by dabyd64 on 1 Jul 2014, 15:06)

Interesting.  So if you flash the 703n openwrt firmware to your modded 740n, the USB will work?  If you do a fdisk -l with a flash drive plugged in, what is output?  I am interested to see it.

I can read the usb contents perfectly. I Mounted it to some folder, then symlinked to the www/ folder. The I could download the USB contents trough the HTTP server, at ~8Mbytes/s.

Yes, to have the usb working I must use the 703n's firmware. As the 740n doesn't have usb oficially, I suppose that the trunk build doesn't include all the usb stuff for making it work. And as I don't know how to add them, I tried the fast and easy way.
But I was asking for some help to make it with the 740n's firmware ... smile
Here you have the fdisk-l:

Disk /dev/mtdblock0: 0 MB, 131072 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock0 doesn't contain a valid partition table

Disk /dev/mtdblock1: 1 MB, 1237504 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock1 doesn't contain a valid partition table

Disk /dev/mtdblock2: 2 MB, 2759680 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock2 doesn't contain a valid partition table

Disk /dev/mtdblock3: 0 MB, 327680 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock3 doesn't contain a valid partition table

Disk /dev/mtdblock4: 0 MB, 65536 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock4 doesn't contain a valid partition table

Disk /dev/mtdblock5: 3 MB, 3997696 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock5 doesn't contain a valid partition table

Disk /dev/sda: 4141 MB, 4141875200 bytes
255 heads, 63 sectors/track, 503 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1   *           1         504     4044736   b Win95 FAT32
Partition 1 has different physical/logical endings:
     phys=(502, 254, 63) logical=(503, 141, 22)

(Last edited by dabyd64 on 8 Jun 2012, 10:57)

C'mon guys... lots of you know about kernel modules and compiling..can't you just help me a bit to include such USB stuff into the 740n firmware¿
I don't understand well all the building thing.. smile

I also have a tplink wr740n, version 4.21. I did the mod, I modified "mach-tl-wr741nd-v4.c" to enable USB, but devices aren't enumerated. I also force-flashed 703n's firmware, but the same happens. sad
To enable usb on 740n, just add #include "dev-usb.h" at the top of the file and ath79_register_usb(); before ath79_register_m25p80(&tl_wr741ndv4_flash_data);. It also needs "select ATH79_DEV_USB" in Kconfig, under "config ATH79_MACH_TL_WR741ND_V4". All these files are in <linux source>/arch/mips/ath79.

DarkSky wrote:

I also have a tplink wr740n, version 4.21. I did the mod, I modified "mach-tl-wr741nd-v4.c" to enable USB, but devices aren't enumerated. I also force-flashed 703n's firmware, but the same happens. sad
To enable usb on 740n, just add #include "dev-usb.h" at the top of the file and ath79_register_usb(); before ath79_register_m25p80(&tl_wr741ndv4_flash_data);. It also needs "select ATH79_DEV_USB" in Kconfig, under "config ATH79_MACH_TL_WR741ND_V4". All these files are in <linux source>/arch/mips/ath79.

I have difficulty to find the file Kconfig in the later trunk.  (I guess it is a file, right?)  Can you tell me where it is?

Hi, all the files are under "build_dir/linux-ar71xx_generic/linux-3.3.7/arch/mips/ath79". smile

DarkSky wrote:

Hi, all the files are under "build_dir/linux-ar71xx_generic/linux-3.3.7/arch/mips/ath79". smile

I checked previously but didn't find this particular one.  Let me check again to see if I can find it.

Check again. I'm pretty sure it's under that directory.

giannis@acer ~/OpenWrt/tplink740/build_dir/linux-ar71xx_generic/linux-3.3.7/arch/mips/ath79 $ find -name Kconfig
./Kconfig
giannis@acer ~/OpenWrt/tplink740/build_dir/linux-ar71xx_generic/linux-3.3.7/arch/mips/ath79 $

If the device is not enumerated even with 703 firmware, maybe there is something wrong in your mod...
Try reversing the usb data pins or re-checking what cpu pins are you connecting to usb.
I say that because I have almost no idea about Linux, and it worked for me  just flashing the 703 firmware, without any modifications...

DarkSky wrote:

Check again. I'm pretty sure it's under that directory.

giannis@acer ~/OpenWrt/tplink740/build_dir/linux-ar71xx_generic/linux-3.3.7/arch/mips/ath79 $ find -name Kconfig
./Kconfig
giannis@acer ~/OpenWrt/tplink740/build_dir/linux-ar71xx_generic/linux-3.3.7/arch/mips/ath79 $

O.K.  It's there.  How I would missed that!  Thanks.

dabyd64 wrote:

If the device is not enumerated even with 703 firmware, maybe there is something wrong in your mod...
Try reversing the usb data pins or re-checking what cpu pins are you connecting to usb.
I say that because I have almost no idea about Linux, and it worked for me  just flashing the 703 firmware, without any modifications...

I've solder D+,D- more than 3 times to the processor pins, with the same results. I will get a magnifying glass and try to solder them again.
I did the SD card mod and now it runs asterisk, but the (bitbanged) SD is quite slow. Will see...

How about the rest of the setup?
How do you get 5v for the usb power?
Have you joined the grounds if you used a separate adapter for the 5V?
Are you putting a capacitor near the USB vcc pin? (Its not critical, but it helps for better stability)

Check my first post, I added a better image at the end of it that explains better the pins used for USB.

(Last edited by dabyd64 on 18 Jun 2012, 00:42)

Hi, i've followed this thread and have made my own mod of this.
Altho i have come to a stop similar to DarkSky's input.

I get the "Device is not enumerated" error, tried swapping the data cables but then i get the debouncing error.
So previous setup was correct.
My dmesg:

root@OpenWrt:~# dmesg
[    0.000000] Linux version 3.3.8 (qwibble@qwibble) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #2 Sat Aug 4 14:19:44 CEST 2012
[    0.000000] MyLoader: sysp=08fabbe8, boardp=ea0a1990, parts=d7d9fd08
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9330 rev 1
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 802cb680, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8128 pages, LIFO batch:0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=TL-WR741ND-v4 console=ttyATH0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] 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] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 29276k/32768k available (2082k kernel code, 3492k reserved, 396k data, 204k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.090000] gpiochip_add: registered GPIOs 0 to 29 on device: ath79
[    0.100000] MIPS: machine is TP-LINK TL-WR741ND v4
[    0.540000] bio: create slab <bio-0> at 0
[    0.550000] Switching to clocksource MIPS
[    0.550000] NET: Registered protocol family 2
[    0.560000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.560000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.560000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.570000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.580000] TCP reno registered
[    0.580000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.590000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.590000] NET: Registered protocol family 1
[    0.600000] PCI: CLS 0 bytes, default 32
[    0.620000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.620000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.630000] msgmni has been set to 57
[    0.630000] io scheduler noop registered
[    0.640000] io scheduler deadline registered (default)
[    0.640000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.650000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) is a AR933X UART
[    0.650000] console [ttyATH0] enabled, bootconsole disabled
[    0.670000] m25p80 spi0.0: found w25q32, expected m25p80
[    0.670000] m25p80 spi0.0: w25q32 (4096 Kbytes)
[    0.680000] 5 tp-link partitions found on MTD device spi0.0
[    0.680000] Creating 5 MTD partitions on "spi0.0":
[    0.690000] 0x000000000000-0x000000020000 : "u-boot"
[    0.690000] 0x000000020000-0x0000000fd9d0 : "kernel"
[    0.700000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.710000] 0x0000000fd9d0-0x0000003f0000 : "rootfs"
[    0.710000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.730000] mtd: partition "rootfs" set to be root filesystem
[    0.730000] mtd: partition "rootfs_data" created automatically, ofs=2D0000, len=120000 
[    0.740000] 0x0000002d0000-0x0000003f0000 : "rootfs_data"
[    0.750000] 0x0000003f0000-0x000000400000 : "art"
[    0.750000] 0x000000020000-0x0000003f0000 : "firmware"
[    0.780000] ag71xx_mdio: probed
[    0.780000] eth0: Atheros AG71xx at 0xba000000, irq 5
[    1.330000] eth0: Found an AR7240/AR9330 built-in switch
[    2.370000] eth1: Atheros AG71xx at 0xb9000000, irq 4
[    2.920000] ag71xx ag71xx.0: eth1: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[    2.930000] TCP cubic registered
[    2.930000] NET: Registered protocol family 17
[    2.940000] 8021q: 802.1Q VLAN Support v1.8
[    2.940000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    2.950000] Freeing unused kernel memory: 204k freed
[    5.860000] Registered led device: tp-link:green:lan1
[    5.860000] Registered led device: tp-link:green:lan2
[    5.860000] Registered led device: tp-link:green:lan3
[    5.860000] Registered led device: tp-link:green:lan4
[    5.860000] Registered led device: tp-link:green:qss
[    5.860000] Registered led device: tp-link:green:system
[    5.860000] Registered led device: tp-link:green:wan
[    5.860000] Registered led device: tp-link:green:wlan
[    6.930000] eth0: link up (1000Mbps/Full duplex)
[    9.160000] JFFS2 notice: (417) jffs2_build_xattr_subsystem: complete building xattr subsystem, 20 of xdatum (1 unchecked, 19 orphan) and 29 of xref (0 dead, 20 orphan) found.
[    9.270000] eth0: link down
[   11.060000] Compat-wireless backport release: compat-wireless-2012-07-13
[   11.060000] Backport based on wireless-testing.git master-2012-07-16
[   11.070000] compat.git: wireless-testing.git
[   11.240000] cfg80211: Calling CRDA to update world regulatory domain
[   11.240000] cfg80211: World regulatory domain updated:
[   11.250000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   11.250000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.260000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   11.270000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   11.280000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.280000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.450000] SCSI subsystem initialized
[   11.630000] usbcore: registered new interface driver usbfs
[   11.640000] usbcore: registered new interface driver hub
[   11.650000] usbcore: registered new device driver usb
[   12.230000] ath: EEPROM regdomain: 0x0
[   12.230000] ath: EEPROM indicates default country code should be used
[   12.230000] ath: doing EEPROM country->regdmn map search
[   12.230000] ath: country maps to regdmn code: 0x3a
[   12.230000] ath: Country alpha2 being used: US
[   12.230000] ath: Regpair used: 0x3a
[   12.240000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   12.240000] Registered led device: ath9k-phy0
[   12.240000] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
[   12.240000] cfg80211: Calling CRDA for country: US
[   12.250000] cfg80211: Regulatory domain changed to country: US
[   12.250000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   12.260000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   12.270000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[   12.280000] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.280000] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.290000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.300000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[   12.360000] PPP generic driver version 2.4.2
[   12.510000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.720000] NET: Registered protocol family 24
[   12.760000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   12.760000] ehci-platform ehci-platform: Generic Platform EHCI Controller
[   12.770000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[   12.810000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[   12.830000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[   12.830000] hub 1-0:1.0: USB hub found
[   12.830000] hub 1-0:1.0: 1 port detected
[   12.860000] nf_conntrack version 0.5.0 (460 buckets, 1840 max)
[   13.210000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   13.360000] Initializing USB Mass Storage driver...
[   13.360000] usbcore: registered new interface driver usb-storage
[   13.370000] USB Mass Storage support registered.
[   17.730000] device eth0 entered promiscuous mode
[   18.830000] eth0: link up (1000Mbps/Full duplex)
[   18.830000] br-lan: port 1(eth0) entered forwarding state
[   18.830000] br-lan: port 1(eth0) entered forwarding state
[   20.830000] br-lan: port 1(eth0) entered forwarding state
root@OpenWrt:~#

lsmod

root@OpenWrt:~# lsmod
Module                  Size  Used by    Tainted: G  
usb_storage            32976  0 
ath79_wdt               2240  1 
ohci_hcd               16160  0 
ledtrig_usbdev          2032  0 
ledtrig_netdev          3184  0 
nf_nat_irc               784  0 
nf_conntrack_irc        2464  1 nf_nat_irc
nf_nat_ftp               976  0 
nf_conntrack_ftp        4416  1 nf_nat_ftp
ipt_MASQUERADE           976  1 
iptable_nat             2112  1 
nf_nat                  9792  4 nf_nat_irc,nf_nat_ftp,ipt_MASQUERADE,iptable_nat
pppoe                   7488  0 
xt_conntrack            2048  3 
xt_CT                   1216  0 
xt_NOTRACK               448  0 
iptable_raw              560  1 
xt_state                 608  0 
nf_conntrack_ipv4       3872  6 iptable_nat,nf_nat
nf_defrag_ipv4           624  1 nf_conntrack_ipv4
nf_conntrack           36944 12 nf_nat_irc,nf_conntrack_irc,nf_nat_ftp,nf_conntrack_ftp,ipt_MASQUERADE,iptable_nat,nf_nat,xt_conntrack,xt_CT,xt_NOTRACK,xt_state,nf_conntrack_ipv4
ehci_hcd               32928  0 
sd_mod                 22240  0 
pppox                   1152  1 pppoe
ipt_REJECT              1808  2 
xt_TCPMSS               1824  0 
ipt_LOG                 6048  0 
xt_comment               400  0 
xt_multiport            1104  0 
xt_mac                   528  0 
xt_limit                 944  1 
iptable_mangle           832  1 
iptable_filter           592  1 
ip_tables               8864  4 iptable_nat,iptable_raw,iptable_mangle,iptable_filter
xt_tcpudp               1632  3 
x_tables                9984 18 ipt_MASQUERADE,iptable_nat,xt_conntrack,xt_CT,xt_NOTRACK,iptable_raw,xt_state,ipt_REJECT,xt_TCPMSS,ipt_LOG,xt_comment,xt_multiport,xt_mac,xt_limit,iptable_mangle,iptable_filter,ip_tables,xt_tcpudp
ppp_async               5952  0 
ppp_generic            18848  3 pppoe,pppox,ppp_async
slhc                    4368  1 ppp_generic
ath9k                  84688  0 
ath9k_common            1152  1 ath9k
ath9k_hw              316016  2 ath9k,ath9k_common
ath                    14336  3 ath9k,ath9k_common,ath9k_hw
mac80211              250048  1 ath9k
usbcore                99072  5 usb_storage,ohci_hcd,ledtrig_usbdev,ehci_hcd
usb_common               480  1 usbcore
scsi_mod               69760  2 usb_storage,sd_mod
nls_base                4640  1 usbcore
crc_ccitt                944  1 ppp_async
cfg80211              151104  3 ath9k,ath,mac80211
compat                  3376  5 ath9k,ath9k_common,ath9k_hw,mac80211,cfg80211
arc4                     768  2 
aes_generic            29808  0 
crypto_algapi           9200  2 arc4,aes_generic
ledtrig_timer           1072  0 
ledtrig_default_on       416  0 
leds_gpio               1552  0 
gpio_button_hotplug     3184  0 
root@OpenWrt:~#

logread says this when i connect a usb stick

Aug  4 18:37:58 OpenWrt kern.err kernel: [  489.350000] hub 1-0:1.0: unable to enumerate USB device on port 1

I have not forced the 703 firmware at all.

In all of this i did apply the patch changes posted by DarkSky so that the usb was active. That did work.
As for 5V i used the standard schematics including 2 cap's and a 7805 regulator. Got a stable 5V feed for the usb.
Also got the 15KOhms resistors on D+ and D- to GRND.

How can the enumerate problem be fixed ? must i have the 22Ohms resistors on the D+/- datalines?

UPDATE:
Adding images.
http://img341.imageshack.us/img341/2931/p1010006bk.th.jpg Overview of the board and current testsetup.

http://img839.imageshack.us/img839/257/p1010005xw.th.jpg My 5V setup and Usb port.
5V uses 1000uF 25V, 7805 regulator and 100uF 16V. Usb port has 2x 15KOmhs resistors on it.

(Last edited by CraXyOW3 on 6 Aug 2012, 12:49)

My first working attempt didn't had any pull-up or series resistors. Later I added the 15K resistors, but nothing different happened.
Are you sure that you're using the right cpu pins?
And flashing the 703n firmware isn't any risky. The same hardware, just few less ethernet ports.
Try the 703n firmware first, if it works, then flash the 740n's firmware and try to make it work by installign whatever is needed, I don't know what is needed...

CraXyOW3, I see you're using a classic linear regulator, surely a 7805 or equivalent.
Make sure it gets 5V at its output, also the input needs to be at least 7.5V for making the regulator work ok.

(Last edited by dabyd64 on 8 Aug 2012, 00:53)

Im gonna try with the 703 firmware, any howto somewhere where to force the firmware to it?

Double checked and triple checked the cpu pins tongue basic paranoia, 4th visible and the one after the 4:th pin wich is not visible. all correctly mounted as in your example.

classic linear regulator, that's the name, english aint my native so i seem to loose words/meanings sometimes tongue, got 8.4 volts input, mounted as yours too tongue, stable 5.1 volt output.

Will update later.

do it by telnet or ssh.
download the 703 version to /tmp, then run sysupgrade with the -f flag and will force it
good luck!

Now this is wierd.
when i do "sysupgrade --help" i get.

root@OpenWrt:~# sysupgrade --help
Usage: /sbin/sysupgrade [options] <image file or URL>

Options:
    -d <delay>   add a delay before rebooting
    -f <config>  restore configuration from .tar.gz (file or url)
    -i           interactive mode
    -c           attempt to preserve all changed files in /etc/
    -b / --create-backup <file>
                 create .tar.gz of files specified in sysupgrade.conf
                 then exit. Does not flash an image. If file is '-',
                 i.e. stdout, verbosity is set to 0 (i.e. quiet).
    -n           do not save configuration over reflash
    -F / --force
                 Flash image even if image checks fail, this is dangerous!
    -q           less verbose
    -v           more verbose
    -h / --help  display this help

Then when i do "sysupgrade /tmp/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin --force" i get.

root@OpenWrt:~# sysupgrade /tmp/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin --force
cat: unrecognized option `--force'
BusyBox v1.19.4 (2012-08-04 13:42:28 CEST) multi-call binary.

Usage: cat [FILE]...

Concatenate FILEs and print them to stdout

cat: unrecognized option `--force'
BusyBox v1.19.4 (2012-08-04 13:42:28 CEST) multi-call binary.

Usage: cat [FILE]...

Concatenate FILEs and print them to stdout

cat: unrecognized option `--force'
BusyBox v1.19.4 (2012-08-04 13:42:28 CEST) multi-call binary.

Usage: cat [FILE]...

Concatenate FILEs and print them to stdout

cat: unrecognized option `--force'
BusyBox v1.19.4 (2012-08-04 13:42:28 CEST) multi-call binary.

Usage: cat [FILE]...

Concatenate FILEs and print them to stdout

Image check 'platform_check_image' failed.

And with "sysupgrade -F /tmp/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin" i just get the regular help text.

Am i just dumb? O_o

All flag options must appear before the final image name.
sysupgrade --force /tmp/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin

When i do just like that, i only get the "help" screen and no other reports.

It is just like that the command itselves, sysupgrade shows that there is a -F / --force parameter to be passed but it just wont aknowledge it.

Awesome, works perfectly with the change made.

I got wr703 firmware installed, still got the unable to enumerate error message. Gonna do some physical error checking once again.

Will update progress in the coming days.

Ty for guidance sofar!

I've done this mod on my wr-741nd v4 and have similar problems like CraXyOW3, but my usb sound works, thats wierd.


[   93.760000] usb 1-1: new full-speed USB device number 2 using ehci-platform               ----> usb sound
[  102.390000] usb 1-1: USB disconnect, device number 2
[  113.280000] hub 1-0:1.0: unable to enumerate USB device on port 1                             ---->usb flash drive

Tried 2 different usb flash drives and usb-hdd.

Any idea?

(Last edited by fr4nk on 20 Aug 2012, 09:57)