[OpenWrt-Devel] [PATCH] ar71xx: add model detection for UniFi AC-LR

Andreas Ziegler dev at andreas-ziegler.de
Tue Oct 22 16:44:29 EDT 2019


This commit adds correct model detection for UniFi
AC-LR. Previously, said device was incorrectly detected
as UniFi-AC-LITE/MESH.

The Information about the device is stored at 0xC in the EEPROM
partition. It corresponds to the sysid in /etc/board.info of the
Ubiquiti stock firmware.

Signed-off-by: Andreas Ziegler <dev at andreas-ziegler.de>
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++
 target/linux/ar71xx/image/generic-ubnt.mk    | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 03dfbcebf9..044ef4eae5 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -111,6 +111,9 @@ ubnt_unifi_ac_board_detect() {
 	"e517")
 		model="Ubiquiti UniFi-AC-LITE"
 		;;
+	"e527")
+		model="Ubiquiti UniFi-AC-LR"
+		;;
 	"e537")
 		model="Ubiquiti UniFi-AC-PRO"
 		;;
diff --git a/target/linux/ar71xx/image/generic-ubnt.mk b/target/linux/ar71xx/image/generic-ubnt.mk
index 5a4517f81f..6bfe041b80 100644
--- a/target/linux/ar71xx/image/generic-ubnt.mk
+++ b/target/linux/ar71xx/image/generic-ubnt.mk
@@ -138,6 +138,12 @@ define Device/ubnt-unifiac-lite
 endef
 TARGET_DEVICES += ubnt-unifiac-lite
 
+define Device/ubnt_unifiac-lr
+  $(Device/ubnt-unifiac-lite)
+  DEVICE_TITLE := Ubiquiti UniFi AC-LR
+endef
+TARGET_DEVICES += ubnt_unifiac-lr
+
 define Device/ubnt-unifiac-mesh
   $(Device/ubnt-unifiac-lite)
   DEVICE_TITLE := Ubiquiti UniFi AC-Mesh
-- 
2.23.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list