[PATCH] Add support for Ubiquiti Unifi AP

Christian Dresel fff at chrisi01.de
Sa Aug 6 19:52:56 CEST 2016


hi

On 06.08.2016 17:44, mayosemmel wrote:
> Hallo Helmut,
>
> der GL-AR150 hat 2 Ethernetports.
> Wie schon gesagt,  habe ich die Firmware angepasst, bevor die Lösung für 2 Ports da war.
> Der mit WAN beschriftete Port ist immer WAN. Der Client Port kann sowohl Client als auch Batman sein. Deshalb ist er hier aufgeführt. 
Ich finde bei Geräten wo ein Port eindeutig als WAN beschriftet ist (und
auch blau markiert etc.), macht es auch Sinn das dieser fest WAN ist und
nur der zweite konfigurierbar ist. Was anderes ist es bei der CPE oder
NSM2 (will da nicht mal jmd die FW anpassen ;)) da sind es ja "einfach
nur" 2 Ethernetports.
Ich würde den GL-AR150 eher wie einen 841er/1043er ansehen nur eben
anstatt mit 4 nur mit einem Ethernetport + WAN.

mfg

Christian
> Das im Wiki passt weitgehend:
> -nicht alle Versionen von der Kiste können POE
> -das flashen per failsafe ist sehr umständlich
>
> Ich passe das demnächst noch an.
> Weiterhin wird es bei Gelegenheit ein Update geben, was die Konfiguration von beiden Ports ermöglicht.
>
> Grüße Jan
>
> Am 5. August 2016 20:46:37 MESZ, schrieb "Böhm, Helmut" <helmut.boehm at fau.de>:
>> Hallo Jan,
>>
>> jetzt macht ihr mich bezüglich den Angaben zum GI-AR-150 doch etwas
>> unsicher. Hier ist der AR-150 bei den Geräten aufgelistet, die nur
>> einen Ethernetport haben. Mein aktuelles Gerät hat aber zwei Ports. Ich
>> habe dazu im Wiki eine Installationsanleitung geschrieben und bin davon
>> ausgegangen, der Port 0 sei immer WAN- und der Port 1 ist nach dem
>> Aufspielen der FFF BATMAN und lässt sich dann in /etc/network.mode auch
>> als CLIENT konfigurieren. Was ist denn nun richtig? Kannst Du Dir das
>> im Wiki bitte noch einmal ansehen und notfalls korrigieren? Im Wiki
>> soll ja nichts Falsches stehen.
>>
>> ## For devices only including one ethernet port the specifier is called
>>>  ## ETHMODE. The default mode for these devices is "BATMAN".
>>>  ## For example this is the case for: gl-ar150, tl-mr3020-v1,
>> tl-wa850re-v1,
>>> -## tl-wa860re-v1, ubnt-bullet-m, ubnt-loco-m-xw, ubnt-nano-m
>>> +## tl-wa860re-v1, ubnt-bullet-m, ubnt-loco-m-xw, ubnt-nano-m,
>> ubnt-unifi
>>>  ETHMODE="BATMAN"
>>>  ## Devices featuring 2 ethernet ports are configured by SPECIFIERs
>> ressembling
>>>  ## the labels on the PORT itself. For the cpe210 these are called
>> LAN0 and LAN1.
>>
>> Mit freundlichen Grüßen
>> Helmut
>>
>> Am 05.08.2016 8:22 nachm. schrieb mayosemmel
>> <mayosemmel at googlemail.com>:
>> Hab zwar kein Testgerät, schaut aber gut aus:
>> Reviewed-by: Jan Kraus <mayosemmel at gmail.com>
>>
>> Am Montag, den 25.07.2016, 12:04 +0200 schrieb Christian Dresel:
>>> Signed-off-by: Christian Dresel <fff at chrisi01.de>
>>> ---
>>>  bsp/board_ar71xx.bsp                               |  1 +
>>>  src/packages/fff/fff-boardname/Makefile            |  2 +-
>>>  .../files/etc/uci-defaults/50-fff-boardname        |  3 +++
>>>  src/packages/fff/fff-network/Makefile              |  2 +-
>>>  src/packages/fff/fff-network/ar71xx/network.mode   |  2 +-
>>>  .../fff/fff-network/ar71xx/network.ubnt-unifi      | 29
>> ++++++++++++++++++++++
>>>  6 files changed, 36 insertions(+), 3 deletions(-)
>>>  create mode 100644
>> src/packages/fff/fff-network/ar71xx/network.ubnt-unifi
>>> diff --git a/bsp/board_ar71xx.bsp b/bsp/board_ar71xx.bsp
>>> index f10a7fc..2cd7cf5 100644
>>> --- a/bsp/board_ar71xx.bsp
>>> +++ b/bsp/board_ar71xx.bsp
>>> @@ -21,6 +21,7 @@
>> images=("openwrt-ar71xx-generic-cpe210-220-510-520-squashfs-sysupgrade.bin"
>>>          "openwrt-ar71xx-generic-gl-ar150-squashfs-sysupgrade.bin"
>>>         
>> "openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-sysupgrade.bin"
>>>         
>> "openwrt-ar71xx-generic-ubnt-bullet-m-squashfs-sysupgrade.bin"
>>> +        "openwrt-ar71xx-generic-ubnt-unifi-squashfs-sysupgrade.bin"
>>>         
>> "openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-sysupgrade.bin"
>>>         
>> "openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-sysupgrade.bin"
>>>         
>> "openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-sysupgrade.bin"
>>> diff --git a/src/packages/fff/fff-boardname/Makefile
>> b/src/packages/fff/fff-boardname/Makefile
>>> index c55f92f..edcf12d 100644
>>> --- a/src/packages/fff/fff-boardname/Makefile
>>> +++ b/src/packages/fff/fff-boardname/Makefile
>>> @@ -1,7 +1,7 @@
>>>  include $(TOPDIR)/rules.mk
>>>
>>>  PKG_NAME:=fff-boardname
>>> -PKG_VERSION:=0.0.1
>>> +PKG_VERSION:=0.0.2
>>>  PKG_RELEASE:=1
>>>
>>>  PKG_BUILD_DIR:=$(BUILD_DIR)/fff-boardname
>>> diff --git
>> a/src/packages/fff/fff-boardname/files/etc/uci-defaults/50-fff-boardname
>> b/src/packages/fff/fff-boardname/files/etc/uci-defaults/50-fff-boardname
>>> index 28811a3..2bd8b74 100755
>>> ---
>> a/src/packages/fff/fff-boardname/files/etc/uci-defaults/50-fff-boardname
>>> +++
>> b/src/packages/fff/fff-boardname/files/etc/uci-defaults/50-fff-boardname
>>> @@ -28,6 +28,9 @@ case "$BOARD" in
>>>      bullet-m)
>>>          BOARD=ubnt-bullet-m
>>>          ;;
>>> +    unifi)
>>> +        BOARD=ubnt-unifi
>>> +        ;;
>>>      loco-m-xw)
>>>          BOARD=ubnt-loco-m-xw
>>>          ;;
>>> diff --git a/src/packages/fff/fff-network/Makefile
>> b/src/packages/fff/fff-network/Makefile
>>> index 5ccf301..115abd2 100644
>>> --- a/src/packages/fff/fff-network/Makefile
>>> +++ b/src/packages/fff/fff-network/Makefile
>>> @@ -1,7 +1,7 @@
>>>  include $(TOPDIR)/rules.mk
>>>
>>>  PKG_NAME:=fff-network
>>> -PKG_VERSION:=0.0.3
>>> +PKG_VERSION:=0.0.4
>>>  PKG_RELEASE:=1
>>>
>>>  PKG_BUILD_DIR:=$(BUILD_DIR)/fff-network
>>> diff --git a/src/packages/fff/fff-network/ar71xx/network.mode
>> b/src/packages/fff/fff-network/ar71xx/network.mode
>>> index de16aa3..9112f43 100644
>>> --- a/src/packages/fff/fff-network/ar71xx/network.mode
>>> +++ b/src/packages/fff/fff-network/ar71xx/network.mode
>>> @@ -21,7 +21,7 @@
>>>  ## For devices only including one ethernet port the specifier is
>> called
>>>  ## ETHMODE. The default mode for these devices is "BATMAN".
>>>  ## For example this is the case for: gl-ar150, tl-mr3020-v1,
>> tl-wa850re-v1,
>>> -## tl-wa860re-v1, ubnt-bullet-m, ubnt-loco-m-xw, ubnt-nano-m
>>> +## tl-wa860re-v1, ubnt-bullet-m, ubnt-loco-m-xw, ubnt-nano-m,
>> ubnt-unifi
>>>  ETHMODE="BATMAN"
>>>  ## Devices featuring 2 ethernet ports are configured by SPECIFIERs
>> ressembling
>>>  ## the labels on the PORT itself. For the cpe210 these are called
>> LAN0 and LAN1.
>>> diff --git a/src/packages/fff/fff-network/ar71xx/network.ubnt-unifi
>> b/src/packages/fff/fff-network/ar71xx/network.ubnt-unifi
>>> new file mode 100644
>>> index 0000000..c16993d
>>> --- /dev/null
>>> +++ b/src/packages/fff/fff-network/ar71xx/network.ubnt-unifi
>>> @@ -0,0 +1,29 @@
>>> +WANDEV=eth0
>>> +SWITCHDEV=eth0
>>> +CLIENT_PORTS=""
>>> +WAN_PORTS=""
>>> +BATMAN_PORTS=""
>>> +
>>> +. /etc/network.mode
>>> +
>>> +ETHMESHMAC=
>>> +ROUTERMAC=w2mesh
>>> +
>>> +uci set network.$SWITCHDEV=interface
>>> +uci set network.$SWITCHDEV.ifname=$SWITCHDEV
>>> +uci set network.mesh.ifname="bat0"
>>> +
>>> +if [ "$ETHMODE" = "WAN" ] ; then
>>> +  ## Activate for WAN:
>>> +  echo "net.ipv6.conf.$WANDEV.accept_ra_defrtr = 1" >>
>> /etc/sysctl.conf
>>> +  echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >>
>> /etc/sysctl.conf
>>> +  echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf
>>> +  echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >>
>> /etc/sysctl.conf
>>> +  uci set network.wan.ifname=$WANDEV
>>> +elif [ "$ETHMODE" = "CLIENT" ] ; then
>>> +  ## Activate Client:
>>> +  uci set network.mesh.ifname="bat0 $SWITCHDEV"
>>> +else
>>> +  ## Activate BATMAN:
>>> +  uci set network.ethmesh.ifname="$SWITCHDEV"
>>> +fi
>>> --
>>> 2.1.4
>>>


-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 819 bytes
Beschreibung: OpenPGP digital signature
URL         : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20160806/61641fe5/attachment.sig>


Mehr Informationen über die Mailingliste franken-dev