Skip to content

DynamicDevices/mqttsn-gateway-block

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Balena block support for Paho MQTT-SN Gateway

This builds all SENSORNET types of MQTT-SNGateway

balena deploy button

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

Testing

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

To Subscribe to 'sensor' topic

$ ./mqtt-sn-sub -h $LOCAL_IP_ADDRESS -p 10000 -t sensor -v

To Publish to 'sensor' topic

$ ./mqtt-sn-pub -h $LOCAL_IP_ADDRESS -p 10000 -t sensor -m Hello

TODO

  • 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

About

Block implementing the Paho MQTT-SN Gateway

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages