OpenWrt Forum Archive

Topic: dead after flashing wr703n

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

Hello,
I have manage to upload nebbia88's firmware in my WR703n v1.7 and the ethernet works fine. My problem is that when I try to install some packages ( such as kmod-video-core) it doesn't install them. Any ideas? are them packages somewhere else or are they not available yet?
Thanks

kmod packages are usually strictly checking svn revision, so if you have different version than is in orfficial repo, you will either have to compile them on your own and include them right in the image with [ * ] option (this is what I strongly recommend), or try to force opkg to install them anyway. I don't know which switch exactly does this, but you can try some --force: http://wiki.openwrt.org/doc/techref/opkg#options

The switch is "force-depends", but there is risk.

In general, there is quite strict kernel version & options check through a checksum. In practice, you can only install kmods compiled at the same compilation run as the kernel itself.

Only risk is that you eventually have to access failsafe and do a firstboot.. So try the failsafe procedure, and if all works as expected, give force-depends a go, since my image is same revision of rc1 in downloads.. Also maybe backup yout setting before trying wink

(Last edited by nebbia88 on 19 Feb 2013, 11:42)

I would like to say that seems to be a solution but seems quite risky and to be honest, with my Linux knowledge I don't think I will get too far and I really don't want to brick another one (until I'll do the serial connection, fingers crossed to that).
I suppose once the firmware for the v1.7 is official, someone that knows better what is doing than me will leave the packages in the repos. am I right?
Thanks for the advices anyway. It's just a shame that at least for now is not possible to do the same things you could do with the older versions

You cannot brick it installing packages! Failsafe will always work.. Just make sure that NOW it's working wink

I have a bricked WR703N (wish I read the warnings first!). I also have a brand new v1.7 box.

I've read through this whole thread 2 times now and I'm still unclear what I have to do.....

For the bricked box, I've order the serial TTL. When I get it, I see there is a patch from Nebbia, how exactly do I apply that patch? Do I edit a file using vi or do I TFTP a file or something? How do I apply patches?

For the new box, what is the process to flash with OpenWRT. I see Nebbia has a file on dropbox - openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin - is this version pre-patched and if so I assume this can safely use this for flashing a brand new WR703N with OpenWRT.

Apologies for the basic nature of this message, but I really need some help. Please help :-)

Uncle_Vernon wrote:

This patched file has recovered my bricked wr703n. The case is stamped V1.6 and the Ethernet sticker says

TL-WR703N
12B048

The other wr703n I bough of the same Chinese vendor (later order) loaded the snapshot without issue.

Thanks so much for the efforts to put the patched file together.

nebbia88 wrote:

I ask to the users with bricked 703 and a serial console to test this:

it's patched with this,

https://dev.openwrt.org/changeset/32093

from mr3020 (almost same board..)

Thanks to Squonk to point this out wink

https://www.dropbox.com/s/npiapitjpq4yg … th-fix.zip

WARNING: it has wifi enabled and unencrypted by default wink

Sorry for the spam.... One quick question, which hopefully has a very quick answer.

Assume I have a bricked WR703N. Also assume that I have a serial connection to the box. Is the fix simply to enable the ethernet interface over the serial connection? If this can be done, the problem is fixed right?

Or maybe I am trivialising something that is far deeper..... :-/

Please confirm.

johnson4d wrote:

Assume I have a bricked WR703N. Also assume that I have a serial connection to the box. Is the fix simply to enable the ethernet interface over the serial connection? If this can be done, the problem is fixed right?

Or maybe I am trivialising something that is far deeper..... :-/

Please confirm.

I confirm that you are trivialising the fix. ;-)

It may look rather similar (a console session on terminal), but a serial connection to the console avoids the whole TCP/IP & other internet protocols stack. During the early boot, the console session is typically to the boot manager (like u-boot), and then later the session is passed to the Linux kernel, if it still runs.

Having direct access to the boot manager helps you to recover even from situation, where the Linux kernel is badly damaged. But the boot manager has usually nothing to do with Openwrt (or Linux), so it depends from the specific boot manager, what commands are usable etc.

Thank you so much for the response.

Ha, I just found this out for myself - life is never so easy :-(

OK, I got the serial connection up. I want to apply a fix to the existing version of OpenWRT that is deployed on my bricked box. In essence, I really want a way to simply turn on the eth0. I must have read this whole post a dozen times, each time I seem to find something new (that I missed previously). I see there is a patch, but I don't know how to apply it.

Can you please help?

hnyman wrote:
johnson4d wrote:

Assume I have a bricked WR703N. Also assume that I have a serial connection to the box. Is the fix simply to enable the ethernet interface over the serial connection? If this can be done, the problem is fixed right?

Or maybe I am trivialising something that is far deeper..... :-/

Please confirm.

I confirm that you are trivialising the fix. ;-)

It may look rather similar (a console session on terminal), but a serial connection to the console avoids the whole TCP/IP & other internet protocols stack. During the early boot, the console session is typically to the boot manager (like u-boot), and then later the session is passed to the Linux kernel, if it still runs.

Having direct access to the boot manager helps you to recover even from situation, where the Linux kernel is badly damaged. But the boot manager has usually nothing to do with Openwrt (or Linux), so it depends from the specific boot manager, what commands are usable etc.

Thanks for the reply Nebbia, I was hoping you would reply :-)

Thats a shame. I already tried to flash with your patched AA and although the box is fully recovered, I cannot install certain packages (USB related packages for example). There is a dependancy issue. If I add --nodeps to the package install, it installs, but it doesn't work. I have been working with the AA RC1 here: http://downloads.openwrt.org/attitude_a … x/generic/

The software above is surely different to your patched AA RC1 (aside from the patch fix discussed in this post), I noticed that the banner is slightly different so maybe there are some subtle changes.....? If I install the software from the URL above, I can install the packages no problem and they run perfectly, which is why I want to simply fix the existing version I have instead of re-flashing to a new version.

I was hoping there is a way to fix the U-Boot without touching the kernel - for clarity you are saying this is not possible?
On a side note, has anyone tried downgrading the TP-Link software before trying to install the OpenWRT software? Or maybe, the U-Boot is seperate to the TP-Link code so it would make no difference.....

Thanks for any replies in advance, they are really helping me.

--force-depends or --nodeps???

From above; "If I add --nodeps to the package install, it installs, but it doesn't work." so that option doesn't work....

I also just tried --force-depends as follows: root@OpenWrt:/# opkg install kmod-usb-storage kmod-fs-ext4 block-mount --force-d
epends

Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-storage:
*      kernel (= 3.3.8-1-5440da3a2c45184a32da6bba25b8dd2a) *   kernel (= 3.3.8-1-5440da3a2c45184a32da6bba25b8dd2a) *
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-fs-ext4:
*      kernel (= 3.3.8-1-5440da3a2c45184a32da6bba25b8dd2a) *   kernel (= 3.3.8-1-5440da3a2c45184a32da6bba25b8dd2a) *


It  seems to think the kernel of your patched AA is different to the packages on the web for AA RC1 at http://downloads.openwrt.org/attitude_a … /packages/

Any ideas?

But when I try to install the packages on a clean AA RC1 install (hardware not affected by this bug), it installs perfectly and see's my USB. :-(

i confirm the bug, but have absolutely no idea of how to solve it...

after forcing the package is installed but there are lots of "unknown symbol" errors..


i thought that using the same svn revision would avoid the deps problems of kmod's sad

quick solution? use trunk.. but it's not always stable or safe to flash!

or built a fresh AA from svn, including all needed kmods...

OK, I am making good progress and learning lots :-)

I have created my own AA image, with the USB KMOD included and it works - good times. Now, I want to compile ALL the packages, so that they can be installed later via OPKG.

When I do make menuconfig, I can see under 'Global build settings' an option for 'Select all packages by default' - I have a * for this but no packages created :-(

I know there are 1000s of packages, but if I compile them at the time I create my AA image I shouldn't have any compatibility issues. Can someone explain how to create packages (nmap, etc) so that they can be installed later via OPKG?

Thanks

My TL-WR703N seems to have an even newer version of U-Boot, i bought it already bricked in China and then resurrected via serial port and the help of nebbia who sent me a dump of his 'art' partition.

root@OpenWrt:~# grep -a U-Boot /dev/mtd0ro | cut -d'I' -f1
U-Boot 1.1.4 (Dec  4 2012 - 11:19:44)                                           
root@OpenWrt:~#                                 

I'm really not an expert of openwrt, but i tried flashing different images and only the seems to work on my device is the one posted at #77. Other builds are giving me troubles with lan and wifi. But still with this version i can't see to install kmods due to kernel differences. Is the any working build around that will let me install applications?

What problems did you have with trunk snapshot?

I just installed
http://downloads.openwrt.org/snapshots/ … actory.bin

i'm unable to start wifi at the moment, lan seems to work ok..

root@OpenWrt:/etc/config# cat wireless                                          
config wifi-device  radio0                                                      
        option type     mac80211                                                
        option channel  11                                                      
        option hwmode   11ng                                                    
        option path     'platform/ar933x_wmac'                                  
        option htmode   HT20                                                    
        list ht_capab   SHORT-GI-20                                             
        list ht_capab   SHORT-GI-40                                             
        list ht_capab   RX-STBC1                                                
        list ht_capab   DSSS_CCK-40                                             
        # REMOVE THIS LINE TO ENABLE WIFI:                                      
        #option disabled 1                                                      
                                                                                
config wifi-iface                                                               
        option device   radio0                                                  
        option network  lan                                                     
        option mode     ap                                                      
        option ssid     OpenWrt                                                 
        option encryption none                                                  

root@OpenWrt:/etc/config# wifi on                                               
/sbin/wifi: eval: line 1: hostapd_set_log_options: not found                    
/sbin/wifi: eval: line 1: hostapd_set_bss_options: not found                    
/sbin/wifi: eval: line 1: hostapd: not found                                    
Failed to start hostapd for phy0                                                
root@OpenWrt:/etc/config#          

I was able to fix it with instructions at:

https://dev.openwrt.org/ticket/12818

with:

root@OpenWrt:/tmp# wget http://downloads.openwrt.org/attitude_adjustment/12.09-rc1/ar71xx/generic/packages/wpad-mini_20120910-1_ar71xx.ipk  

root@OpenWrt:/tmp# opkg install wpad-mini_20120910-1_ar71xx.ipk                 
Installing wpad-mini (20120910-1) to root...                                    
Configuring wpad-mini.                                                          
root@OpenWrt:/tmp#      
               

hi,
i am confused, do we use this patch:
https://www.dropbox.com/s/d15fca1nuky2r … -eth.patch
or this:
https://dev.openwrt.org/changeset/32093 … l-mr3020.c
or both??

the above 2 links are patches for 2 different files....??

thanks.

nebbia88 wrote:

i think he wanted something like this:

https://www.dropbox.com/s/d15fca1nuky2r … -eth.patch

Index: target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c
===================================================================
--- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c  (revision 34185)
+++ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c  (working copy)
@@ -12,6 +12,7 @@
 #include <linux/gpio.h>
  
 #include <asm/mach-ath79/ath79.h>
+#include <asm/mach-ath79/ar71xx_regs.h>
  
 #include "dev-eth.h"
 #include "dev-gpio-buttons.h"
@@ -62,6 +63,8 @@
    u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
    u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
  
+   ath79_setup_ar933x_phy4_switch(false, true);
+
    ath79_register_m25p80(&tl_wr703n_flash_data);
    ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr703n_leds_gpio),
                 tl_wr703n_leds_gpio);
@@ -77,6 +80,7 @@
  
    ath79_register_mdio(0, 0x0);
    ath79_register_eth(0);
+   ath79_eth0_data.phy_mask = BIT(0);
  
    ath79_register_wmac(ee, mac);
 }

xbaha, the first is for wr703n the second for mr3020

Thanks alot for the clarification,
i patched the source, but the thing is, there was an extra line in my code (just downloded last trunk)

//    ath79_setup_ar933x_phy4_switch(false, false);
    ath79_setup_ar933x_phy4_switch(false, true);

i just omitted the existing one, and added the patched one, just want to make sure my code below is ok?

Thanks.

robthebrew wrote:

xbaha, the first is for wr703n the second for mr3020




code wrote:

/*
*  TP-LINK TL-WR703N board support
*
*  Copyright (C) 2011 dongyuqi <729650915@qq.com>
*  Copyright (C) 2011-2012 Gabor Juhos <juhosg@openwrt.org>
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License version 2 as published
*  by the Free Software Foundation.
*/

#include <linux/gpio.h>

#include <asm/mach-ath79/ath79.h>
#include <asm/mach-ath79/ar71xx_regs.h>

#include "dev-eth.h"
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"
#include "dev-m25p80.h"
#include "dev-usb.h"
#include "dev-wmac.h"
#include "machtypes.h"

#define TL_WR703N_GPIO_LED_SYSTEM    27
#define TL_WR703N_GPIO_BTN_RESET    11

#define TL_WR703N_GPIO_USB_POWER    8

#define TL_WR703N_KEYS_POLL_INTERVAL    20    /* msecs */
#define TL_WR703N_KEYS_DEBOUNCE_INTERVAL    (3 * TL_WR703N_KEYS_POLL_INTERVAL)

static const char *tl_wr703n_part_probes[] = {
    "tp-link",
    NULL,
};

static struct flash_platform_data tl_wr703n_flash_data = {
    .part_probes    = tl_wr703n_part_probes,
};

static struct gpio_led tl_wr703n_leds_gpio[] __initdata = {
    {
        .name        = "tp-link:blue:system",
        .gpio        = TL_WR703N_GPIO_LED_SYSTEM,
        .active_low    = 1,
    },
};

static struct gpio_keys_button tl_wr703n_gpio_keys[] __initdata = {
    {
        .desc        = "reset",
        .type        = EV_KEY,
        .code        = KEY_RESTART,
        .debounce_interval = TL_WR703N_KEYS_DEBOUNCE_INTERVAL,
        .gpio        = TL_WR703N_GPIO_BTN_RESET,
        .active_low    = 0,
    }
};

static void __init tl_wr703n_setup(void)
{
    u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
    u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);

    /* disable PHY_SWAP and PHY_ADDR_SWAP bits */
//    ath79_setup_ar933x_phy4_switch(false, false);
    ath79_setup_ar933x_phy4_switch(false, true);

    ath79_register_m25p80(&tl_wr703n_flash_data);
    ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr703n_leds_gpio),
                 tl_wr703n_leds_gpio);
    ath79_register_gpio_keys_polled(-1, TL_WR703N_KEYS_POLL_INTERVAL,
                    ARRAY_SIZE(tl_wr703n_gpio_keys),
                    tl_wr703n_gpio_keys);

    gpio_request_one(TL_WR703N_GPIO_USB_POWER,
             GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
             "USB power");
    ath79_register_usb();

    ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);

    ath79_register_mdio(0, 0x0);
    ath79_register_eth(0);
    ath79_eth0_data.phy_mask = BIT(0);
   

    ath79_register_wmac(ee, mac);
}

MIPS_MACHINE(ATH79_MACH_TL_WR703N, "TL-WR703N", "TP-LINK TL-WR703N v1",
         tl_wr703n_setup);