1# MQTT-SN Library for Zephyr
2
3# Copyright (c) 2022 René Beckmann
4# SPDX-License-Identifier: Apache-2.0
5
6config MQTT_SN_LIB
7	bool "MQTT-SN Library Support [EXPERIMENTAL]"
8	select EXPERIMENTAL
9	help
10	  Enable the Zephyr MQTT Library
11
12if MQTT_SN_LIB
13
14config MQTT_SN_LIB_MAX_PAYLOAD_SIZE
15	int "Maximum payload size of an MQTT-SN message"
16	default $(UINT8_MAX)
17	range $(UINT8_MAX) $(UINT16_MAX)
18
19config MQTT_SN_LIB_MAX_MSGS
20	int "Number of preallocated messages"
21	default 10
22	range 1 $(UINT8_MAX)
23
24config MQTT_SN_LIB_MAX_TOPICS
25	int "Number of topics that can be managed"
26	default 20
27	range 1 $(UINT8_MAX)
28
29config MQTT_SN_LIB_MAX_TOPIC_SIZE
30	int "Maximum topic length"
31	default 64
32	range 1 $(UINT16_MAX)
33
34config MQTT_SN_LIB_MAX_GATEWAYS
35	int "Maximum number of gateways to store internally"
36	default 2
37	range 1 $(UINT8_MAX)
38
39config MQTT_SN_LIB_MAX_ADDR_SIZE
40	int "Maximum address size for the transport"
41	default 21
42	range 1 $(UINT8_MAX)
43	help
44		The MQTT_SN library stores addresses internally and thus
45		needs to know how long your addresses are. Set this to the maximum
46		length in bytes of the address data structure for your implemented transport.
47
48config MQTT_SN_LIB_BROADCAST_RADIUS
49	int "Radius for broadcast messages"
50	default 1
51	range 1 $(UINT8_MAX)
52
53config MQTT_SN_LIB_MAX_PUBLISH
54	int "Number of publishes that can be in-flight at the same time"
55	default 5
56	range 1 $(UINT8_MAX)
57
58config MQTT_SN_KEEPALIVE
59	int "Maximum number of clients Keep alive time for MQTT-SN (in seconds)"
60	default 60
61	range 1 $(UINT8_MAX)
62	help
63	  Keep alive time for MQTT-SN (in seconds). Sending of Ping Requests to
64	  keep the connection alive are governed by this value.
65
66config MQTT_SN_TRANSPORT_UDP
67	bool "UDP transport for MQTT-SN"
68	select NET_SOCKETS
69
70config MQTT_SN_LIB_N_RETRY
71	int "Number of times to retry messages"
72	range 1 20
73	default 5
74
75config MQTT_SN_LIB_T_RETRY
76	int "Time (seconds) to wait for responses"
77	default 10
78	range 0 $(UINT8_MAX)
79
80config MQTT_SN_LIB_T_SEARCHGW
81	int "Max time (seconds) to wait before sending SEARCHGW"
82	default 10
83	range 0 $(UINT8_MAX)
84
85config MQTT_SN_LIB_T_GWINFO
86	int "Max time (seconds) to wait before sending GWINFO"
87	default 10
88	range 0 $(UINT8_MAX)
89
90config MQTT_SN_LIB_N_ADV
91	int "Number of missed Advertise messages before considering GW lost"
92	default 2
93	range 1 $(UINT8_MAX)
94
95module=MQTT_SN
96module-dep=NET_LOG
97module-str=Log level for MQTT-SN
98module-help=Enables mqtt-sn debug messages.
99source "subsys/net/Kconfig.template.log_config.net"
100
101endif # MQTT_SN_LIB
102