-
Notifications
You must be signed in to change notification settings - Fork 24
1. Foundation
HBNet is a fork of HBlink3 that extends the functionality of HBLink through several features, making it more of a usable application and less of a framework. HBNet aims to be complete and ready to use application that can be used to build and run a DMR network. HBNet is an application designed to build and operate a DMR server, or multiple servers to form a network.
HBNet can be divided into the following 3 components:
- Web Service - Handles administrative configuration, user management, APPS and data dashboard, etc.
- Core (hbnet.py) - This is a modified version of bridge.py from HBLink3. This is the core of HBNet.
- Data Gateway (data_gateway.py) - This handles all of the GPS/SMS/APRS/data functions from user radios.
The web service is a web based application written in Python3 and uses several modules, primarily Flask. It is responsible for managing server configurations, handling user access, generating the APRS/data dashboard, and several other functions. Back end storage is done either by sqlite or MySQL.
This is a modified version of bridge.py from HBLink3. It handles hotspot/repeater connections and call routing.
Formerly known as gps_data, the Data Gateway (data_gateway.py) is where all of the decoding happens for GPS locations and SMS messages. The data gateway also connects to APRS-IS and listens for incoming messages to users.
When the core (hbnet.py) or data gateway (data_gateway.py) starts, it contacts the web service via HTTP POST and requests its configuration. The web service can store several configurations for different servers. Once the core (hbnet.py) or data gateway (data_gateway.py) has downloaded its configuration, it is ready for operation. If the web service is unreachable, the core (hbnet.py) or data gateway (data_gateway.py) will default to the configuration file (hbnet.cfg) and rule configuration (rules.py).
The configuration file for the core (hbnet.py) contains an extra section called [WEB_SERVICE], not found in HBLink. This section contains the URL of the web service, server name and secret, and settings for generated passphrases (see PEER Authentication for more on this).
Any time a change is made to a server in the web service, the core (hbnet.py) or data gateway (data_gateway.py) must be restarted for the changes to take effect.
Essentially, the configuration files (hbnet.cfg and rules.py) take effect when the web service is down. Think of it as a "back up mode" or "emergency mode". The web service contains a tool for importing and exporting rules, making it easier to have a consistent configuration.
The Data Gateway connects to HBNet via OpenBridge (or an MMDVM) connection. This will be the same for both FreeDMR and HBLink as well. HBNet is not required for the data gateway, meaning it is compatable with HBlink and FreeDMR.