This builds all SENSORNET types of MQTT-SNGateway
It currently runs the UDP MQTT-SNGateway
The following environment variables need to be set within the Balena environment. These are then set into the MQTT-SN gateway.conf file
Balena Variable | MQTT-SNGateway build |
---|---|
RUN_MQTT_SNGATEWAY | Whether to start up the gateway application |
SENSORNET | [udp (default) / udp6 / xbee / loralink / rfcomm / dtls / dtls6] |
Balena Variable | gateway.conf Setting |
---|---|
ENV_BROKER_NAME | BrokerName |
ENV_BROKER_PORT | BrokerPortNo |
ENV_BROKER_SECURE_PORT | BrokerSecurePortNo |
ENV_GATEWAY_PORT | GatewayPortNo |
ENV_MULTICAST_IPV6_PORT | GatewayIPv6PortNo |
ENV_MULTICAST_IPV6 | MULTICAST_IPV6 |
ENV_MULTICAST_IPV6_IF | MulticastIPv6If |
ENV_MULTICAST_HOPS | MulticastHops |
You can use the code here to publish and subscribet to messages flowing through the MQTT-SN broker
https://github.com/njh/mqtt-sn-tools
$ ./mqtt-sn-sub -h $LOCAL_IP_ADDRESS -p 10000 -t sensor -v
$ ./mqtt-sn-pub -h $LOCAL_IP_ADDRESS -p 10000 -t sensor -m Hello
- Add more environment variables for configuring upstream broker / port etc.
- Currently runs in host network mode. Need to look at configuring up custom network in
docker-compose.yml