Compare commits

...

5 Commits

Author SHA1 Message Date
vdutta
be799bf3e4 Ticket#460: Update get and operate command in uspd 2019-04-17 15:35:56 +02:00
vdutta
fd0331625c Ticket#460: Updated output format of uspd 2019-04-17 15:35:56 +02:00
vdutta
faae36fa20 Ticket#460: Updated search by reference logic in uspd 2019-04-17 15:35:56 +02:00
vdutta
ba1a626f09 Ticket#460: Added operate in uspd 2019-04-17 15:35:56 +02:00
vdutta
c2ffdbe815 Ticket-460: USP extention for TR-069
Description:
 - First draft of the changes

Test Done:
 - Below ubus call tested
   ubus call usp get '{"path":"Device.WiFi.SSID.[BSSID==\"00:22:07:6D:5E:DD\"].SSID"}'
   ubus call usp get '{"path":"Device.IP.Interface.*.IPv4Address.*.IPAddress"}'
   ubus call usp get '{"path":"Device.WiFi.AccessPoint.[SSIDReference+BSSID==\"00:22:07:6D:5E:DD\"].SSID"}'
   ubus call usp set '{"path":"Device.WiFi.AccessPoint.[SSIDReference+BSSID==\"00:22:07:6D:5E:D\"].SSID", "value":"Test-2G"}'

Not Covered:
 - Operate command
 - Alias based addressing
 - Searching with List of References
2019-04-17 15:35:56 +02:00
2 changed files with 65 additions and 0 deletions

46
usp/Makefile Normal file
View File

@@ -0,0 +1,46 @@
#
# Copyright (C) 2019 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=uspd
PKG_VERSION:=1.0.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=64f39a5041da3d6c0a45cbc901dea3bd062d96fe
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/uspd.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/uspd
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR069 extention for USP
DEPENDS:=+libubox +ubus +icwmp-curl
endef
define Package/uspd/description
Ubus based backend for TR-369/USP which can be used by other USP agents
running on top of it.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE
#define Build/Prepare
# $(CP) -rf ./uspd/* $(PKG_BUILD_DIR)/
#endef
define Package/uspd/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/uspd.init $(1)/etc/init.d/uspd
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uspd $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,uspd))

19
usp/files/uspd.init Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/sh /etc/rc.common
START=94
STOP=10
USE_PROCD=1
PROG=/usr/sbin/uspd
start_service() {
procd_open_instance
procd_set_param command ${PROG}
procd_set_param respawn
procd_close_instance
}
reload_service() {
stop
start
}