OpenWrt Forum Archive

Topic: looking for help with ramips edimax 6200nl (Guenti?)

The content of this topic has been archived on 5 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, I'm struggling with my old 6200nl, no image I compile from trunk works, even when I use barrier breaker build root. Whatever I flash, router does not boot. I don't have serial cable to see what's going on, but I guess it will be some kernel panic, because it is dead very soon after power up (no sign of led activity, power and eth are on, but not a single blink), only Tftp recovery works when turn on and hold reset.

With hnyman's help I was able to build old pre-AA image. It looks like the router tries to boot at least (leds are blinking, but I cannot telnet/ssh too), maybe because 6200nl was not supported yet at that time:
https://forum.openwrt.org/viewtopic.php?id=67113

Problems are probably because of this swtich bug:
https://dev.openwrt.org/ticket/12125

There have been an edimax guru called Guenti, which made some patch to fix switch issue and even compiled images:
https://forum.openwrt.org/viewtopic.php … 40#p205640

However all links to guenti's dropbox are dead, which is no wonder, beacuse the thread is serveral years old ;-) I don't know, if that dude is still around.

I need this router as a dumb bridge from usb to ethernet, because I want to use it with lte modem (alcatel l850v) in rndis mode. I need specifically kmod-usb-cdc-ether, kmod-usb-net-rndis and usb-modeswitch, with these 3 checked I have compiled firmware for my old 842nd v1, plug the lte stick and it works like a charm. But I need to put the router on the top of the roof for better signal and wr842nd does not fit into a pet bottle. This is where I could perfectly use that old edimax router. I should have thrown that crap away long time ago, but I still have it and I know it could be done, only I don't know how right now, it does not have to be electro waste (yet) ;-) Without luci the barrier breaker openwrt works fine even on 16MB only.

I managed to found some old images which I built myself and they work, but how I made them I don't recall and kernel modules are specific to the exact build, so I'm unable to install the required kernel modules (and the ton of dependencies), not even manually.

Whatever I compile now just bricks the router. I'm clueless, but relentless :-) Thank you for help.

It's quite obvious to me what is wrong. It's the switch/network config.

Initial support for the 6200nl was added with c1710901c5cd47717e972798bbc6108f5be55652. Having a look at the changes to the file target/linux/ramips/base-files/etc/uci-defaults/02_network, the default lan interface was set to eth0.1.

With 5b4abf87d70f817e7796f75d9241d00f9c6fbbf0 the lan interface was definitely accidentally changed to eth0.2. The mlw221 network config was added _within_ the existing block.

Long story short, would you please try the following patch and report back whether your issue is fixed.

(Last edited by mkresin on 9 Sep 2016, 12:07)

Hi and thank you. I cannot use the patch (1. the file 02_network is in another directory (I'm on barrier breaker build root and found it in /target/linux/ramips/base-files/etc/uci-defaults), 2. line numbers do not match, 3. I cannot recall how to make a patch smile), BUT I figured that I need to replace eth0.2 for eth0.1, which is what I can do in a vi editor. I found only one occurence 6200nl with eth0.1 on line 55, but on line +-194 there's nothing like in your patch. Now compiling again. On AA there no 02_network file.

Should I make clean/dirclean/distclean or compiler will notice the change in the 02_network file and compile with the change? Thank you.

For CC and DD the patch path looks correct, but I doubt CC or DD can run on 16MB ram.

(Last edited by nozombian on 8 Sep 2016, 14:50)

Well, than switch back to trunk. Patching an outdated BB doesn't make any sense to me. The patch goes to trunk anyway to be part of the next release. Otherwise you're potentially reporting bugs which are already fixed.

To apply the patch please use:

patch -p1 < /path/to/patch

Use git to confirm that the changes are applied:

git diff

A make clean should be enough.

(Last edited by mkresin on 8 Sep 2016, 14:50)

Ok, thank you, I will patch the current trunk. But I'm quite sure it will fail to boot because of insufficient ram now, even if your patch could have worked wink Compilation of fresh trunk will take some hours, so I will let you know tomorrow.

(Last edited by nozombian on 8 Sep 2016, 15:08)

It fails to patch for some reasons sad

[me@linux openwrt]$ patch -p1 < 3g-6200nl_fix_network.patch
patching file target/linux/ramips/base-files/etc/board.d/02_network
Hunk #1 succeeded at 58 (offset -1 lines).
Hunk #2 FAILED at 192.
1 out of 2 hunks FAILED -- saving rejects to file target/linux/ramips/base-files/etc/board.d/02_network.rej

I got patch from zip (not copy/paste from web), so it should be ok. I have also downloaded fresh trunk from git, updated and installed scripts feeds -a

This is what my (fresh?) 02_network looks like: http://hastebin.com/quwojarufe.1c

I could probably still patch using vi, but I will rather wait for your post wink

(Last edited by nozombian on 8 Sep 2016, 15:21)

nozombian wrote:

Ok, thank you, I will patch the current trunk. But I'm quite sure it will fail to boot because of insufficient ram now, even if your patch could have worked wink Compilation of fresh trunk will take some hours, so I will let you know tomorrow.

Good point. I wasn't aware about the amount of ram the device has. There is no article for the device in the wiki.

nozombian wrote:

Ok, thank you, I will patch the current trunk. But I'm quite sure it will fail to boot because of insufficient ram now, even if your patch could have worked wink Compilation of fresh trunk will take some hours, so I will let you know tomorrow.

The patch is based on the latest lede code. Please use https://git.lede-project.org/source.git.

mkresin wrote:

The patch is based on the latest lede code. Please use https://git.lede-project.org/source.git.

I see. So there is even trunkier version of the trunk? smile I'm following wiki, which says

git clone https://github.com/openwrt/openwrt.git

But later I can try with lede too. The hunk which is patching my device works, so I will try with openwrt git first, compilation is in progress and I don't want to break it.

Hi, I have tried to compile barrier breaker and also trunk (after aplying your patch) and it still behaves the same, I flash the router, it restarts and power + eth leds are on, but router is dead. I don't know what's up with openwrt on this device now, my builds for tp links are fine. Shame that I cannot find my old nokia cable to see what's going on, so I have ordered another one from china (I could not believe it costs $0.60 incl. shipping), but it will take month to arrive.

I have no idea what could have changed or what am I doing wrong now, but I have found some bin built quite recently (in april 2016), it was compiled without patch and yet it boots fine. It's barrier breaker, I remeber I played with triggerhappy and I have surely not patched anything.

Could I screw something by unselecting packages in make menuconfig? I usually unselect ipv6 support and ppp, but tried once with default settings, just made menuconfig, exit, save changes, let it build, flash and bricked router as always sad

Yeah, having the serial output would make this way easier. But I've a few ideas how we can proceed even without having access to serial console.

I still suspect that something is wrong with the switch/ethernet config. We can patch the source code to enable the wireless by default and you might be able to login via wireless into the router. This way it would be possible to check what is wrong with the switch/ethernet.

Somewhere at the end of the file package/kernel/mac80211/files/lib/wifi/mac80211.sh you will find the template that is used to create the default wifi config. Please remove the line "option disabled 1" to enable wifi by default. Compile a new image and install.

It's great that you have a working BB revision. We can use this revision as starting point to find the commit that breaks the network. Would you please install your working BB image into the router and report the exact revision that is used. It should be shown on telnet/ssh login.

(Last edited by mkresin on 9 Sep 2016, 15:05)

Thank you very much for your help and interest in this problem. I have obtained lede trunk, scripfeeded 'n' upgraded, patched (both hunks of your patch now worked perfectly), compiled and guess what, the same result sad I left even ipv6 enabled, but removed ppd.

Your idea is great, but the way I see it, there is probably something else than the switch breaking things. When openwrt boots on this device, power led should blink, but this is not happening, I guess the router bricks once it leaves uboot, maybe kernel panic, but without serial it's a pure guess. I can turn the wifi on before compilation, recompile and reboot, but I don't think it is the switch alone. Yes, it could be the switch, but maybe in combination with something else.

Openwrt has to be flashed via mtd from telnet and sysupgrade image is used even when flashing from factory. The factory.bin is generated by make too, but I never used one, it has probably some header, but it cannot be flashed directly from web interface.

The working old bin image I have is this:

 === IMPORTANT ============================
  Use 'passwd' to set your login password
  this will disable telnet and enable SSH
 ------------------------------------------


BusyBox v1.22.1 (2016-04-24 16:21:17 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (Barrier Breaker, r48549)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------

root@OpenWrt:/# cat /proc/cpuinfo
system type             : Ralink RT3350 id:1 rev:2
machine                 : Edimax 3g-6200n
processor               : 0
cpu model               : MIPS 24KEc V4.12
BogoMIPS                : 212.58
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp
shadow register sets    : 1
kscratch registers      : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

There's written 6200n, but it's really old 6200nl image running on 6200nl. I will send you email.

(Last edited by nozombian on 9 Sep 2016, 14:47)

I managed to get the device working, BUT...

before compiling:
1. vi target/linux/ramips/base-files/etc/uci-defaults/03_wireless and enable wifi for 3g6200nl too
2. enable zram in make menuconfig (device has only 16MB ram)

Then compile, flash, connect to device's OpenWrt wifi, ssh to 192.168.1.1 and edit /etc/config/network like this:

root@OpenWrt:/etc/config# cat network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd8c:efe3:f7c4::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0' # <---- this is wrongly 'eth0.2' by default, which causes not working ethernet
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device 'lan_dev'
        option name 'eth0' # < -- surprisingly this works either with eth0.2, or the eth0, this is for nothing?
        option macaddr '80:1f:02:xx:xx:xx' # < -- mac replaced with xx due paranoid reasons  ;-)

What do I have to edit, so the option ifname will default to 'eth0' after compilation instead of eth0.2, so I can access the device over lan port?

Based on the kind help of @mkresin I tried to patch 02_network and change eth0.2 to eth0 for this device:

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 6157d87..74b86fb 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -57,11 +57,14 @@ ramips_setup_interfaces()
                ucidef_add_switch_attr "switch0" "enable" "false"
                ucidef_set_interface_lan "eth0"
                ;;
-       3g-6200nl|\
+#      3g-6200nl|\
        mlw221|\
        mr-102n)
                ucidef_set_interface_lan "eth0.2"
                ;;
+       3g-6200nl)
+               ucidef_set_interface_lan "eth0"
+               ;;
        3g-6200n|\
        ai-br100|\
        db-wrt01|\

But this does not have any effect. Obviously I'm changing wrong file, wrong place or just doing it wrongly, because I have actually no idea what I'm doing :-)

If trunk could be updated, the device would be supported (again). Now default openwrt build just bricks the device (wifi is disabled, ethernet is not working).The step 2 should be submitting the solution to the trunk, which is absolutely off my limits, so I will please someone competent to do this then ;-)

Btw. I have compiled without firewall support, to avoid some wan/lan conflict, because eth0.2 is strange number for the single lan port this device has.

Thank you for help.

(Last edited by nozombian on 23 Sep 2016, 15:03)

The discussion might have continued from here.