How to?... Client + AP. Part 2

Hello
I had read this in the user guide before send my first topic:
Wifi Extender or Repeater or Bridge Configuration
https://lede-project.org/docs/user-guide/relay_configuration

But I was not quite clear, so...
Does standard firmware support client + AP directly?
Do I need relayd and luci-proto-relay packages to make it work?
Is it possible any kind of configuration with standard firmware without installing anything?
Why don't developers add the option "Client + AP" in the pulldown menu?

Thanks Again

My first topic:
Hello
I been using open firmwares for a long time, Tomato, dd-wrt, openwrt, gargoyle, and now lede. With dd-wrt and gargoyle is very easy configure a router in "client+AP" mode, even in a different subnet and a different essid, but I never get this configuration with openwrt neither lede. Of course I want to get this without adding a second wireless adapter, only a router as is.

TIA

Hi,

I am not sure why you think this is a different problem then doing it on DD-WRT. I am using two Atheros based routers to connect Client / Station WDS. To add the AP I need another virtual adapter.

In fact: one router is running LEDE (WDS-Client + AP), the other is running DD-WRT (WDS-AP + AP)

Using Client instead of WDS should be more or less the same out of the box.

Even though I prefer the WDS setup: easy, simple and just works here is the how-to: (Any routing-experts with suggestions how to do this better, I welcome your input)

Client-side setup:

First make sure you are not using the same subnet on your Main-Router and the Client. (I use 10.0.0.0 for Main, 10.0.1.0 for my Client both with a net mask of 255.255.255.0)

In DD-WRT: Setup/ Basic Setup: Router IP.
In LEDE: Network/ Interface : LAN (Protocol is Static, IP address)

Second: since your Client-Router is not connected directly to the internet and we will configure it with a Static IP, It needs a DNS address. You can use the IP of your Main-Router, and it will use the DNS servers in your Main-Router. Or if you prefer you can specifiy a DNS server yourself: OpenDNS (208.67.222.222 and 208.67.220.220) or Google DNS (8.8.8.8 and 8.8.4.4) as examples

Network / Wireless

Edit (or Add if you have none) the Wireless Radio you want to use to connect to Main-Router

Make sure you configure this device the same as your Main:
General Setup:

  • Mode, Channel, Width, ESSID from you Main-Router
  • Save
    Wireless Security
  • The same as your Main-Router: e.g. WPA2/PSK force AES and the key
  • Save

At this point your client-router could connect to your main-router but it will not get an IP.

Network / Interface:

Add a new interface: this will allow you to set a static (or DHCP) IP for your client-router. DHCP works, but is more difficult on the main-router to configure router TO your client-router.

  • Select a name for your interface
  • (recommend) select Static Address
  • Select the Wifi - Radio under "Cover the following interfaces"
  • Submit (save)
    The same page will now let you input the static details:
  • Input static IP: this should be in the subnet of your Main-Router (preferably outside its DHCP range)
  • Network mask ( 255.255.255.0 should be most cases)
  • Gateway: This is the IP address of your Main-Router
  • Save & Apply

At this point you should see your newly created interface connected to your Main-Router with its static IP.

Network / Firewall:

Add a new Zone: this will masquerade (NAT) the local packets to your Main-Router

  • Input a new Name for your Zone

  • Select: Input accept, Output Accept, Forward Reject

  • Masquerading Ticked

  • MSS clamping Ticked

  • Covered networks: Select your new create Network
    Inter-Zone Forwarding:

  • Tick: Allow forward from Source Zones: your local LAN

  • Save and apply

Client-Bridge part is done on the Client-side.

Now in order for your devices connected to your Main-Router to connect to the devices on your Client-Router, you need to setup a static routing on the Main-Router to your Client-Router
In DD-WRT: Setup / Advanced Routing : Static Routing. On LEDE: Network / Static Routes

Input the sub-net of your Client-Router, Netmask and as Gateway the Static IP address you used when creating the new interface in LEDE.

You should now have a fully working wireless bridge between your main-router and any device connected to your client-router. The problem is: only wired devices are connecting now since we used the Radio to connect to our Main-Router.

To connect wireless-devices you need to add an Access-Point:

Network / Wireless

  • Add Wireless:
  • General setup: input the required ESSID (same as main for easy Roaming or different to easy spot which AP you are using)
  • Tick ‘lan’ (Here you could create a new one as well, for example to create a separate guest network with its own DHCP subnet)
  • Save
  • Wireless Security:
  • Input what ever encryption etc you would like to use

That should do it!!

Thank you drbrains
Sorry, it didn´t work. I did this configuration before with the same result. Devices connected to the lan works fine till I do the last step, when I add an Access Point to connect wireless devices too, the client router disconnects from the main router. I have to remove the Access Point configuration if I want to reconnect with the main router, so only devices connected to lan works again.
The final result is that only works the "client" side but not the "AP" side. I'm afraid that only routers with two radios can use this configuration.
Any help will be appreciated

TIA

For sure it works with 1 radio. I am using a wireless bridge between an old TP-Link WR840ND and a TP-Link WR740ND. Both 1 Radio. The WR740ND even has only 1 antenna and acts as a WDS-AP plus local AP on different ESSID.

But you said you have this setup working (same hardware) using DD-WRT?? Which router/hardware are you using. Maybe we find out that there is a driver problem or feature missing iniside the driver. I only have 1 very old Broadcom based router (asus rt-n10), but it looks like my approach should still work. For reference:
https://www.dd-wrt.com/wiki/index.php/Repeater_Bridge

Hi again
It´s good to know it must work with 1 radio, so I will continue trying. I am using this router for tests:
https://wiki.openwrt.org/toh/comtrend/ar5381u
As far as I Know, this router is not supported by dd-wrt or gargoyle, only lede supports this one by now. But what I want it is to learn configure any supported router with lede.
Anyway, answering your question, I have been using other routers more basic than this one and work like a charm with dd-wrt or gargoyle doing "Client+AP" without problems. For example, Linksys WRT54G, TL-WR740N, TL-WR741ND, TL-WA701ND, and others.
So I suppose this one, with lede, must work without problem, it is a better router. Gargoyle is based on openwrt, like lede, and has a pulldown menu to choose "Client+AP", and dd-wrt in mode "Repeater Bridge" works too. Why not lede?. Is it so complicated?, I think no.
If you want I can put here the contents of "wireless" and "network" configuration files, but tonight, now I am working.

TIA

Ok. From what I can find sofar:

It most likely is using the kmod-bc43 driver for wireless. You could try (not sure if you will get a proper result) the following to check:

SSH/Telnet into the router

nvram show | grep corerev

it should return a revision number. For reference: https://www.dd-wrt.com/wiki/index.php/Multiple_WLANs#Broadcom_Based_Hardware

Even then, I am not sure if the kmod-b43 driver supports the feature even if your revision is high enough. If your revision returns a low number, its a hardware limitation and nothing LEDE / OpenWRT or any other software can do about it.

Hi drbrains
First, thanks for your interest.
And now, two things...
One:
None output for the command "nvram show | grep corerev". Look:

login as: root
root@192.168.11.1's password:

BusyBox v1.25.1 () built-in shell (ash)

 _________
/        /\      _    ___ ___  ___

/ LE / \ | | | | | |
/ DE / \ | |
| || |) | |
/
______/ LE \ |||/|| lede-project.org
\ \ DE /
\ LE \ / -----------------------------------------------------------
\ DE \ / Reboot (17.01.1, r3316-7eb58cf109)
_
/ -----------------------------------------------------------

root@LEDE:~# nvram show | grep corerev
-ash: nvram: not found
root@LEDE:~# nvram get wl0_corerev
-ash: nvram: not found
root@LEDE:~#

So I don't know how to obtain the revision number. Maybe 9? The chip is BCM96328 but everybody call it Broadcom 63xx.

This is the only information that I have got:

root@LEDE:~# cat /proc/cpuinfo
system type : bcm63xx/96328A-1241N (0x6328/0xB0)
machine : Comtrend AR-5381u
processor : 0
cpu model : Broadcom BMIPS4350 V7.5
BogoMIPS : 319.74
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : no
isa : mips1 mips2 mips32r1
ASEs implemented :
shadow register sets : 1
kscratch registers : 0
package : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available

root@LEDE:~#

And two...
Contents of config files "network" and "wireless" according to the configuration that you send me.

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 'fda1:262e:dd59::/48'

config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.11.1'
option dns '8.8.8.8'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 3 8t'

config interface 'wwan'
option proto 'dhcp'

config interface 'dothetrick'
option proto 'static'
option ipaddr '192.168.1.234'
option netmask '255.255.255.0'
option gateway '192.168.1.1'

WIRELESS

config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11g'
option path 'pci0000:00/0000:00:00.0/0000:01:00.0/bcma0:1'
option disabled '0'
option channel '6'
option country '00'

config wifi-iface
option ssid 'MOVISTAR_1234'
option encryption 'psk2'
option device 'radio0'
option mode 'sta'
option bssid 'E2:41:36:00:00:00'
option key '0987654321'
option network 'wwan dothetrick'

config wifi-iface
option device 'radio0'
option mode 'ap'
option ssid 'OpenWrt'
option network 'lan'
option encryption 'psk2'
option key '12345678'

I have too the config files of a router TL-WR740N with Gargoyle configured as "Client+AP", and working to compare.

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 'fdad:561c:6580::/48'

config interface 'lan'
option ifname 'eth0'
option force_link '1'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.11.1'
option dns '80.58.61.250 80.58.61.254'

config interface 'wan6'
option ifname 'eth1'
option proto 'dhcpv6'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 3 4'

config interface 'wan'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.222'
option netmask '255.255.255.0'
option gateway '192.168.1.1'
option ipv6 '0'
option dns '80.58.61.250 80.58.61.254'
option peerdns '0'

WIRELESS

config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11g'
option path 'platform/ar933x_wmac'
option htmode 'HT20'
option channel '6'

config wifi-iface 'ap_g'
option device 'radio0'
option mode 'ap'
option network 'lan'
option disassoc_low_ack '0'
option ssid 'OpenWrt'
option isolate '1'
option encryption 'psk2'
option key '12345678'

config wifi-iface 'stacfg'
option device 'radio0'
option mode 'sta'
option network 'wan'
option key '0987654321'
option ssid 'MOVISTAR_1234'
option encryption 'psk2'

And That's all

I start to think that the limit could be the Broadcom chips, so I will try your configuration in a router with Atheros chip as soon as possible, and I will tell you.

TIA

It turns out my old Asus RT-N10 is using the same wifi driver (kmod-b43). Let me see if I can compile a minimal version. Its still a different wifi-chip but maybe will give more information on this problem. Never bothered before with OpenWRT or Lede on it. I am not sure if this driver was ever updated. If not then this is why it doesn't work:
https://wiki.openwrt.org/doc/hardware/soc/soc.broadcom.bcm47xx#wifidrivers

kmod-b43 driver limitation is no Multiple SSID. So you can't have it connected to your Main-router and have a SSID as AP.

As alternative you should be able to use different subnets and use static routing between the second/third/etc and your main-router. Depending on you usage this may be less ideal. If used to extend the coverage then roaming is less ideal since your wireless devices will change IP addresses. For more advanced routing, using only one DHCP server etc, I'm afraid it is not a "standard" pre-compiled firmware and you have to start building your own or if you have enough space at least add some packages.

You are right about driver limitation, when I joint to main router appears this:

Joining Network: "MOVISTAR_1234"
Replace wireless configuration
The hardware is not multi-SSID capable and the existing configuration will be replaced if you proceed.

So now, we know the problem, it's a step ahead. But I don't know the way to resolve myself if developers don't do it for me (and for other too). Space for a new compilation is not a problem, this router has 16/64.
What can I do now?

Thanks

Actually its not a hardware limitation. Its a driver (software) problem. The Open-Source driver doesn't have this feature.

But like I said, if you are willing to try, you can swap the driver for another open-source one. I'm not sure why Lede defaults to the kmod-b43. Alternatively you could use the broadcom driver. This is not open-source, but luckily is included in the Lede build environment. Actually its partially open source around a closed sourced binary. This driver should be able to give you multiple SSID's.

I didn't get a working copy yet for my Asus router, but the DD-WRT version for my router is using the Broadcom driver and I can use multiple SSID's.

It`s the same with my Linksys WRT54G (Broadcom BCM4712), it works with dd-wrt. So I suppose they use a different broadcom driver from lede.
Is it possible extract the driver from dd-wrt and put into lede?
Do you know if we can ask developers for this change? I don't know how to do it by myself.

TIA

If you know how to recovery from a bad flash, reference: https://wiki.openwrt.org/doc/techref/bootloader/cfe

you could try the build I added to GitHub specific for your device. It should use the broadcom owned drivers (like dd-wrt). Its a simple build. Base-files and Luci.

https://github.com/vschagen/Lede-test-builds/blob/master/lede-brcm63xx-generic-AR5381u-squashfs-sysupgrade.bin

No guarantees that it works (but it should :wink: )

I have flashed the router with your binary file, but... "Wireless" is missing from "Network" menu, so I can't test your firmware, because I can't add any wireless.

TIA

Strange. I didn't change anything else. Could you configure from the command line? It should have the Broadcom utilities to do that.

Let me try and open my own Broadcom router and see if I can flash via serial.

Well, the good thing is I could flash from a serial console. The bad: I most likely flashed over the CFE part and my dust collecting router turned into a brick. On the upside I now have a reason to learn how to flash directly to a flash chip using my raspberry pi.

Don't worry doing this from the mini CFE webpage or from within OpenWRT/Lede it will not allow you to do what I did.

Still I can't see any reason why the wireless menu would disappear from Luci, but again I think you still should be able to configure if from the CLI.

Sorry about your router, I'm sure you will came alive.
Ok, I will try your firmware again configuring it from command line.
I have to say that I tried the Development Snapshot build too, with no success, so it doesn't contain the latest technology, as they say. Maybe some kind of copyright problems with drivers?
I will keep you informed...

TIA

I pushed a new and hopefully better version to my github test builds. I included USB support (might be a nice feature to use your extra router as NAS) and included SQM support. It should have all the drivers and libraries for Luci to find your wireless network.

As for my router: there is a reason why 4MB and 32MB RAM are bare minimum. My old Broadcom route only has 16MB. Not enough to hold running firmware AND enough space left to hold the new firmware. Using CFE from a serial console is dangerous unless you understand the inner works. I just start to understand the inner works of U-Boot. Also a boot loader, but not the same :stuck_out_tongue:

Bricked. I flashed the router with your last firmware and turned into a brick. :wink: don't worry about. knowledge has a price.
I have many routers... for example, I have got another Comtrend with identical specs, AR-5387un.
Could you recompile the Stable Release build (not Development Snapshot build) changing only the wireless driver?

TIA

Bricked?? Can't be. As long as you didn't make my mistake the CFE is intact. You can always recover from that one. That's why I asked you in the first place to check any recovery procedure.

Are you sure you downloaded the right firmware? I have a few other files there for MT7628 and MT7621 chipsets.

Edit: I found the problem with that build. So most likely we have a different understand west "bricked" means. Try reaching the router on IP 10.0.0.253 (not 192.168.1.1). Maybe you have to try different ethernet port due to wrong network configuration file. I uploaded the corrected version.