[SOLVED] Question using LEDE on TP-Link WR902AC v1

Hello,

I am now using the device TP-Link WR902AC v1. as a WiFi-Bridge with 5 GHz. After switching to LEDE can I further use it as a WiFi-Bridge or only as switch, router or gateway?

Greetings from Germany / Nuremberg

Panther-6

Has anybody else TP-Link WR902AC v1. and uses it with LEDE in client mode (WiFi Bridge)? Or is this not possible?

Yes, it is possible.

OpenWRT directly supports client mode, as well as server and client mode for WDS, assuming your hardware supports it. It can also be configured for 802.11s. Bridging of interfaces can be configured through the GUI ("LuCI"), or manually. Level 2 tunnels can be configured through the configuration files.

O.K. thank you. I will try it :slight_smile:

Hello,

I have installed your firmware from here:
https://openwrt.org/toh/hwdata/tp-link/tp-link_tl-wr902ac_v1

and now the device has the IP: 192.168.1.1

Unfortunately my browsers Edge, IE11 or Firefox don't find this IP in order to configure the device.
Resetting the device doesn't change anything. The LED's go on for one second and then off again.
I only can connect with putty SSH. But when I write: "opkg update", there comes the message: "Please check your network connections" after trying to download from Lede / OpenWRT site. Which command do I need now to install a firmware downloaded on my PC, e.g. the one from the vendor? Firmware is on C / users / downloads. Please help me.

@Panther-6 -

Currently, the WR902AC is only supported in the snapshots -- hopefully the OpenWRT 18.x release will happen soon and that should include official support for this router and the stable release build should be much easier to bring up.

That said, snapshots do not include LuCI (the web interface), so that must be installed after the fact. There are two ways to install LuCI - online or offline.

Online installation is generally easier because you don't have to worry about all the LuCI dependencies and such, but it means setting up the networking first. And by default, the LAN is setup on the ethernet port while wireless is disabled. What this means is that you must ssh into the device while connected via ethernet, and then configure the networking via the config files or command line UCI formatting such that you have a working internet connection (often via configuration of the WAN). Each situation is different, but often people will enable wireless networking with wifi as the LAN, and ethernet reconfigured for the WAN (you could do the reverse, or configure the radios such that you have both WAN and LAN via wireless). Once connected to a WAN, the opkg update command will work and then you can use opkg install to do what you want.
opkg update
opkg install luci

Alternatively, you could work offline -- this requires downloading the LuCI package as well as all of the dependencies. You'd download these to your computer and then copy them to your WR902AC via scp. Once everything is there, install via opkg. The trick here is making sure you have all the packages required to satisfy the dependencies -- you can do this as a trial and error approach, if you like as I am pretty sure that you will see a list of the dependencies that were not satisfied.
opkg install <full_filename_with_path>

Thank you for your answer. Unfortunately both ways sound very very difficult to me :frowning:

Online:
How can I enable wireless networking with wifi as the WAN? My router is a Fritzbox 7590...

Offline:
Where can I find (the right) Luci and the dependencies? And how can I copy them to my WR902AC via scp? Which command can I use on putty to do so?

I am very sorry about my questions and my poor English...

I have used the script below to configure the device with wireless enabled (LAN) and the ethernet port for WAN. You can run this as a script on the WR902AC or you can just run the uci commands manually.

set_network_config.sh
# This script will continue setup of the TL-WR902AC basic networking
# LAN will be configured on Wifi as specified in this file along with the network address space. DHCP server is enabled for LAN.s
# WAN will connect via wired ethernet and request IP address using DHCP


# Wirless network config
ssid="WR902AC"
key="TL-WR902AC"

# LAN configuration
lanip=10.0.10.1

# System configuration
hstname="WR902AC"

# Setting the 'system' configuration for hostname and timezone.
uci set system.@system[0].hostname=$hstname
uci set system.@system[0].timezone='PST8PDT,M3.2.0,M11.1.0'
uci set system.@system[0].zonename='America/Los Angeles'

# Wifi radio is disabled by default and is enabled by deleting the 'disabled' line
uci delete wireless.radio0.disabled
uci set wireless.default_radio0.ssid=$ssid
uci set wireless.default_radio0.encryption=psk2
uci set wireless.default_radio0.key=$key

uci delete wireless.radio1.disabled
uci set wireless.default_radio1.ssid=$ssid
uci set wireless.default_radio1.encryption=psk2
uci set wireless.default_radio1.key=$key


# LAN was originally bridged (type) and was using eth0 (ifname), WAN was not configured.
# Delete ifname and type for LAN to unbridge and free eth0 for use with as WAN.
# Setup WAN on eth0 with DHCP address request protocol.
uci delete network.lan.ifname
uci set network.lan.ipaddr=$lanip

uci set network.wan=interface
uci set network.wan.proto=dhcp
uci set network.wan.ifname=eth0


# Commit changes
uci commit system
uci commit network
uci commit wireless

# Restart system and network stacks
echo Network updated - LAN @ wifi SSID $ssid with WPA2 encryption + password $key and WAN via ethernet
echo Connect ethernet to WAN.
echo Restarting network...
/etc/init.d/system restart
/etc/init.d/network restart

Thank You very much. I never worked with scripts or uci commands... I have got an idea: I have got a (second) network interface card, which I want to put on the PC today, so I have two LAN-Ports on PC. One to connect to my main router Fritzbox and the other to WR902AC. I hope this will work also?

Your idea of 2 NICs in your PC won't solve the issue that the WR902AC doesn't have an internet connection, although it might help you by keeping your PC on the internet while you're working with your 902AC device. That said, if your main router is located at 192.168.1.1, you will have issues trying to connect because you will have 2 devices that respond to the same address.

I can think of several ways that you could approach the task at hand, but all of them will require that you become at least somewhat familiar with scripts, UCI commands, or direct editing of your config files. You'll probably want to read some of the wiki articles about how to work via command line options and general configuration stuff for OpenWRT.

You are right: 2 NICs didn't work, although I connected one cable directly to the WAN-Port of my FritzBox 7590 and changed the IP4 standard gateway adress from originally 192.168.178.1 to 192.168.1.1.

As my English isn't good, I do not understand the wiki you sent to me. I also can not find step-by-step guides in German.

This all is too complicated to me, although I use Linux- Receivers since years (actually VU+ Uno 4K), which work also with the command opkg update & opkg upgrade with the program DCC (Dream Control Center).

I only want to go back to the vendors firmware now. Perhaps I will try your firmware later, when luci is included already in your firmware.

Perhaps offline is easier to get luci installed? Can you please send me the link to the site of luci and the dependencies? And what must I do next, when installed all this to c - users - downloads? Please step by step for silly persons like me.

Or is it possible to help me via TeamViewer or so?

@Panther-6 -

You will probably find it easiest to wait for the OpenWRT 18.x stable release which should include LuCI. That will make it much easier to use the router in general if you are not comfortable with scripting, linux command line and UCI commands.

You could also try Google Translate or other such tools to make the Wiki easier to read (English > German), but be careful because sometimes minor translation errors can cause issues or confusion with complex and technical topics such as these.

Hello,

I have now read the wiki several times and want to try to install luci again. Please help me.

You wrote yesterday, that I also can use your script: set_network_config.sh. Do I have to change something like "lanip" (lanip=10.0.10.1) or "zonename" (zonename='America/Los Angeles') in this text or can I use it as it is? Because I live in Germany / Nuremberg.

I want to do following: Opening a text program like notepad++, copy & paste your text and name the file: "set_network_config.sh" and copy "set_network_config.sh" to "etc / config /" or "etc / config / network"? Which commands do I need to copy this file to the right place with putty?

Then restarting the PC, opening putty and type the commands "opkg update" and "opkg install luci". Is this right? Please help me...

@Panther-6 -

The lanip is somewhat arbitrary (within the RFC1918 defined network ranges), I just chose 10.0.10.0/24 as the LAN I use for these devices.

Time zone doesn't really matter... you can change it now, later, or just delete the line from the script.

The script, it will adjust the settings and restart some of the services in the router itself. You do not need to restart the computer or the router.

There are two options for getting the script over to your device in the first place:

  1. copy and paste my script into a text file on your computer and then transfer the file via scp to your WR902AC.
  2. or copy the contents of the script and then paste the text into a file while you're ssh'd into the WR902AC. For this, you'd use a built in editor (I use vi, not sure what other editors are part of the default snapshot image).

Once you have the file in place, you'll want to make it executable on the WR902AC... so while ssh'd into the device (and assuming you're in the same directory where you've saved the file):
chmod +x set_network_config.sh

Then execute it (again, assuming you're working in the same directory):
./set_network_config.sh

Hopefully everything works and then you'll see it say: "Restarting network..."

At that point, the WR902AC should have the WAN on the ethernet port -- plug this into your upstream router (i.e. the internet connection). And the LAN will be on wifi -- use your PC to connect to the wifi that the script enables (ssid="WR902AC" key="TL-WR902AC" with WPA2 Personal encryption, unless you change any of those values)

Once reconnected via wifi, your PC should get an IP address in the 10.0.10.0/24 network space. Connect to the router by ssh'ing to 10.0.10.1 (again, you can change these if you want, but these instructions apply to how I have written the script).

From there, you can run:
opkg update
opkg install luci

And then you can connect via a web browser to your WR902AC (http://10.0.10.1)

Hello,

thank you very much. I want to try 1. when I am back home today (now I am at work):

Copy and paste your script (as it is) into a text file on my computer (c/users/downloads), name it "set_network_config.sh" and then transfer it via scp to the home directory of my WR902AC.

Is this command / syntax right?

$ scp set_network_config.sh root@OpenWrt:~

Then:

chmod +x set_network_config.sh

Then:

./set_network_config.sh

If not, please give me the right commands / syntaxes.

You wrote:
"At that point, the WR902AC should have the WAN on the ethernet port – plug this into your upstream router..."

Question:
Upstream router is my FritzBox 7590 right? You mean I have to unplug WR902AC from my computer and directly plug to my FritzBox 7590 (on the WAN-Port or LAN-Port or is this not important?)?

Finally I connect via wifi (ssid=“WR902AC” key=“TL-WR902AC” with WPA2 Personal encryption), ssh’ing to 10.0.10.1 and run:

opkg update
opkg install luci

It looks like everything you've stated is correct in terms of the syntax. The scp command will be run locally on your PC (presumably via putty or something similar), and then you will ssh into the WR902AC for the chmod and to run the script.

When the script has completed, you will want to connect the ethernet port of the WR902AC to your FritzBox's LAN port.

Thank you very much. You are really great. Finally I could install luci.

How can I install the vendor's Firmware now? When I go to System / Backup / Flash Firmware and choose the vendor's Firmware, I get the error message: "The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform."
(Installed Firmware Version now is: OpenWrt SNAPSHOT r6437-1cd76e2 / LuCI Master (git-18.085.65030-648fd91))
Please help me. I will install your Firmware later again, when luci is integrated.

Glad it worked! I actually have never tried to flash back to the vendor's original firmware, so I cannot explain the process. In general, the system's 'flash firmware' features should do the trick, but clearly it doesn't like something about the file. You can also use the command line to do this:

scp <firmware_file> root@<wr902ac_ip_address>:/tmp/

and then when ssh'd into the WR902AC, you'll run:

sysupgrade [arguments] /tmp/<firmware_file>

The arguments for sysupgrade can give you some additional control, including the -f (force) which will bypass checks -- this is very risky, though. It may be better to wait until (hopefully) someone else comments with the preferred method for flashing the original firmware and/or describing possible modifications to the firmware file such that it passes the checks.

Good luck!

EDIT: @Panther-6 - you might want to start a new thread specifically to address the question about reflashing the vendor firmware. This will probably be more likely to get answers as the subject line can be specific to the issue.

Hello,

thank you, I think I will start a new thread...
But in case I want to use your firmware OpenWrt, have I to do something because of changing the network configuration of WR902AC? I mean, actually I open LuCI at 10.0.10.1 and not 192.168.1.1. Is this right so?