chirpstack / chirpstack-gateway-os

OpenWrt based gateway images including ChirpStack components.

Home Page:https://www.chirpstack.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change default Avahi configuration

omogenot opened this issue · comments

  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary

After system boot, the device shall appear in a bonjour browser in the _workstation._tcp group for easy access. Same shall be done for the _http._tcp group for ChirpStack OS full version.

What is the use-case?

The ChirpStack gateway device will show up as a workstation in bonjour browser and will allow the user to find it easily on the network.
Optionally the ChirpStack gateway will show up as an http Server in bonjour browser for the full edition.

Implementation description

To make device show up in _workstations._tcp group, a change in /etc/avahi/avahi-daemon.conf file, in [publish] section needs to be done: the workstation parameter shall be:
publish-workstation=yes

To add device as an http server in _http._tcp group, you need to add a new file in the /etc/avahi/services/ directory (i.e. /etc/avahi/services/http.service). This file shall contain the following lines:

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_http._tcp</type>
<port>8080</port>
</service>
</service-group>

Can you implement this by yourself and make a pull request?

Unfortunately no. I haven't the skills in Go and in packaging environment.