Compare commits

..

12 Commits

Author SHA1 Message Date
Sukru Senli
671bdd8fc3 bbf-1.0-2019-12-28 2020-01-07 11:38:15 +01:00
vdutta
bcdb8eed33 ieee1905: Add get_topology command 2020-01-02 19:09:18 +05:30
vdutta
bb7429e8ad ieee1905: Pretty print multiAP cmdu events 2019-12-30 19:22:09 +05:30
Amin Ben Ramdhane
0ebc773b80 bbf: use src local if the src folder exists 2019-12-28 13:23:53 +01:00
Amin Ben Ramdhane
ec435e51d7 icwmp: remove unused library 2019-12-28 13:16:00 +01:00
vdutta
87ad324123 ieee1905: Generating topology/push button event
- Generating topology change event on ubus "client" event
 - Generating push button event on ubus "wifi.wps", "in-progress" event
2019-12-24 15:11:14 +05:30
vdutta
962ffd4969 ieee1905: Added configure Discovery timer uci option 2019-12-24 13:01:41 +05:30
vdutta
a142e4ebfc ieee1905: Added support for 1905 multiap extensions 2019-12-23 17:45:11 +05:30
Anjan Chanda
0cbc3072d1 wifimngr: 2.5.0 2019-12-18 15:25:48 +01:00
Anjan Chanda
d1ba7e337a easy-soc-libs: version-2.5.0 2019-12-18 15:22:56 +01:00
vdutta
6d9c4195be meshcomms: Removing meshcomms pkg
- Removing meshcomms pkg as functionality moved in ieee1905
2019-12-18 19:00:57 +05:30
vdutta
f304a43ecf ieee1905: MultiAP code segregation 2019-12-16 19:40:45 +05:30
11 changed files with 55 additions and 277 deletions

View File

@@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libbbfdm
PKG_VERSION:=1.0-2019-12-10
PKG_VERSION:=1.0-2019-12-28
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=0ea0b2c89a51ad56ca76d171b7fd5dcf38e102cd
PKG_SOURCE_VERSION:=87df7048821fb8a6dcd35f0959f97aa08688f53b
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -36,6 +36,13 @@ define Package/libbbfdm/description
Test description will update later.
endef
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
ifneq ($(USE_LOCAL),)
define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += -DCUSTOM_PREFIX=\\\"$(CONFIG_LIBBBFDM_VENDOR_PREFIX)\\\"
TARGET_CFLAGS += \

View File

@@ -2,18 +2,18 @@
# Copyright (C) 2019 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
#
#
include $(TOPDIR)/rules.mk
PKG_NAME:=easy-soc-libs
PKG_VERSION:=2.4.1
PKG_VERSION:=2.5.0
PKG_RELEASE:=1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=0accbd7266b2742ad8921edd5dab974fc384a49a
PKG_SOURCE_VERSION:=6bf3911521b6c9072c20798c59390280afd0f16f
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
@@ -39,12 +39,6 @@ define Package/libwifi/config
source "$(SOURCE)/Config.in"
endef
define Package/libeasy
$(call Package/easy-soc-libs)
TITLE:= Helper and utility functions library (libeasy)
DEPENDS+=+libnl +libnl-route
endef
define Package/libwifi
$(call Package/easy-soc-libs)
TITLE:= WiFi library (libwifi)
@@ -94,8 +88,7 @@ endef
subdirs := \
$(if $(CONFIG_PACKAGE_libwifi),libwifi) \
$(if $(CONFIG_PACKAGE_libdsl),libdsl) \
$(if $(CONFIG_PACKAGE_libethernet),libethernet) \
$(if $(CONFIG_PACKAGE_libeasy),libeasy)
$(if $(CONFIG_PACKAGE_libethernet),libethernet)
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
@@ -115,13 +108,6 @@ define Build/Prepare
endef
endif
define Build/InstallDev/libeasy
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libeasy/easy.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libeasy/libeasy.so* $(1)/usr/lib/
endef
define Build/InstallDev/libwifi
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
@@ -154,11 +140,6 @@ define Build/InstallDev
$(foreach dir,$(subdirs),$(call Build/InstallDev/$(dir),$(1),$(2));)
endef
define Package/libeasy/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libeasy/libeasy.so* $(1)/usr/lib/
endef
define Package/libwifi/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi*.so* $(1)/usr/lib/
@@ -181,4 +162,3 @@ endef
$(eval $(call BuildPackage,libwifi))
$(eval $(call BuildPackage,libdsl))
$(eval $(call BuildPackage,libethernet))
$(eval $(call BuildPackage,libeasy))

View File

@@ -43,7 +43,7 @@ define Package/icwmp_xmpp
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 xmpp feature
DEPENDS:=+libuci +libubox +libexpat +libstrophe
DEPENDS:=+libuci +libstrophe
endef
define Package/icwmp_twamp

View File

@@ -5,10 +5,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=1.1.0
PKG_VERSION:=1.1.4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=3008fe46ee9247f0203b3a125fddebadbdd7dcdc
PKG_SOURCE_VERSION:=5f3cdad5c0ee41464b5699565e0175611dc9d070
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
@@ -20,7 +20,7 @@ define Package/ieee1905
SECTION:=utils
CATEGORY:=Utilities
TITLE:=IEEE1905 handler
DEPENDS:= +libwifi +ubox +libpicoevent +libpcap +libopenssl +libuci +libjson-c
DEPENDS:= +ubox +libpicoevent +libpcap +libopenssl +libuci +libjson-c
endef
define Package/ieee1905/description
@@ -33,8 +33,9 @@ TARGET_CFLAGS += \
-DSEND_EMPTY_TLVS \
-DFIX_BROKEN_TLVS \
-DSPEED_UP_DISCOVERY \
-DREGISTER_EXTENSION_BBF
#-DDO_NOT_ACCEPT_UNAUTHENTICATED_COMMANDS \
-DREGISTER_MULTIAP_FEATURE \
-DDO_NOT_ACCEPT_UNAUTHENTICATED_COMMANDS
#-DREGISTER_EXTENSION_BBF
#define Build/Prepare
# $(CP) -rf ./ieee1905/* $(PKG_BUILD_DIR)/
@@ -43,10 +44,7 @@ TARGET_CFLAGS += \
define Package/ieee1905/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/hotplug.d
$(INSTALL_DIR) $(1)/etc/hotplug.d/button
$(INSTALL_BIN) ./files/etc/init.d/ieee1905 $(1)/etc/init.d/ieee1905
$(INSTALL_BIN) ./files/etc/hotplug.d/button/11-ieee1905 $(1)/etc/hotplug.d/button/11-ieee1905
$(INSTALL_DATA) ./files/etc/config/ieee1905 $(1)/etc/config/ieee1905
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib

View File

@@ -6,34 +6,38 @@ config meshcomms 'global'
option enabled '1'
option basemacint 'wan'
option mapall true
# option registrar 'rai0'
# option registrar 'wl0'
option debug_level 2
option port 8888
option cmdu_event false
option discovery_timer 300
#config al-iface
# option enabled '1'
# option ifname 'br-lan'
# option media 'bridge'
# option media '802_3U'
# option manufacturer_name 'Broadcom'
# option model_name 'Eth EG400'
# option model_number '00002'
# option device_name 'EG400R1'
# option serial_number '1234'
#config al-iface
# option enabled '1'
# option ifname 'wl0'
# option media 'ap'
# option manufacturer_name 'Mediatek'
# option model_name 'WIFI EX400'
# option media '802_11N5'
# option manufacturer_name 'Broadcom'
# option model_name 'WIFI EG400'
# option model_number '00001'
# option device_name 'EX400R0'
# option device_name 'EG400R1'
# option serial_number '1235'
#config al-iface
# option enabled '1'
# option ifname 'wl1'
# option media 'ap'
# option manufacturer_name 'Mediatek'
# option model_name 'WIFI EX400'
# option media '802_11N2'
# option manufacturer_name 'Broadcom'
# option model_name 'WIFI EG400'
# option model_number '00001'
# option device_name 'EX400R0'
# option device_name 'EG400R1'
# option serial_number '1236'

View File

@@ -1,36 +0,0 @@
#!/bin/sh
TOPOLOGY_FILE="/tmp/topology_change"
WPS_FILE="/tmp/virtual_push_button"
handle_topology_change() {
[ -f ${TOPOLOGY_FILE} ] && \
touch ${TOPOLOGY_FILE}
}
handle_wps() {
[ -f ${WPS_FILE} ] && \
touch ${WPS_FILE}
}
case "$ACTION" in
add|register)
[ "wifibutton" == "$INTERFACE" -o "ecobutton" == "$INTERFACE" ] && {
handle_wps
}
[ "wifi_2g" == "$INTERFACE" ] && {
handle_wps
}
[ "wifi_5g" == "$INTERFACE" ] && {
handle_wps
}
[ "wpsbutton" == "$INTERFACE" ] && {
handle_wps
}
[ "wpscbutton" == "$INTERFACE" ] && {
handle_topology_change
}
;;
remove|unregister)
;;
esac

View File

@@ -18,7 +18,8 @@ validate_global_section()
'mapall:bool:true' \
'debug_level:uinteger:5' \
'port:port:8888' \
'cmdu_event:bool:true'
'cmdu_event:bool:true' \
'discovery_timer:uinteger:60'
}
validate_ieee1905_section()
@@ -50,7 +51,7 @@ get_interface_mac() {
local rest=$(echo $basemac |cut -d : -f 2-)
# Set local bit
first=$((first|2))
first=$(printf "%x" $first)
first=$(printf "%02x" $first)
basemac="${first}:${rest}"
echo ${basemac}
}
@@ -64,12 +65,13 @@ validate_al_section()
'manufacturer_name:string:iopsys' \
'model_name:string' \
'model_number:string' \
'device_name:string'
'device_name:string' \
'serial_number:string'
}
configure_interface()
{
local ifname media enabled manufacturer_name model_name model_number device_name
local ifname media enabled manufacturer_name model_name model_number device_name serial_number
validate_al_section ${1} || {
echo "Validation of global section failed"
return 1;
@@ -85,6 +87,14 @@ configure_interface()
INTERFACE="${INTERFACE},${ifname}"
fi
local uuid=$(cat /proc/sys/kernel/random/uuid)
local ifindex=$(cat /sys/class/net/${ifname}/upper_*/ifindex 2>/dev/null)
if [ -z ${ifindex} ]; then
ifindex=$(cat /sys/class/net/${ifname}/ifindex)
fi
echo "Interface ${ifname} ifindex |${ifindex}|" >>/dev/console
json_add_object
json_add_string ifname ${ifname}
json_add_string media ${media}
@@ -92,12 +102,15 @@ configure_interface()
json_add_string model_name ${model_name}
json_add_string model_number ${model_number}
json_add_string device_name ${device_name}
json_add_string serial_number ${serial_number}
json_add_string uuid ${uuid}
json_add_int ifindex ${ifindex}
json_close_object
}
configure_meshcomms()
{
local enabled almac basemacint mapall debug_level port l3device basemac intf registrar cmdu_event
local enabled almac basemacint mapall debug_level port l3device basemac intf registrar cmdu_event discovery_timer
validate_global_section global || {
echo "Validation of global section failed"
@@ -137,6 +150,7 @@ configure_meshcomms()
json_add_int debug_level ${debug_level}
json_add_int port ${port}
json_add_int cmdu_event ${cmdu_event}
json_add_int discovery_timer ${discovery_timer}
json_close_object
json_dump >${MESH_CONF}

View File

@@ -1,67 +0,0 @@
#
# Copyright (C) 2019 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=meshcomms
PKG_VERSION:=1.0.2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=72048b609104a5479ac2cdae21d5d1f733fd2bc3
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/meshcomms.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=BSD2+Patent
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/meshcomms
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Mesh agent
DEPENDS:=+libpcap +libopenssl +libubox +libubus +libblobmsg-json
endef
define Package/meshcomms/description
meshComms is an open source implementation of IEEE 1905.1a that is an output
of the Broadband Forum Open Broadband - Multi Access Point (OB-MAP) project.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE
# -DDO_NOT_ACCEPT_UNAUTHENTICATED_COMMANDS
#define Build/Prepare
# $(CP) -rf ./meshcomms/* $(PKG_BUILD_DIR)/
#endef
define Package/meshcomms/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(STAGING_DIR)/usr/lib
$(INSTALL_DIR) $(STAGING_DIR)/usr/include
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/meshcomms
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/meshcomms/common
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/meshcomms/bbf
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/meshcomms/al
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/meshcomms/factory
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/meshcomms.conf $(1)/etc/config/meshcomms
$(INSTALL_BIN) ./files/meshcomms.init $(1)/etc/init.d/meshcomms
$(INSTALL_BIN) $(PKG_BUILD_DIR)/output/al_entity $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/output/libmeshcomms.so $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/output/libmeshcomms.so $(STAGING_DIR)/usr/lib
$(CP) $(PKG_BUILD_DIR)/include/meshcomms.h $(STAGING_DIR)/usr/include/meshcomms/
$(CP) $(PKG_BUILD_DIR)/src/common/interfaces/*.h $(STAGING_DIR)/usr/include/meshcomms/
$(CP) $(PKG_BUILD_DIR)/src/factory/interfaces/*.h $(STAGING_DIR)/usr/include/meshcomms/
$(CP) $(PKG_BUILD_DIR)/src/factory/interfaces/extensions/bbf/*.h $(STAGING_DIR)/usr/include/meshcomms/
$(CP) $(PKG_BUILD_DIR)/src/al/internal_interfaces/*.h $(STAGING_DIR)/usr/include/meshcomms/
endef
$(eval $(call BuildPackage,meshcomms))

View File

@@ -1,8 +0,0 @@
config meshcomms 'global'
option basemacint 'wan'
list interfaces 'lan'
list interfaces 'wan'
option mapall true
option debug false
option port 8888

View File

@@ -1,105 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
STOP=10
USE_PROCD=1
PROG=/usr/sbin/al_entity
validate_global_section()
{
uci_validate_section meshcomms meshcomms "${1}" \
'basemacint:string:wan' \
'interfaces:string:lan' \
'mapall:bool:true' \
'debug:bool:true' \
'port:port:8888'
}
get_device_name() {
local device
# Get wan L3 interface
ubus list |grep -iq network.interface.${1}
if [ "$?" -eq 0 ]; then
json_load "$(ubus -t 2 call network.interface.${1} status)"
json_get_var device device
echo ${device}
fi
}
get_interface_mac() {
local l3 basemac
l3=$(get_device_name ${1})
if [ -n ${l3} ]; then
json_load "$(ubus -t 2 call network.device status "{\"name\":\"${l3}\"}")"
json_get_var basemac macaddr
fi
echo ${basemac}
}
configure_meshcomms()
{
local basemacint interfaces mapall debug port l3device basemac intf
validate_global_section global || {
echo "Validation of global section failed"
return 1;
}
if [ ${debug} -eq 1 ]; then
# Forward stdout of the command to logd
procd_set_param stdout 1
# Same for stderr
procd_set_param stderr 1
fi
basemac=$(get_interface_mac ${basemacint})
for f in ${interfaces}
do
local l3=$(get_device_name $f)
intf="${intf} ${l3}"
done
intf=$(echo $intf|sed 's/ /,/g')
[ -z "${intf}" ] && \
echo "interface list is empty/invalid">/dev/console \
return 1
procd_append_param command -m ${basemac} -i ${intf}
[ "${debug}" -eq 1 ] && \
procd_append_param command -vv
[ "${mapall}" -eq 1 ] && \
procd_append_param command -w
[ ${port} -ne 8888 ] && \
procd_append_param command -p ${port}
}
configure_network() {
ebtables -L FORWARD|grep -iqE "1:80:C2:(0)+:(0)+:13.*-j.*DROP"
if [ "$?" -ne 0 ]; then
echo "Applying drop rule to drop pkts forwared by kernel to 1905.1 multicast mac"
ebtables -A FORWARD -d 01:80:c2:00:00:13 -j DROP
fi
config_load meshcomms
config_foreach configure_meshcomms meshcomms
}
start_service() {
procd_open_instance meshcomms
procd_set_param command ${PROG}
configure_network
procd_set_param respawn
procd_close_instance
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger "network"
}

View File

@@ -5,10 +5,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wifimngr
PKG_VERSION:=2.4.0
PKG_VERSION:=2.5.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4b876ccabc1df73202bfb165b35fd6464ed019aa
PKG_SOURCE_VERSION:=00e29842d8082a6240fbdb3bbceb36b09dc53861
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
@@ -38,15 +38,6 @@ TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
#MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FPIC="$(FPIC)"
#define Build/Compile
# +$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS)
#endef
define Package/wifimngr/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/wifimngr.init $(1)/etc/init.d/wifimngr