Modify

Opened 3 years ago

Last modified 22 months ago

#14439 new defect

TD-W8970 full support

Reported by: anonymous Owned by: developers
Priority: high Milestone: Chaos Calmer 15.05
Component: kernel Version: Trunk
Keywords: W8970 tplink Cc:

Description

We have now working OpenWRT on this device, but trunk version still needs some work. I open the ticket for typical problems:

1) Add watchdog busybox applet. It is supported by kernel, and only a little change in config should fix the problem. I don't know if it is needed to enable it in ubusd / hotplug
2) The WiFi led is not working. It should be added to DTS, but I don't know the GPIO pin for it (and don't know how to find it, it is different than on AA)
3) WiFi switch (between RESET and WPS) is not working - no effect.
4)
[ 1.752000] net-xrx200: invalid MAC, using random
I suggest to set it to the constant string 00:11:22:33:44:55, and on the first preinit script you can set it with some shell scripting (ifconfig eth0 hw ether dd if=/dev/mtdblock3 bs=4096 count=1 | grep MACAddr | <some cut and sed work>)
It is not the most elegant way, but the simplest.
5) Solve compilation problems with gcc 4.8 (disable the mips16 flags in DEU, MEI, DSL drivers; and uClibc++ too)
6) Optionally you can remove testmgr from DEU, I don't think it is needed by ANY app.
7) problems with regulation.. max txpower is by default set to 5dBm. The quickfix is to do the reghack (and you have then 20dBm)..

Attachments (0)

Change History (22)

comment:1 in reply to: ↑ description Changed 3 years ago by ppvazquezfer@…

Replying to anonymous:

We have now working OpenWRT on this device, but trunk version still needs some work. I open the ticket for typical problems:

1) Add watchdog busybox applet. It is supported by kernel, and only a little change in config should fix the problem. I don't know if it is needed to enable it in ubusd / hotplug
2) The WiFi led is not working. It should be added to DTS, but I don't know the GPIO pin for it (and don't know how to find it, it is different than on AA)
3) WiFi switch (between RESET and WPS) is not working - no effect.
4)
[ 1.752000] net-xrx200: invalid MAC, using random
I suggest to set it to the constant string 00:11:22:33:44:55, and on the first preinit script you can set it with some shell scripting (ifconfig eth0 hw ether dd if=/dev/mtdblock3 bs=4096 count=1 | grep MACAddr | <some cut and sed work>)
It is not the most elegant way, but the simplest.
5) Solve compilation problems with gcc 4.8 (disable the mips16 flags in DEU, MEI, DSL drivers; and uClibc++ too)
6) Optionally you can remove testmgr from DEU, I don't think it is needed by ANY app.
7) problems with regulation.. max txpower is by default set to 5dBm. The quickfix is to do the reghack (and you have then 20dBm)..

If you can't find the gpios with openwrt maybe you can try to look for them in the TP-Link source code; it is not the fastest solution, but helped me with a BCM6368 based router.
For the mac address issue the best solution in this moment is to assign the right MAC with uci as described here: http://wiki.openwrt.org/doc/uci/network#options.valid.for.all.protocol.types
To disable mips16 in the lantiq drivers this is the right way: https://dev.openwrt.org/changeset/37771 The problems with GCC 4.8 and uClibc++ with mips16 require much more job.

comment:2 Changed 3 years ago by fld@…

Full support would probably also have to include the driver and user space tool for configuring the internal ethernet switch made by Infineon. Name of the driver is "ifx_ethsw" and the name of the tool is "switch_utility" (can be found on the OEM firmware under /sbin/)

These tools do no yet exist in the OpenWrt trunk but the code can be found here:
http://gpl.back2roots.org/source/fritzbox/7390_5.50/GPL-release_kernel/linux/arch/mips/include/asm/mach-infineon/switch_api/

http://gpl.back2roots.org/source/fritzbox/7390_5.50/GPL-release_kernel/linux/drivers/net/ifxmips_switch_api/

comment:3 Changed 3 years ago by anonymous

Problems for now:

1) Add watchdog busybox applet. It is supported by kernel, and only a little change in config should fix the problem I don't know if it is needed to enable it in ubusd / hotplug
2) The WiFi led is not working. It should be added to DTS, but I don't know the GPIO pin for it (and don't know how to find it, it is different than on AA)
7) problems with regulation.. max txpower is by default set to 5dBm. The quickfix is to do the reghack (and you have then 20dBm)..
8) problem with the atheros calibration data. Trying to load it at the machine initalization is not working.

[ 0.188000] ath9k,eeprom ath9k_eep.8: failed to find mtd device

My first idea is to dump this data(I can send it), and use as firmware instead of reading this partition. It is only 1K. Problem is that this data sometimes differ.
Anyway - WiFi works on Master mode (tested with wpa2-psk), Managed(tested with wpa2-psk), and Monitor (Injection works too). Don't now how is it important.

My second idea is to reverse the direction - repair it, and then load GPHY firmware just from u-boot, it is much bigger. It could save some kilobytes of sysupgrade image.

comment:4 Changed 3 years ago by anonymous

9) When you think about a switch.. I think it is good idea to :

9.1) compile kernel driver, and insert it to trunk.
9.2) use "sh -x dsl_wan_setting.sh" and the second, to dump calls to crazy switchtool.

Make another script, and put it to preinit.

comment:5 Changed 3 years ago by anonymous

What about a factory image to easily test this out? I mean a factory image generated on compiling

comment:6 Changed 3 years ago by anonymous

Don't understand the question. It appears, after building - you have to upload it to the router.

comment:7 Changed 3 years ago by anonymous

I mean the usual factory image to flash from stock firmware (web gui) without using tftp or hard methods. The sysupgrade image doesnt work from the stock firmware

comment:8 Changed 3 years ago by markuznw

The suggestion of the user above would be really appreciated :) A way to flash it without serial or so

comment:9 Changed 3 years ago by anonymous

Firstly - DO NOT upgrade to the latest firmware on TP-Link website. It has modified u-boot, and applies a NEW UNKNOWN header - first byte is 0x03. We don't know how is it working.
This is all what can I say now :(

comment:10 Changed 3 years ago by markuznw

It already arrived with 28/08 firmware installed (bought it 2 days ago). So bye bye openwrt i guess? :(

comment:11 Changed 3 years ago by anonymous

Or if there is a way to access tftp without using serial please say

comment:12 Changed 3 years ago by anonymous

@markuznw Not bye bye, but you have to connect at least two pins (GND and TX), and update firmware by u-boot. It is dangerous to play OpenWRT on this device now without a serial console.

comment:13 Changed 3 years ago by anonymous

I've managed to upgrade it to openwrt using a serial console with info written on the polish site linked in wiki. But i got now a working openwrt console but my computer can't get an ip from the router and so can't make it work. Any help please? :P

comment:14 Changed 3 years ago by anonymous

Actually wifi does work while ethernet is completely off, hmm

comment:15 Changed 3 years ago by rd1381@…

how do i get openwrt on 8970tplink?
does it need hw tampering?
can somebody give me instruction?

comment:16 Changed 3 years ago by anonymous

Currently I'm trying to port the switch_api and the userspace-tool to openwrt. I didn't take the code from AVM, but the one from TP-Link - it seems to be a bit 'newer'. I'm almost done, but there is Problem about enabaling the PMUs - in
ifx_ethsw_init.c Line 405-408

PPE_TOP_PMU_SETUP(IFX_PMU_ENABLE);
PPE_DPLUS_PMU_SETUP(IFX_PMU_ENABLE);
PPE_DPLUSS_PMU_SETUP(IFX_PMU_ENABLE);
SWITCH_PMU_SETUP(IFX_PMU_ENABLE);

in openwrt-style, this is (should be)

ltq_pmu_enable(PMU_PPE_TOP)
ltq_pmu_enable(PMU_PPE_DPLUM)
ltq_pmu_enable(PMU_PPE_DPLUS)
ltq_pmu_enable(PMU_SWITCH)

The problem is, when it trys to activate the second one, the device freezes.

When I comment out

ltq_pmu_enable(PMU_PPE_DPLUM)

the rest of the module loads and I can communicate with it using switch_utility...

Any suggestion. Does it have to be a differend order? blogic?? :)

comment:17 Changed 3 years ago by anonymous

Could you share the code (as it is now) with us? Thank you in advance

If rest of the module loads and there is a communication, then we have it.
I can test it in January

comment:18 Changed 2 years ago by anonymous

Trunk (39400):

the reset button is not working (/etc/rc.button/reset) is not called.
wps is all fine

comment:19 Changed 2 years ago by anonymous

Did any of you guys ever try to connect more than one device to the switch? For me it works as a dump hub - all ethernet frames are forwarded to all switch ports. First I thought, it was just a bug with the leds, but I tested it with wireshark. Somebody else having this problem with this device?

comment:20 Changed 23 months ago by bodka.zavinac@…

hello,
it would be really great if this device made it to barrier breaker!
thank you lots,
<3 openwrt

comment:21 Changed 22 months ago by vrx200

The vr9 lantiq ECI/r also has the same switch issues.

A "switch_utility" patch would be a great addition to both units.

Might be some useful stuff at BTOpenreach GPL centre

http://www.openreach.co.uk/orpg/home/products/super-fastfibreaccess/super-fastfibreaccess/landrgnu.do

Or the easybox 904
https://github.com/uwehermann/easybox-904-lte-firmware

comment:22 Changed 22 months ago by anonymous

if you could look at VDSL problem ? - https://dev.openwrt.org/ticket/17707

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.