-
Notifications
You must be signed in to change notification settings - Fork 24
3. Configuration
Note: Beaconing APRS positions for connected peers (hotspots and repeaters) is not compatible with FreeDMR or HBlink. GPS positions and SMS from radios will work.
This section describes how to configure and use the data gateway with an existing HBlink or FreeDMR installation. Before starting, please read the Foundation page, specifically Operation as this pertains to running the data gateway. We will be using the HBNet web service as there is a data gateway dashboard mode.
-
Install HBNet. See Installation.
-
In the freshly cloned repository is a directory called web, we will be modifying the configuration for the web service next. Use your favorite text editor to edit
web/config-SAMPLE.py
. Changemode
in the configuration toDASH_ONLY
. This will hide all of the non relevant things and only display options and pages relevant to DMR data and APRS. This option is designed for use with FreeDMR and HBLink. If you are using the data gateway with HBNet, set mode to FULL. Changetitle
to your liking. Sethws_host
andhws_port
to match your set up.url
must be the accessible URL, this is used when generating certain pages in the web service. Create a random string, such as an SHA256 and setkey
to match. -
There are other variables that you may set in the web service configuration, set them to your liking. Note:
append_int
,burn_int
,extra_int
,use_short_passphrase
and similar variables DO NOT apply to the data gateway. Leave these as default. -
Look for data_gateway-SAMPLE.cfg and copy it as data_gateway.cfg. This is extremely similar to HBlink configuration files. Use your favorite text editor to open it and modify. Locate
[WEB_SERVICE]
.THIS_SERVER_NAME:
is the name of your data gateway, DATA_GATEWAY or similar is fine. SetREMOTE_CONFIG_ENABLED
to True to use the web service as a dashboard.URL
is the location of the web service. Must have /svr at the end of the URL.SHARED_SECRET
is the password that the data gateway will use to access the web service. -
Look for data_gateway-SAMPLE.cfg and copy it as data_gateway.cfg. Use your favorite text editor to open it and modify. Locate
[DATA_CONFIG]
. Change the following to your liking:
-
DATA_DMR_ID
- DMR ID of the data gateway, can be multiple separated by comma. This is where radios send GPS positions or SMS messages. - `CALL_TYPE1 - Call type for GPS positions. Can be unit, group, or both.
-
USER_APRS_SSID
- Default APRS SSID for users who don't have a custom SSID. -
USER_APRS_COMMENT
- Default APRS comment for users who don't have a custom comment. -
APRS_SERVER
,APRS_PORT
,APRS_LOGIN_CALL
,APRS_LOGIN_PASSCODE
, andAPRS_FILTER
- Login details for an APRS server. Note: SettingAPRS_LOGIN_CALL
to N0CALL will disable all APRS functionality.
All of the IGATE_
variables have to do with causing the data gateway to upload a position packet to APRS-IS. Sites such as aprs.fi will see the data gateway as an iGate and will keep statistics. IGATE_BEACON_TIME is how often a position is sent. This is also how often positions for connected PEERs (hotspots and repeaters) will be sent to APRS-IS. Time in minutes.
The MQTT vairables are for use with External Applications. An external application is a service or other network that can be used via SMS. The data gateway can be connected to 2 MQTT servers at the same time.
-
GATEWAY_CALLSIGN
- Callsign of the data gateway. Similar to APRS, the callsign must be unique on the server. -
URL
- URL where people can go to find out more about your DMR network -
DESCRIPTION
- Simple description of your DMR network to display on External Services page.
By default MQTT_SERVER
, MQTT_PORT
, MQTT_USERNAME
, and MQTT_PASSWORD
are set to use the Community External Applications. Leave them as default if you would like to use the community external applications. Note: Setting GATEWAY_CALLSIGN
to N0CALL will disable use of external applications.
MQTT_SERVER2
, MQTT_PORT2
, MQTT_USERNAME2
, and MQTT_PASSWORD2
are for use with a different MQTT server, such as a private MQTT server containing a radio club email gateway, etc. Leave blank to disable.
- Change the rest of the configuration file to match your needs, and add connections to match you needs.
- HBlink: The preferred method of connecting the data gateway to your HBlink server is via OpenBridge. Create an OpenBridge connection that points to your HBlink server.
- FreeDMR: Create a PEER connection to your FreeDMR server. It should connect to a MASTER named D-APRS. If you haven't already, create a MASTER stanza in your FreeDMR config and name it [D-APRS].
-
You have now finished setting up the file configuration. This is what will happen if the web service is unreachable. Remember from the Foundation page that the data gateway will request a configuration on start up. It is now time to add a configuration in the web service for the data gateway. Yes, I know this may seem unnecessarily redundant, but this is required if you want to use the web service as a dashboard. Think of data_gateway.cfg as what happens when the web service goes down, a "back up mode".
-
Start the web service:
python3 app.py
Default admin login is admin / admin. Create a server configuration by going to Admin > Manage Servers, then Add Server Config. Enter a name for your gateway and a server secret. Both of these need to match what is in [WEB_SERVICE] of your data_gateway.cfg file. Dashboard URL, host, and unit call timeout do not apply to the data gateway. Finish filling out the fields to your needs. The defaults should be OK. Click Save. -
Once you are back at the Manage Servers page, click on the name of the server you just created. Then go to "Add options for data gateway". Fill out the form to match what you put in [DATA_CONFIG] in data_gateway.cfg, then save.
-
Now we are going to set up connections in the web service, similar to step 6.
- HBlink: Go to Admin > Manage Masters and click on Add OpenBridge. Fill out the form to connect to your HBlink server. Note: Leave Encryption_key blank and set Encrypt all traffic to False. Those only apply to HBNet.
- FreeDMR: Go to Admin > Manage Peers. Click on Add MMDVM Peer and fill out the form to connect to your FreeDMR server. Make sure Enable Unit Calls is set to True.
- Start the data gateway:
python3 data_gateway.py