iot: Add MQTT v3.1.1 packet handling support for Zephyr
This commit adds support for the MQTT protocol v3.1.1.
Specifically, this commit allows a Zephyr application to create
the following MQTT messages:
CONNACK, CONNECT, PUBLISH, PUBACK, PUBREC, PUBREL, PUBCOMP, UNSUBACK,
SUBSCRIBE, SUBACK, UNSUBSCRIBE, PINGREQ, PINGRESP, and DISCONNECT.
Furthermore, the following messages can be parsed by the routines
provided by this commit:
CONNACK, CONNECT, PUBLISH, PUBACK, PUBREC, PUBREL, PUBCOMP, UNSUBACK,
SUBSCRIBE, SUBACK, PINGREQ, PINGRESP and DISCONNECT.
NOTE: client behavior (routines with network access) and QoS will be
integrated in future patches.
The MQTT v3.1.1 specification can be found at:
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html
Origin: Original
Jira: ZEP-365
Jira: ZEP-591
Jira: ZEP-856
Change-Id: Ie0c179370cea22f7554564692bc426a8d5c419d2
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-11-08 12:37:19 +08:00
|
|
|
# Kconfig - MQTT Library for Zephyr
|
|
|
|
|
|
|
|
#
|
|
|
|
# Copyright (c) 2016 Intel Corporation
|
|
|
|
#
|
2017-01-19 09:01:01 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
iot: Add MQTT v3.1.1 packet handling support for Zephyr
This commit adds support for the MQTT protocol v3.1.1.
Specifically, this commit allows a Zephyr application to create
the following MQTT messages:
CONNACK, CONNECT, PUBLISH, PUBACK, PUBREC, PUBREL, PUBCOMP, UNSUBACK,
SUBSCRIBE, SUBACK, UNSUBSCRIBE, PINGREQ, PINGRESP, and DISCONNECT.
Furthermore, the following messages can be parsed by the routines
provided by this commit:
CONNACK, CONNECT, PUBLISH, PUBACK, PUBREC, PUBREL, PUBCOMP, UNSUBACK,
SUBSCRIBE, SUBACK, PINGREQ, PINGRESP and DISCONNECT.
NOTE: client behavior (routines with network access) and QoS will be
integrated in future patches.
The MQTT v3.1.1 specification can be found at:
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html
Origin: Original
Jira: ZEP-365
Jira: ZEP-591
Jira: ZEP-856
Change-Id: Ie0c179370cea22f7554564692bc426a8d5c419d2
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-11-08 12:37:19 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
config MQTT_LIB
|
|
|
|
bool "MQTT Library Support"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Enable the Zephyr MQTT Library
|
iot/mqtt: Add the MQTT high-level API
This commit adds the MQTT high-level API with Quality-of-Service
support. The following MQTT messages are covered by this commit:
CONNECT (tx), DISCONNECT (tx), PUBACK (tx, rx), PUBCOMP (tx, rx),
PUBREC (tx, rx), PUBREL (tx, rx), PUBLISH (tx), PINGREQ (tx),
SUBSCRIBE (tx), UNSUBSCRIBE (tx), CONNACK (rx), PINGRESP (rx),
SUBACK (rx) and UNSUBACK (rx).
Where 'tx' stands for transmission: routines that create and send
messages. 'rx' stands for reception: routines that receive an RX
buffer from the IP stack and parse the MQTT mesage contained in
that buffer.
Jira: ZEP-365
Jira: ZEP-591
Jira: ZEP-856
Change-Id: Ibee701a298127eb713aa3fde5aaf7d089ecd1b9d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-11-14 12:24:45 +08:00
|
|
|
|
|
|
|
config MQTT_MSG_MAX_SIZE
|
|
|
|
int
|
|
|
|
prompt "Max size of a MQTT message"
|
|
|
|
depends on MQTT_LIB
|
|
|
|
default 128
|
|
|
|
range 128 1024
|
|
|
|
help
|
|
|
|
Set the maximum size of the MQTT message. So, no messages
|
|
|
|
longer than CONFIG_MQTT_MSG_SIZE will be processed.
|
|
|
|
|
|
|
|
config MQTT_ADDITIONAL_BUFFER_CTR
|
|
|
|
int
|
|
|
|
prompt "Additional buffers available for the MQTT application"
|
|
|
|
depends on MQTT_LIB
|
|
|
|
default 0
|
|
|
|
help
|
|
|
|
Set some additional buffers. When two or more concurrent contexts are
|
|
|
|
used in the same application, additional buffers may help to have a 1:1
|
|
|
|
relation between application contexts and internal buffers.
|
|
|
|
|
|
|
|
config MQTT_SUBSCRIBE_MAX_TOPICS
|
|
|
|
int
|
|
|
|
prompt "Max number of topics to subscribe to"
|
|
|
|
depends on MQTT_LIB
|
|
|
|
default 1
|
|
|
|
range 1 8
|
|
|
|
help
|
|
|
|
Set the maximum number of topics handled by the SUBSCRIBE/SUBACK
|
|
|
|
messages during reception.
|