TP-Link CPE210 v2 - Gluon Support

I was able to reproduce it and found the cause.
Reference clock was wrong for dev-wmac, that means that same way to bypass reference clock detection for CPU does not work for dev-wmac.
That means that this is not ready for upstream until I figure out a way to bypass it properly.

Source updated with temporary fix,also rebased on master to bump kernel.
Fixed images available here:Google Drive : connexion

1 „Gefällt mir“

WOW thank you, that was FAST and i confirm it is working ;-))
downloading luci package webinterface for „usual“ configuration does work also so i’m really happy

till a „freifunk“ firmware will be released i will now try following workaround:

  • CPE210 in „Freifunk“-LAN by cable from another FF firmware router
  • Freifunk Firmware Router with VLAN for client and MESH
  • configuring CPE with same VLANs for client (ap) and mesh (ad-hoc) wifi network

if this works i will report, perhaps this will be a good workaround in general

btw i just checked in the new build luci seems already be included also thanks!

  • confirmed now VLANs are working also
  • client-net in VLAN working
  • Ad-Hoc-Mode also working in different vlan

but i’m not really sure how to accomplish the ad-hoc-mesh network to the „main“ ff router without getting a ethernet loop, i’m still testing carefully. may be seperate vlans for each AP needed

1 „Gefällt mir“

sorry again for bothering you

is there a way to add „batman-adv“ package to the firmware? this would make the meshing stuff much easier, i tried to install package but did not get the right package for this kernel

ok i managed to add batman-adv by myself by just copiing the package from openwrt routing sources to the LEDE project (kernel must match to package binaries) , confirmed badman-adv and ad-hoc working

is there any update in integration to gluon project?

1 „Gefällt mir“

3 Beiträge wurden in ein neues Thema verschoben: TP-Link CPE510v2 - Gluon Support

Hallo

Es scheint ja voran zu gehen. Ist schon absehbar wann es eine Firmware für den CPE210 V2 geben wird?

Gruß

kann ich leider nicht sagen…

ich habe zwar eine lauffähige LEDE- firmware „binary“ mit batman-adv erstellt und aufgespielt und denn Rest „zu Fuß“ per SSH console und luci nachinstalliert… mir fehlen leider die Kenntnisse die Projekte auf „Quellcodeebene“ wieder zusammenzufügen um gleich alles fertig in einem image zu haben

vielleicht kann da jemand helfen oder mir sagen wo steht wie das geht?

Hallo wakkomon.

Evtl. kannst du eine Anleitung zum „zu Fuß“ aufsetzen des CPE210 V2 verfassen.
Damit währe evtl einigen schon geholfen.

Wurde der Patch den Upstream bei LEDE eingereicht?

Ich habe hier etwas gefunden:

Hier gibt es Firmware zum download:
https://drive.google.com/drive/folders/12iYQ2pgTMs301K6iw1U0rBQduKRMRjnb

Ob das helfen kann weiss ich auch nicht. Die Spezialisten sind gefragt.

Gruß

ok klar kein Problem hier mein weg „zu fuss“, der Weg ist zwar komplett umständlich aktuell, aber ziemlich linear :wink:

und man muss sehr vorsichtig sein damit man nicht das eigene Netz mit rein bringt(die lan bridge), also ehr nur was für OpenWRT/LEDE erfahrene user
(war ich vorher nicht hab n haufen gelernt dabei :wink: )
ich versuchs mal zu beschreiben

ich hab mir die sourcen der LEDE firmware von folgenden Quellen geholt:

Thread: TP-Link CPE210 v2 - Gluon Support
CPE210v2 test Source: https://github.com/robimarko/source/tree/CPE210-v2-clock
LEDE Soruce: GitHub - lede-project/source: Mirror of https://git.lede-project.org/?p=source.git Please send your PRs against this tree. They will be merged via staging trees and appear in this tree once the staging trees get merged back into source.git
Gluon Source: GitHub - freifunk-gluon/gluon: a modular framework for creating OpenWrt-based firmwares for wireless mesh nodes
OpenWRT Routing source: GitHub - openwrt/routing: OpenWrt Routing Packages
For ff specific packages: GitHub - freifunk-gluon/packages: Repository for Gluon specific and updated OpenWrt packages

Wenn ihr die Binaries selbst erstellen wollt:
Benötigt werden im Moment nur der komplette „CPE210v2 test source“, sowie das batman-adv und batctl packet vom „OpenWRT Routing source“ oder Gluon-Source

habe dazu das batman-adv packet in den package folder vom „CPE210v2 test source“ kopiert
anschließend mit „make menuconfig“ die packete aktiviert und mit „make“ compiliert
die passende make-.config nach meinem „make menuconfig“ wäre diese hier: .config
Compilieren deswegen, damit das batman-adv Packet als kernel-mode auch wirklich zum kernel passt

wenn nicht, crashed der kernel und ihr bekommt den CPE nurnoch per tftp recovery wieder ans laufen

Nach dem flashen ist die default ip 192.168.1.1 (lede default) root-pwd keins oder es wird per DHCP eine IP vom router geholt.
Die dann einfach am eigenen Router nachschaun.

Habs nicht hingebracht das Webinterface (luci) gleich mit drin zu haben, kann man als Packet per ssh aber nachinstallieren:
opkg update
opkg install luci
opkg install libiwinfo-lua
opkg install batctl (da evtl die sourcen in der /etc/opkg/distfeeds.conf ändern bin mir nicht mehr sicher)

damit habt ihr erstmal ein „normales“ LEDE mit Webinterface, jetzt der Rest vom „gluon“ konfiguriert:

Freifunkteil für Clients, optional:
Im Webinterface müßt ihr einmal den schon vorhandenen wifi-adapter im ap-mode belassen und am besten ohne VLAN aufs freifunkclient-netz bridgen(freifunk-ssid ohne verschlüsselung)
die Bridge zum LAN erstmal entfernen
Diesen Adapter kann man dann wenns meshing funktioniert auch auf bat0 bridgen, dann darf aber kein anderes ff-client-netz schon auf den lan-ports sein oder die bridge zu den LAN-Ports muss raus
(wenns ohne mesh bleibt dann ins ff-client-lan bridgen würde aber eh mit jedem AP gehen, interessanter ist ja der mesh part)

Freifunk mesh:
dazu einen 2. WLAN-Adapter per Webinterface anlegen, im ad-Hoc-mode SSID mesh.ffmuc BSSID 02:0E:8E:1E:61:17
NICHT mit irgendeinem Netzwerkadapter bridgen, am besten auf „unmanaged“ lassen

dann muss folgendes in die /etc/config/batman-adv (ffmuc spezifisch?))
config mesh ‚bat0‘
option gw_mode ‚client‘
option orig_interval ‚5000‘
option hop_penalty ‚15‘
option gw_sel_class ‚3‘
option multicast_mode ‚0‘

fertig. (geht ggf. auch mit den ff üblichen uci set befehlen).
aktiviert wird batman-adv dann so:

ip link set mtu 1532 dev wlan0
batctl if add wlan0
ip link set bat0 up

wenn alles gut geht seiht ihr mit „ifconfig“ nun einen neuen Netzwerkadapter bat0, das ist der virtuelle ff-switch mit dem ff-client-lan
der wird auf den 1. im ap mode eingestellten wifi-adapter gebridged

das kann auch ins startup-script, oder in die crontab, das Problem, batman-adv beendet sich sobald man per webinterface nochmal was an der config nändert, dann muss man das nochmal machen

eine VPN zu einem freifunk gateway hat die firmware damit erstmal nicht und is aufs meshing mit einem anderen ff-router als uplink angewiesen
ist aber eh besser, da die config schon noch sehr wackelig ist und ich will keine schleifen oder fehler im ff-netz verursachen

obs meshing dann auch funktioniert kann man so prüfen:
batctl if (sollte wlan0 als hinzugefügten adapter anzeigen)
batctl o (zeigt alle erkannten nodes im mesh an, dauert ggf eine weile)

ich hoffe ich krieg das alles zusammen als fertige config in eine firmeware, wollte mir den aufwand aber sparen in der hoffnung der CPE-teil der Änderungen kommt recht schnell in die richtige gluon-firmware

hoffe das war soweit verständlich :wink:

weis ich leider nicht, ich weis nicht wie das geht bzw wie man das sieht

habe den source von hier:
https://github.com/robimarko/source/tree/CPE210-v2-clock

die fertige firmware von
https://drive.google.com/drive/folders/12iYQ2pgTMs301K6iw1U0rBQduKRMRjnb1
ist leiderr ohne batman-adv, sie funktioniert zwar grundsätzlich, aber meshing funktioniert leider damit nicht, damit hat man dann auch nicht viel mehr vorteile als mit der stock firmware

kann auch gerne meine binaries inkl. batman-adv zur verfügung stellen (siehe post „weg zu fuss“) allerdings fehlt das luci-webinterface noch und fastd für vpn, nur wlan-meshing und client funktioniert

ok i now tried to get a better firmware by merging robimarko’s LEDE version with gluon packages:

but i get following message:

respondd.c: In function ‚add_uptime‘:
respondd.c:140:35: error: ‚json_object_double_to_json_string‘ undeclared (first use in this function)
json_object_set_serializer(jso, json_object_double_to_json_string, „%.2f“, NULL);
^

seems that i’m missing json-c package, but i did’nt find it anywhare, i found the source but not sure how to merge… just copiiing also in packages did not work - does someone have an idea what to do?

Why don’t you just take the Lede-Commit which enables the CPE210v2 and apply it to the older Lede-version on which Gluon is based on. Then you’ll only have to add the target in the profiles.mk and you’ll get real support for this device.

I’ve never done this, but the guys on hackint.org IRC #gluon should be able to help you with this.

@wakkomon Found this while searching for the CPE210 v2 support: http://mx.hateotu.de:8025/pipermail/freifunk_info/2017-December/003555.html

I am currently building the image:

git clone -b v2017.1.4  https://github.com/freifunk-gluon/gluon.git gluon
cd gluon
wget https://github.com/FreifunkVogtland/gluon/commit/ffa5a6526f319a43fbe9d0c7721e3c7b87d43dac.patch -O cpe210v2.patch
git am cpe210v2.patch
git clone http://github.com/my-freifunk-community/site.git site
make update
make GLUON_TARGET="ar71xx-generic" GLUON_BRANCH="experimental" DEVICES="tp-link-cpe210-v2.0" -j4
1 „Gefällt mir“

thank you very much that looks like the best way to do it :wink:
i tried it for ffmuc for example like this:

git clone -b v2017.1.4 GitHub - freifunk-gluon/gluon: a modular framework for creating OpenWrt-based firmwares for wireless mesh nodes gluon
cd gluon
wget https://github.com/FreifunkVogtland/gluon/commit/ffa5a6526f319a43fbe9d0c7721e3c7b87d43dac.patch -O cpe210v2.patch
git am cpe210v2.patch
git clone GitHub - freifunkMUC/site-ffm: Freifunk München specific Gluon configuration site
make update
make GLUON_TARGET=„ar71xx-generic“ GLUON_BRANCH=„experimental“ DEVICES=„tp-link-cpe210-v2.0“ -j1 V=s

but i no get following error:

lua: site_config.lua:9: site_config.lua:5: attempt to index a nil value
stack traceback:
[C]: ?
[C]: in function ‚load‘
site_config.lua:9: in main chunk
(command line):1: in main chunk
[C]: ?
stack traceback:
[C]: in function ‚assert‘
site_config.lua:9: in main chunk
(command line):1: in main chunk
[C]: ?

not sure if this is a problem of site configuration, the „attempt to index a nil value“ error seems to be common with lua use but i did not find a solution yet

thanks for suggestion i will get it a try (or is charlemagnelasse next post something like this?)

i did not manage to merge changes but
got different, much easier solution with working freifunk firmware on CPE210v2:

  • used gluon-ffv-b20171221-v-tp-link-cpe210-v2.0-sysupgrade.bin from Files...
  • exchanged /lib/gluon/site.json from my community „ffmuc“ (copied from another ffmuc freifunk router)
  • set different settings by uci manually to be sure
  • not using vpn mesh for the moment, only mesh on lan