TP-LINK CPE210 report

Dear friends,

The TP-LINK CPE210 is a nice outdoor wireless device with two LAN RJ-45 connectors and one radio. I could install and run LEDE, which works fine. It rocks and should allow me to have wireless in my garden. With such a low price (39 EUROS), it could be a major hit for LEDE.

The first issue is that to fool TP-Link installer, I had to rename LEDE firmware file to CPE200 firmware name: pharos-up-ver1-3-3-P9[20160705-rel52453]

The other remaining issue is quite interesting:
By default,
LAN0 is used for LAN initial setup and PoE.
LAN1 is used for WAN.

PoE is the only way to power-up the device, so LAN0 is always connected either to a PoE hub or passive power. And WAN needs to be stay connected also to have Internet access.

It is a problem, as I need to connect the CPE200 with two network wires, when only one would suffice normally. Imagine a setup where you have to double wires on 100 outdoor devices. This is just impossible.

So obviously, this should be the converse:
LAN0 should be assigned for WAN and PoE.
LAN1 should be assigned for LAN (and not used).
and open port 22 to connect using SSH
and open port 80 to connect to Luci

I understand that the underlying idea was to be able to install LEDE using LAN only connector.
I have the feeling that I miss something very easy to do.
Any idea?

Kind regards,

After starting with two RJ-45 wires, I swapped eth0:0 and eth0:1.
otherwise, the CPE210 becomes unreachable after reboot and when connecting with one wire.

The resulting configuration is:
vi /etc/config/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 'fde8:8ab5:eb69::/48'

config interface 'lan'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
option _orig_ifname 'eth0.1 radio0.network1'
option _orig_bridge 'true'
option ifname 'eth0.2'

config interface 'wan'
option proto 'dhcp'
option _orig_ifname 'eth0.2'
option _orig_bridge 'false'
option ifname 'eth0.1'
option hostname 'CPE200'
option type 'bridge'

config interface 'wan6'
option proto 'dhcpv6'
option _orig_ifname 'eth0.2'
option _orig_bridge 'false'
option ifname 'eth0.1'
option reqaddress 'try'
option reqprefix 'auto'
option type 'bridge'

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

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '5 0t'

config switch_vlan
option device 'switch0'
option vlan '2'

Now, I have another problem.
Only one radio shows in Luci.

My bad. Device has only one radio:
iw list
Wiphy phy0
max # scan SSIDs: 4
max scan IEs length: 2257 bytes
max # sched scan SSIDs: 0
max # match sets: 0
max # scan plans: 1
max scan plan interval: -1
max scan plan iterations: 0
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Device supports AP-side u-APSD.
Device supports T-DLS.
Available Antennas: TX 0x3 RX 0x3
Configured Antennas: TX 0x3 RX 0x3
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* WDS
* monitor
* mesh point
* P2P-client
* P2P-GO
* outside context of a BSS
Band 1:
Capabilities: 0x11ef
RX LDPC
HT20/HT40
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT TX/RX MCS rate indexes supported: 0-15
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm)
* 2472 MHz [13] (20.0 dBm)
* 2484 MHz [14] (disabled)
valid interface combinations:
* #{ managed } <= 2048, #{ AP, mesh point } <= 8, #{ P2P-client, P2P-GO } <= 1, #{ IBSS } <= 1,
total <= 2048, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz }

	 * #{ WDS } <= 2048,
	   total <= 2048, #channels <= 1, STA/AP BI must match
HT Capability overrides:
	 * MCS: ff ff ff ff ff ff ff ff ff ff
	 * maximum A-MSDU length
	 * supported channel width
	 * short GI for 40 MHz
	 * max A-MPDU length exponent
	 * min MPDU start spacing

This setup is not optimal. A better setup removes WAN, DHCP, etc ... And works only from LAN. I will publish the correct settings when finished.

Here is the correct setup:

Please note I am not using IPv6 as it is too insecure.

Main router (WDR3600):
provides DHCP, wireless, etc ...
Example IP address: 192.168.0.1
Default gateway is set to DSL, fiber, etc ...
Serving wireless on channel 1.

Extender device:
wireless only, connected using LAN0 to WDR3600.
You never need to connect LAN1.

First step:
Install LEDE on CPE210. Connect your station directly to CPE 210 using static IP 192.168.1.1
Use only LAN0 which is also providing PoE.

Second step:
Change CPE210 LAN IP to an IP part of subset of WDR3600. In my case 192.168.0.120
Assign CPE210 default gateway, DNS and NTP manually: 192.168.0.1
Click "Assign" but not "Apply".
Remove dnsmasq as you don't need it.
When this isdone, click "Apply" to apply rules.
The CPE210 becomes unreachable.

Third step:
Connect the CPE210 to the WDR3600 LAN.
Connec to CPE210 new IP: 192.168.0.120
Disable WAN and WAN6 as you don't need them.
Uncheck "bring on boot".
Setup WIFI with same SSID as main router WDR3600, but use different non-overlapping channels.
In my case channel 6.

This is done. You now have a main router with an extender!

Here is the resulting configuration:

vi /etc/config/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 'fdff:d825:ee37::/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.0.120'
option gateway '192.168.0.1'
option broadcast '192.168.0.255'
option dns '192.168.0.1'

config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'
option auto '0'
option defaultroute '0'

config interface 'wan6'
option ifname 'eth0.2'
option proto 'dhcpv6'
option auto '0'
option reqaddress 'try'
option reqprefix 'auto'
option defaultroute '0'

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

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '5 0t'

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '4 0t'

vi /etc/config/wireless

config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11g'
option path 'platform/ar934x_wmac'
option channel '6'
option htmode 'HT40'
option country 'FR'

config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'heron'
option encryption 'psk2'
option key 'mysecretkey'

I am slightly confused as to why you are doing this, all you need to do is go to the switch config and swap which vlan ports 4 and 5 are attached to...
The way these are generally setup, WAN comes in via the wireless (it is in client mode) and your more expensive AP sits on the tower broadcasting the backhaul network.

Aaron Z

Finally, I did not swap LAN0 and LAN1 as there was no need to. I simply used LAN gateway. So no need for a WAN.

If your radio neighborhood is clear, you may use radio for WAN, but these are not the recommended settings. radio neighborhood is usually crowded and WAN should always be wired and you should try to wire as many devices as possible. Only truly mobile devices should have access to wireless.

The CPE210 needs an RJ45 network cable to supply power (PoE). So it is interesting to use this cable to provide Internet. Usage depends on your network topology:

  • SETUP 1: TP-LINK CPE210 only AP with Internet access via DSL/Fiber.
    LAN0=PoE+lan ; LAN1=WAN. This is a usual setup. Two cables are needed.

  • SETUP 2 : TP-LINK CPE210 secondary AP connected via wire to primary AP.
    This is my settings. LAN0=PoE+lan. No need to connect LAN1 to WAN. Internet via lan gateway. Only one cable is needed.

  • SETUP 3 : TP-LINK CPE210 acting as a repeater.
    This is the wireless settings that you are discussing. Only channels 1, 6 and 11 are usually available in the 2.4 Ghz band. So repeaters acting only on wireless may add to the mess if not well configured.

  • SETUP 4 : Mesh networks.
    Optimal when a lot of nodes / APs are used and topology is unknown or users are moving. With 3/4 AP and fiber, I don't need mesh.

IMHO, SETUP 2 is way more easy to setup. In the 5Ghz band, you may have dozens of free channels (but you will need the CPE 510 which I ordered :slight_smile: ) Only a wired backbone will allow you to spread your network devices.

The only real issue is that the CPE210 and CPE510 have a 10/100 Mbit ethernet connector. But IMHO is enough to cope Internet traffic.

Stay tuned, in the next days, I will write a complete HOWTO with photos of my setup. I am waiting for two CPE510 ordered yesterday.

Does LEDE allow to use non standard WiFi channels on this device? On stock firmware there are 2312-2572MHz. Using now a pair of this device in bridge mode. But don't like the slowness of their web interface.

I have the CPE210EU V2. The lede firmware its not working.

Can i have another option to flash the AP?

Many thanks:

Sorry to hear that.

I bricked mine once playing with firewall.

Normally every LEDE device supports an emergency flashing using TFTP boot, as explained in the documentation:
https://lede-project.org/docs/howto/tftpserver