Coder Social home page Coder Social logo

emqx-sn's Introduction

emqx-sn

EMQ X MQTT-SN Gateway.

Configure Plugin

File: etc/emqx_sn.conf

## The UDP port which emq-sn is listening on.
##
## Value: IP:Port | Port
##
## Examples: 1884, 127.0.0.1:1884, ::1:1884
mqtt.sn.port = 1884

## The duration(seconds) that emq-sn broadcast ADVERTISE message through.
##
## Value: Second
mqtt.sn.advertise_duration = 900

## The MQTT-SN Gateway id in ADVERTISE message.
##
## Value: Number
mqtt.sn.gateway_id = 1

## To control whether write statistics data into ETS table for dashbord to read.
##
## Value: on | off
mqtt.sn.enable_stats = off

## To control whether accept and process the received publish message with qos=-1.
##
## Value: on | off
mqtt.sn.enable_qos3 = off

## The pre-defined topic name corresponding to the pre-defined topic id of N.
## Note that the pre-defined topic id of 0 is reserved.
mqtt.sn.predefined.topic.0 = reserved
mqtt.sn.predefined.topic.1 = /predefined/topic/name/hello
mqtt.sn.predefined.topic.2 = /predefined/topic/name/nice

## Default username for MQTT-SN. This parameter is optional. If specified,
## emq-sn will connect EMQ core with this username. It is useful if any auth
## plug-in is enabled.
##
## Value: String
mqtt.sn.username = mqtt_sn_user

## This parameter is optional. Pair with username above.
##
## Value: String
mqtt.sn.password = abc
  • mqtt.sn.port
    • The UDP port which emqx-sn is listening on.
  • mqtt.sn.advertise_duration
    • The duration(seconds) that emqx-sn broadcast ADVERTISE message through.
  • mqtt.sn.gateway_id
    • Gateway id in ADVERTISE message.
  • mqtt.sn.enable_stats
    • To control whether write statistics data into ETS table for dashbord to read.
  • mqtt.sn.enable_qos3
    • To control whether accept and process the received publish message with qos=-1.
  • mqtt.sn.predefined.topic.N
    • The pre-defined topic name corresponding to the pre-defined topic id of N. Note that the pre-defined topic id of 0 is reserved.
  • mqtt.sn.username
    • This parameter is optional. If specified, emqx-sn will connect EMQX core with this username. It is useful if any auth plug-in is enabled.
  • mqtt.sn.password
    • This parameter is optional. Pair with username above.

Load Plugin

./bin/emqx_ctl plugins load emqx_sn

Client

NOTE

  • Topic ID is per-client, and will be cleared if client disconnected with broker or keepalive failure is detected in broker.
  • Please register your topics again each time connected with broker.
  • If your udp socket(mqtt-sn client) has successfully connected to broker, don't try to send another CONNECT on this socket again, which will lead to confusing behaviour. If you want to start from beging, please do as following:
    • destroy your present socket and create a new socket to connect again
    • or send DISCONNECT on the same socket and connect again.

Library

sleeping device

PINGREQ must have a ClientId which is identical to the one in CONNECT message. Without ClientId, emqx-sn will ignore such PINGREQ.

pre-defined topics

The mapping of a pre-defined topic id and topic name should be known inadvance by both client's application and gateway. We define this mapping info in emqx_sn.conf file, and which shall be kept equivalent in all client's side.

License

Apache License Version 2.0

Author

EMQ X-Men Team.

emqx-sn's People

Contributors

grutabow avatar huangdan avatar gilbertwong96 avatar rory-z avatar terry-xiaoyu avatar hjianbo avatar emqplus avatar justina111 avatar zmstone avatar tradingtrace avatar callbay avatar turtledeng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.