OpenWrt Forum Archive

Topic: TP Link WR1043ND 11n gigabit router

The content of this topic has been archived between 20 Jul 2013 and 7 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Can't confirm if upgrading through the web interface will work, but upgrading from ddwrt to openwrt works if you use the mtd command. Make sure you use the factory image if you want to go from ddwrt to openwrt.

May want to look at the wiki here:
http://wiki.openwrt.org/toh/tp-link/tl-wr1043nd

Well, slight success on my investigation. First off, I found a few more GPIOs: the onboard serial console (P1) can be used as GPIOs, but I think it might be a good idea to disable the driver for serial port in that case (either while compiling firmware image or maybe anywhere in sysfs). So the new GPIO table looks someway like this:

     |               |          |   Output Value      |   Input Value
GPIO |Common Name    |PCB Name  |  +3,3 V  |  0 V     | Open     |Pulled-GND|Pulled-Vcc
=======================================================================================
   0 |               |          |          |          |          |          |
   1 | USB           | D18      |        0 |        1 |        1 |        1 |        1
   2 | SYS           | D19      |        0 |        1 |        1 |        1 |        1
   3 | RESET         | SW6      |        1 |        0 |        1 |        0 |        1
   4 |               |          |          |          |          |          |
   5 | QSS           | D31      |        1 |        0 |        0 |        0 |        1
   6 |               |          |          |          |          |          |
   7 | QSS-Button    | SW8      |        1 |        0 |        1 |        0 |        1
   8 | Setting data direction to output and value to 0 causes hard reset of the SoC
   9 | WLAN          | D11      |        0 |        1 |        1 |        1 |        1
  10 |   P1-Tx       |          | override by tty-mod |        1 |        0 |        1
  11 |               |          |          |          |          |          |
  12 |               |          |          |          |          |          |
  13 |  P1-Rx        |          |        1 |        0 |        0 |        0 |        1
  14 |               |          |          |          |          |          |
  15 |               |          |          |          |          |          |
  16 |               |          |          |          |          |          |
  17 |               |          |          |          |          |          |
  18 | Data line of the RTL8366RB
  19 | Clock line of the RTL8366RB
  20 |               | GPIO20   |        1 |        0 |        1 |        0 |        1
  21 |               |          |          |          |          |          |

Someway confusing circuit-logic is used for some LEDs, since they do light up if the GPIO-value is set to 0. In input mode I was just unable to change their value to something different than 1. I tried to pull down to GND by temporarily connecting a 2,2k resistor - or if that failed, I connected straight with some wire. I also did some test with a pull up resistor of 2,2k to Vcc of P1.
Tests of GPIO10 in output mode always led to +3,3V, no matter which value was set. I guess that is caused by the serial console driver, which was still in charge. I just don't want to waste some time to disable it for one single test.
Now, there is even some progress on my main topic: I²C. I finally managed to get the module i2c-gpio-custom built, installed and loaded. The part of my OpenWRT-config file, which made it possible looks like that:

#
# I2C support
#
CONFIG_PACKAGE_kmod-i2c-core=y
CONFIG_PACKAGE_kmod-i2c-algo-bit=y
# CONFIG_PACKAGE_kmod-i2c-algo-pca is not set
# CONFIG_PACKAGE_kmod-i2c-algo-pcf is not set
CONFIG_PACKAGE_kmod-i2c-gpio=y
CONFIG_PACKAGE_kmod-i2c-gpio-custom=y

Besides that, I checked in the kernel-config, that the support for I²C character device was selected. In the kernel config file the appropriate line should look like that:

CONFIG_I2C_CHARDEV=m

Alternatively, this option can be set to y. This module will create files like /dev/i2c-0, which are very convenient if using the i2c-tools. So far, some success. Now I hooked up a test pcb to USB- (SDA) and QSS-LED (SCL), successfully loaded the i2c-module with

insmod i2c-gpio-custom bus0=0,1,5

dmesg shows that it has started the i2c-bus, the character device is created in /dev and i2cdetect works - but doesn't detect my PCA9555. Either that weird circuit logic is confusing the I²C-bus, or I did not properly solder the PCA9555 (I hate SMD soldering). I need to investigate more on that, maybe I will use QSS-Button and Reset-Button instead (though I would not have a fancy LED indicating bus access).

Finally there is another investigation. SW7 seems to be a hard reset connector. At least whenever I pulled it to GND, the device entered straight into the boot loader.

(Last edited by MBS on 31 Jul 2010, 01:26)

Hi Guys!

finally I successfully brick my 1043 (running OpenWRT) and tryin' now with a 2nd one to unbrick it - without any success. I installed Backfire (10.03, r20728) before and installed a package, I think it was kmod-usb-serial-sierra or so.

Installation:
Brocken router soldered on an running 1043 with openwrt and minicom (GND straight, RX-TX crossed). A ethernet cable is already connected to the network, my laptop - even if that might not matters in the current problem. I took a 1043 because I don't have a TTL adapter right now.

Communication seems to be fine (115200 8N1, no flow control):

U-Boot 1.1.4 (Sep 15 2009 - 09:41:38)

AP83 (ar9100) U-boot 0.0.11
DRAM:
sri
32 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
: cfg1 0xf cfg2 0x7114
zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
/ash: input:: ntpi/bin/ash: /bin/ash:: Permissi found

@OpenWrt:/# /b# /bin/aermissio/bin/ash: @OpenWrt:/sh:OpenWrt:/#: not found
@OpenWrt:/# /bin/ash: @OpenWrt:/#: not fpenWrt:/l-wr1043nd:green/bin/ash: @O#d
@OpenWrt:/# @t: not found
@OPress the [f] key and hit [enter] to enter failsafe mode
/bin/ash: @OpenWrtrt:/# t:/# t:/# /bin/ash: @OpenWr/bin/ash:: not found
@OpenWrt:/#

UBoot doesn't ask me to abort autoboot, booting openwrt results in an error most of the times. Sometimes it seems that the system is booting up like it should, but it doesn't accept any connections nor inputs from console.




BTW: I already checked soldering and cables,... the serial port seems to crash - minicom hangs, after killing & restart the terminal stays empty,...


bests,
joky

@joky: First off: cool idea. Now what I would think is, your router normally outputs kernel messages on that serial port. That even continues some time after your device is accessible over ssh/telnet. So it might help to wait a certain time (2-5 minutes should do it) before trying to use minicom. Executing

dmesg | tail

should show you, if something was put out.
Another option might be to find out how to disable the binding of stderr(?) to /dev/tty0. This might be done in sysfs (one of the files you will find in /sys/), but I don't know that for sure, just a guess. Maybe google might help on that :-)

Have resurrected my router with this cable. Currently I enjoy DD-WRT stuff but I'd like to do some mesh networking too. But I'd like to use dual radio routers because I don't want to connect clients in ad-hoc mode. Buying more of these cheap routers won't be an error anyway.

Hello, I've bricked the WR1043ND router after..... a week after receiving it. Advice to all, if you want to update your router using the web interface, backup your settings, reset your router using the failsafe mode. I managed to brick the router after installing the x-wrt webif^2, and then using x-wrt's webif^2 to update the router. I'm trying to access the serial console.

http://wiki.openwrt.org/oldwiki/openwrt … al_console

Since I prefer NOT to open the hardware itself to plug in the serial port, anyone has any idea how to do it through the USB this router has? The wiki link in the page above indicates that it is possible. Pictures are worth a thousand words, too. I wonder if I need a PCI serial port on my computer too

I'm thinking of a USB (router) <-> Serial <-> Serial/USB(computer). I wonder if those serial chips work both ways...

I hope to get an answer soon, I need to get this done before next week.

EDIT: I have misunderstood the above article. I guess the only possible setup is Serial <-> Serial/USB(computer). Time to open the hardware...

What do you guys use for serial interface btw?

(Last edited by blindbox on 3 Aug 2010, 10:30)

blindbox wrote:

What do you guys use for serial interface btw?

I ordered mine at omnima.co.uk. But I guess it is not really convenient to buy one online. As you can find in some of the first posts in this thread, some people are using certain Nokia data cables (use your browser search box with the term "Nokia" page by page). Or, since your soldering iron is already hot, you can build a cable with max232 level shifter, since your router operates at 3,3 V.

Hi guys,

today my 5-pcs pack of MAX3232 boards arrived. After soldering one of them on my 1043 and connecting the device on a PC (not on a 1043) everything seems to be fine!

I see the boot message, had even full access to the OpenWRT console!

As the image seems to be broken, I configured the interface by hand, downloaded a image directly to /tmp and upgraded using mtd -r <image> firmware


Right now, everything seems to be fine!


Only issue I have is, that I'm not able to assign channel higher than 11! During boot, I see cfg80211 loading regulatory settings for austria, where channel #13 and 12 should be allowed,...


any ideas?


thanks in advance


cfg80211: Calling CRDA for country: AT                                          
cfg80211: Regulatory domain changed to country: AT                              
    (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)           
    (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)                    
    (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)                    
    (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)                    
    (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)
root@OpenWrt:/# iwconfig wlan0 channel 13                                       
Error for wireless request "Set Frequency" (8B04) :                             
    SET failed on device wlan0 ; Invalid argument.
root@OpenWrt:/# iwconfig wlan0 channel 11                                       
root@OpenWrt:/#

Success - finally. I got the I²C-Bus working. After I failed with the button-GPIOs (3 aka Reset and 7 aka QSS-Button), probably due to some resistor-capacitor circuits for debouncing, I tried as a last resort GPIO 5 (aka D31, D10 or the QSS-LED) at D10 as SDA and GPIO 20 as SCL. Both hooked up with 4k7 pull-up resistors.
My reasons for choosing those: I checked the GPIOs of the ADM5120, especially the ones I had already successfully running as I²C-bus. In output direction, they drove 3,3V (Vcc) when a 1 was written into /sys/class/gpio/gpioX/value and 0V (GND) when a 0 was written. When used as inputs, those GPIO-values showed 0 when it was pulled to GND and 1 when pulled to Vcc (remember to use decent resistors when pulling those signals high or low - unless you want to burn your chips). The most similar behavior could be found on the GPIOs for buttons, the QSS-LED and GPIO 20. Since the buttons seem to be equipped with RC-filters, they don't seem to work at the frequencies of I²C (about 100 kHz). So I chose GPIO 20 for SCL, because it is switching every cycle, and I could not find any filters connected to GPIO 20. GPIO 5 is just the last remaining one, so it got used for SDA. I'm not really willed to rip off parts of the pcb to make other GPIOs become usable.
Another interesting fact that I found out: if you unbind the serial8250 driver (using sysfs) and set GPIO 13 (aka P1-Rx) to output, you can reset your device by switching that GPIO from high (1) to low (0). This can also be achieved by entering something on a connected serial console. Quite weird.

MBS wrote:
blindbox wrote:

What do you guys use for serial interface btw?

I ordered mine at omnima.co.uk. But I guess it is not really convenient to buy one online. As you can find in some of the first posts in this thread, some people are using certain Nokia data cables (use your browser search box with the term "Nokia" page by page). Or, since your soldering iron is already hot, you can build a cable with max232 level shifter, since your router operates at 3,3 V.

This is EXACTLY the information that I need, 3.3v. I'm going to update the wiki. I heard Nokia CA-42 is what you guys are using? . I'm going to buy two, just in case. I find it strange that some of the solders on the WR1043ND (the Vcc and the gnd of the serial) is pretty hard to melt. I think I need a hotter soldering iron.

Just solder cables on the pads ... its much more secure and managable with a 50 watt solder iron though.

Memphis

@joky

as your radio is set to use 40MHz bandwidth (= 10Mhz more on each side) you are not allowed to go higher than channel 11 (two channels = 10MHz) without breaching the band limits. See here for details.

schufti

I did my soldering with a 20 W solder iron. Took about 2 seconds to thoroughly melt.

Ah well, I followed the wiki. They put headers, I put headers (I think it's a great idea too) and use a floppy connector, which you can get plenty on many shops (and spare power supplies). Anyway, I got everything soldered, by simply adding molten solder into the hole from the back to clog the hole through. I wanted to make the headers go through the hole though, but I guess it's too tough for me for now. As long as it works, a hackjob is fine. Don't fix anything that's not broken, people said. I need to remember that idiom by heart.

I broke a mod (the device still works) once because of bad soldering skills.
30 W iron here.

Currently on-hold for a serial cable.

(Last edited by blindbox on 4 Aug 2010, 09:45)

johndoe wrote:

I am using this router for controlling an RC car and forwarding sensor data to a processing server. I²C could come in real useful in the future. (And more GPIO is always good.)

Cool stuff. I also plan on doing something like this - one day. Maybe even controlling quadro-/octocopters by wifi or 3G. But I would need some more time for that fun stuff, which I unfortunately don't have right now. Are you posting your progress and experiences anywhere?

meta96 wrote:

luci-app-ddns > dyndns.org

i have luci-app-ddns (incl. ddns-script) running, i can put in all options, but it does nothing. Does it work for somebody? I use Backfire on then 1043. When i start it manually i get the message

# url=

... thats all

here it works like a charm, have the same two packages installed.

Config file 'ddns' is in /etc/config/

config 'service' 'myddns'
    option 'service_name' 'dyndns.org'
    option 'ip_source' 'network'
    option 'ip_network' 'wan'
    option 'force_interval' '72'
    option 'force_unit' 'hours'
    option 'domain' 'youraddress.dyndns.org'
    option 'username' 'youruser'
    option 'password' 'yourpass'
    option 'check_interval' '72'
    option 'check_unit' 'hours'
    option 'enabled' '1'

Megabug wrote:

Hi,

Does anyone have the wifi with 300Mbit running stable? I set it up with a config I found on google but its very unstable... even on HT20!


Thanks... wink

Hey Megabug,

when your neighborhood is crowded with wirelss-n networks it is kind of difficult to find a correct config which runs in 300mbit mode. Open-WRT seems to be very restrained in comparison with the stock firmware, every weak network on the same channel(s) stops Open-WRT of using the same channel(s).

Best is to trial and error with all channels with HT+ and HT- mode until you got 300 mbit...

There was also a console command which gives you a feedback that there is already a network on the same channel I used to find my combination. But I don't remeber that one right now.

EDIT:

I found the command in my post how to test it:

connect via ssh to your router and do:

root@Routerix:~# wifi down

then:

root@Routerix:~# wifi up

my open-wrt answered:
Configuration file: /var/run/hostapd-phy0.conf
20/40 MHz operation not permitted on channel pri=6 sec=10 based on overlapping BSSes
Using interface wlan0 with hwaddr <snip> and ssid '<snip>'

When you got this message, do again wifi down, edit the wireless config (change channel) and try again wifi up on ssh until you got it up in HT40 mode...

I got it up and running on channel 1/5 (this was curiously the most crowded channel)

---snip---

Also I got a question to all WLAN users with 10.03 backfire:

I get constant WLAN deauth's for 5-30 minutes, some days none at all, some days more then 10... On my Laptops the connections just get lost and I have to wait until WLAN is back up. Log says:

20:28:43 Routerix daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: deauthenticated due to local deauth request

There is nothing I can do to get it working again, just have to wait, sometimes I restart router because it annoys me.

Anyone got the same experiences? Any workaroung? Is it due to heavy power saving on client side maybe?

I am running r22497 and sometimes my router just reboots randomly (once or twice a day). Anyone know why? I had no issues with a Netgear 3500L or Linksys WRT54GL.

Bad Joker wrote:

Also I got a question to all WLAN users with 10.03 backfire:

I get constant WLAN deauth's for 5-30 minutes, some days none at all, some days more then 10... On my Laptops the connections just get lost and I have to wait until WLAN is back up. Log says:

20:28:43 Routerix daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: deauthenticated due to local deauth request

There is nothing I can do to get it working again, just have to wait, sometimes I restart router because it annoys me.

Anyone got the same experiences? Any workaroung? Is it due to heavy power saving on client side maybe?

Might be related to post #699, mentioned by hap.

Seeing some warnings in the system log.

Aug  4 23:19:11 OpenWrt user.warn kernel: ------------[ cut here ]------------
Aug  4 23:19:11 OpenWrt user.warn kernel: WARNING: at /home/hap/Desktop/OpenWrt/trunk/build_dir/linux-ar71xx_generic/compat-wireless-2010-07-29/drivers/net/wireless/ath/ath9k/xmit.c:127 0x81bc92d4()
Aug  4 23:19:11 OpenWrt user.warn kernel: Modules linked in: fuse usblp nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack
Aug  4 23:19:11 OpenWrt user.warn kernel: Call Trace:[<800682cc>] 0x800682cc
Aug  4 23:19:11 OpenWrt user.warn kernel: [<800682cc>] 0x800682cc
Aug  4 23:19:11 OpenWrt user.warn kernel: [<8007cb08>] 0x8007cb08
Aug  4 23:19:11 OpenWrt user.warn kernel: [<81bc92d4>] 0x81bc92d4
Aug  4 23:19:11 OpenWrt user.warn kernel: [<81bc92d4>] 0x81bc92d4
Aug  4 23:19:11 OpenWrt user.warn kernel: [<81bc3754>] 0x81bc3754
Aug  4 23:19:11 OpenWrt user.warn kernel: [<81bc387c>] 0x81bc387c
Aug  4 23:19:11 OpenWrt user.warn kernel: [<80c462ec>] 0x80c462ec
Aug  4 23:19:11 OpenWrt user.warn kernel: [<80068bc4>] 0x80068bc4
Aug  4 23:19:11 OpenWrt user.warn kernel: [<80092194>] 0x80092194
Aug  4 23:19:11 OpenWrt user.warn kernel: [<8008e1f8>] 0x8008e1f8
Aug  4 23:19:11 OpenWrt user.warn kernel: [<80091ce8>] 0x80091ce8
Aug  4 23:19:11 OpenWrt user.warn kernel: [<8006c84c>] 0x8006c84c
Aug  4 23:19:11 OpenWrt user.warn kernel: [<80091c6c>] 0x80091c6c
Aug  4 23:19:11 OpenWrt user.warn kernel: [<8006c83c>] 0x8006c83c
Aug  4 23:19:11 OpenWrt user.warn kernel: ---[ end trace fea0cc07234773ff ]---

(Last edited by hap on 5 Aug 2010, 10:02)

MBS wrote:
Bad Joker wrote:

Also I got a question to all WLAN users with 10.03 backfire:

I get constant WLAN deauth's for 5-30 minutes, some days none at all, some days more then 10... On my Laptops the connections just get lost and I have to wait until WLAN is back up. Log says:

20:28:43 Routerix daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: deauthenticated due to local deauth request

There is nothing I can do to get it working again, just have to wait, sometimes I restart router because it annoys me.

Anyone got the same experiences? Any workaroung? Is it due to heavy power saving on client side maybe?

Might be related to post #699, mentioned by hap.

Thanks, this issue then should be fixed since r22462 (maybe earlier).

But 10.03.1 is near, so I'll wait till the next stable release, my disconnects are not that often then other users reported.

And maybe I'll try dd-wrt, anyone tried this one? I guess it's okay, but uses way more resources then open-wrt I guess, which I can trim to a real slim and fast system. Anyone can report about bandwidth speed in comparison to open-wrt?

Bad Joker wrote:
MBS wrote:
Bad Joker wrote:

Also I got a question to all WLAN users with 10.03 backfire:

I get constant WLAN deauth's for 5-30 minutes, some days none at all, some days more then 10... On my Laptops the connections just get lost and I have to wait until WLAN is back up. Log says:

20:28:43 Routerix daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: deauthenticated due to local deauth request

There is nothing I can do to get it working again, just have to wait, sometimes I restart router because it annoys me.

Anyone got the same experiences? Any workaroung? Is it due to heavy power saving on client side maybe?

Might be related to post #699, mentioned by hap.

Thanks, this issue then should be fixed since r22462 (maybe earlier).

But 10.03.1 is near, so I'll wait till the next stable release, my disconnects are not that often then other users reported.

And maybe I'll try dd-wrt, anyone tried this one? I guess it's okay, but uses way more resources then open-wrt I guess, which I can trim to a real slim and fast system. Anyone can report about bandwidth speed in comparison to open-wrt?

If you compile trunk or backfire you should get the fixes. I had a lot of deauth problems but they don't show up in the logs anymore after the latest trunk. I tried dd-wrt briefly. On the status screen you can see how long your clients have been connected for, and I noticed that sometimes my iPad would have it's uptime counter reset after every minute. Sometimes it would be fine for 16+ hours.

Please give it a try and let us know how it goes. I only tested for a couple of 24 hour durations.

Bad Joker wrote:

And maybe I'll try dd-wrt, anyone tried this one? I guess it's okay, but uses way more resources then open-wrt I guess, which I can trim to a real slim and fast system. Anyone can report about bandwidth speed in comparison to open-wrt?

I bricked my router by flashing dd-wrt from openwrt. I flashed in a ssh-shell, like I did a few times before - so I guess it wasn't necessarily missing experience. Maybe it was just wrong one of the 2 available images for the 1043. But you did already the serial port mod, right :-)

MBS wrote:
Bad Joker wrote:

And maybe I'll try dd-wrt, anyone tried this one? I guess it's okay, but uses way more resources then open-wrt I guess, which I can trim to a real slim and fast system. Anyone can report about bandwidth speed in comparison to open-wrt?

I bricked my router by flashing dd-wrt from openwrt. I flashed in a ssh-shell, like I did a few times before - so I guess it wasn't necessarily missing experience. Maybe it was just wrong one of the 2 available images for the 1043. But you did already the serial port mod, right :-)

Just flash from openwrt back to stock firmware and then flash it to dd-wrt through the web interface. That's probably the easiest way with lower chance of bricking.

Rebooted randomly again today. Might have to pick up a different router.

Sorry, posts 726 to 725 are missing from our archive.