No description
Find a file
Xiaofeng Meng 2038670602 bugfix: count dynamic Rule instances during FIND_MAX
Root cause:
handle_instance_without_section() returned empty in BROWSE_FIND_MAX_INST,
so dynamic (UPnP) rules weren’t counted and new static rules reused indices.

Fix:
also allocate/return the instance in FIND_MAX so dynamic instances contribute
 to max_instance and indices remain consistent.
2025-10-01 09:17:42 +02:00
bbfdmd Logging improvements 2025-08-27 16:30:01 +05:30
dm-service Logging improvements 2025-08-27 16:30:01 +05:30
docs Update documentation 2025-03-18 12:56:15 +01:00
gitlab-ci Fix branch name for micro-services 2025-08-06 15:01:46 +05:30
libbbfdm Reboot(): Increase sleep duration after reboot calls to ensure proper system state 2025-04-23 03:31:37 +00:00
libbbfdm-api bugfix: count dynamic Rule instances during FIND_MAX 2025-10-01 09:17:42 +02:00
libbbfdm-ubus Logging improvements 2025-08-27 16:30:01 +05:30
test ubus: Blacklist unsupported or slow methods after repeated failures 2025-05-27 19:54:41 +05:30
tools Fix CI release branch 2025-08-06 13:20:45 +05:30
utilities bbf.config: handle wifi configs reload from external script 2025-06-11 14:08:44 +02:00
.gitignore Fix pipeline 2024-11-15 16:14:42 +05:30
.gitlab-ci.yml Fix CI release branch 2025-08-06 13:20:45 +05:30
CMakeLists.txt Change build type to debug 2025-04-29 09:12:36 +05:30
LICENSE LICENSE: change license to BSD 3-Clause 2023-04-17 11:31:48 +02:00
mkdocs.yml Update documentation 2023-04-18 12:42:29 +05:30
README.md Update documentation 2025-03-18 12:56:15 +01:00

BroadBand Forum Data Models (BBFDM)

bbfdm is a suite to provide a TR181 data model backend for higher-layer management protocols like TR-069/CWMP or TR-369/USP. It is designed in a hardware-agnostic way and provides the available data model parameters over Ubus on the northbound interface and creates the data model mapping based on UCI and Ubus on the southbound interface.

bbfdm has five main components:

Component Description
bbfdmd A daemon to expose data model objects over Ubus
dm-service A daemon to expose data model objects as a microservice over Ubus
libbbfdm-api API library to create and parse data model trees
libbbfdm-ubus API library to expose data model over Ubus
libbbfdm A shared library containing the core data model of TR181, running as a microservice

Directory Structure

bbfdm package is structured as follows:

├── bbfdmd            --  This directory contains daemon code to expose the data model tree on the northbound
│   └── ubus              - Daemon to expose data model over Ubus
├── dm-service        --  This directory contains daemon code to expose the data model tree as a microservice
├── docs              --  More detailed explanation of the data model and user guide
├── gitlab-ci         --  Used for CI/CD pipeline tests
├── libbbfdm          --  Minimal TR181 core data model implementation
├── libbbfdm-api      --  API library to create data model definitions and parse the data model definition to form a data model tree
│   └── legacy            - Legacy version of `libbbfdm-api` containing APIs for creating and parsing data model definitions to build a data model tree  
│   └── version-2         - New version of `libbbfdm-api` with a more flexible and generic implementation, making it easier to use in dm-service and unified daemon
├── libbbfdm-ubus     --  API library to expose data model over Ubus
├── tools             --  Tools to convert XML data model definitions to JSON, generate C code, and more
└── utilities         --  Small helper utilities to complete/optimize the data model deployment

Important Topics

Good To Know

  • The current data model implementation follows the latest version of the data model, version 2.18.

  • Instance alias handling has been moved to the icwmp repository since bbfdm repository only supports the common functionality provided by CWMP and USP protocols.

  • The current data model implementation does not support the delete method for all instances (e.g., Device.Users.User.) since CWMP and USP protocols do not provide support for this operation.

  • The data model implementation uses different directories to store temporary UCI configurations based on the protocol being used. The details are as follows:

Protocol Save Config Directory Config Directory Save Dmmap Directory Dmmap Directory
cwmp /tmp/bbfdm/.cwmp/config /etc/config /tmp/bbfdm/.cwmp/dmmap /etc/bbfdm/dmmap
usp /tmp/bbfdm/.usp/config /etc/config /tmp/bbfdm/.usp/dmmap /etc/bbfdm/dmmap
both /tmp/bbfdm/.bbfdm/config /etc/config /tmp/bbfdm/.cwmp/dmmap /etc/bbfdm/dmmap

Compilation Helper Utilities

Additional Data Model Objects

This repository has a bare minimum TR181 data model integrated. Each service has its own data model additions, which they expose using plugins and microservices.
A list of IOWRT-provided service data model sets is available in tools_input.json.

Dependencies

Build-Time Dependencies

To successfully build bbfdmd, the following libraries are required:

Dependency Link License
libuci https://git.openwrt.org/project/uci.git LGPL 2.1
libubox https://git.openwrt.org/project/libubox.git BSD
libubus https://git.openwrt.org/project/ubus.git LGPL 2.1
libjson-c https://s3.amazonaws.com/json-c_releases MIT
libbbfdm-api https://dev.iopsys.eu/bbf/bbfdm.git BSD-3
libbbfdm-ubus https://dev.iopsys.eu/bbf/bbfdm.git BSD-3

Run-Time Dependencies

To run bbfdmd, the following dependencies are required:

Dependency Link License
ubusd https://git.openwrt.org/project/ubus.git LGPL 2.1
libubox https://git.openwrt.org/project/libubox.git BSD
libjson-c https://s3.amazonaws.com/json-c_releases MIT
libbbfdm-api/version-2 https://dev.iopsys.eu/bbf/bbfdm.git BSD-3

To run dm-service, the following dependencies are required:

Dependency Link License
ubusd https://git.openwrt.org/project/ubus.git LGPL 2.1
libbbfdm-api https://dev.iopsys.eu/bbf/bbfdm.git BSD-3
libbbfdm-ubus https://dev.iopsys.eu/bbf/bbfdm.git BSD-3