Mikael Kanstrup
17fd713bce
Avoid further wait period after reconnect timeout occurs
...
When reconnect timer expires an additional waiting period of half the
timeout period is seen. Skip this extra waiting period when timeout
is detected and perform the connect attempt right away. This change
makes configured reconnect timeout value MQTT_RECONNECT_TIMEOUT_MS
accurate.
2019-02-04 08:44:55 +01:00
David Cermak
f08f3b6787
update log levels, logging complete error code, removed unnecessary struct
2019-01-03 09:14:34 +01:00
David Cermak
06fe5cca8e
mqtt data events fixed to keep consistent msg_id when fragmented message received
...
closes #70
2019-01-03 09:14:34 +01:00
David Cermak
e0bbbebc08
mqtt support for sending fragmented messages and full mqtt message length support
2019-01-03 09:14:34 +01:00
David Cermak
cf5b8eda89
added a fix for incomplete header message received (topic or data could not be resolved from msg)
2019-01-03 09:14:34 +01:00
Laurent Louf
db64b79120
Fix for case where multiple MQTT messages are fitted into a single TCP packet : iterate over the buffer received.
...
Merges https://github.com/espressif/esp-mqtt/pull/82
Closes #64
Closes #80
2019-01-03 09:14:34 +01:00
Tuan
2b49d37f8d
Add BEFORE_CONNECt event and refresh the connection option
2018-11-09 23:26:35 +08:00
David Cermak
8b45c25fdc
corrections per renaming transports to esp_ prefixed
2018-10-16 08:29:47 +02:00
Riccardo Binetti
d2bcdd84a1
Add mutual SSL auth config to mqtt_client
...
picked from master
2018-10-16 08:29:47 +02:00
david-cermak
52cb6980b0
Merge pull request #77 from rbino/session-present
...
Expose the session_present flag in the CONNACK packet
2018-10-16 08:28:55 +02:00
Riccardo Binetti
4db9918220
mqtt_client: add session_present field to mqtt_event
...
Populate it using the CONNACK packet
2018-10-15 11:31:46 +02:00
Riccardo Binetti
a9e796025a
Fix buffer length during connection read
...
Use the in_buffer length instead of the out msg length
2018-10-15 11:26:51 +02:00
Riccardo Binetti
c2f3b9f4b4
Fix bug in esp_mqtt_client_publish message enqueueing
...
We have to enqueue first and then assign to outbound/pending variables,
otherwise the previous pending message is lost and the publish message
is present twice
2018-10-10 14:48:32 +02:00
David Cermak
e26764502a
mqtt_client_stop stops only if started, fixed tabs->spaces, updated README, removed unused config
...
closes #62
2018-10-05 16:01:29 +02:00
David Cermak
85ee406d03
tcp_transport: renamed possibly generic function names to be esp_ prefixed and not to colide with user namespace
2018-10-02 14:18:03 +02:00
David Cermak
d344f928ca
transport: renamed transport headers to avoid compilation collisions
2018-10-02 14:17:54 +02:00
David Cermak
3bbdebcca9
bugfix for longer data on ws transport
2018-08-21 11:55:36 +02:00
David Cermak
0c25441fdd
support for custom implementation of msg outbox
2018-08-21 11:55:36 +02:00
David Cermak
fa7ade77b1
IDF integration: Refactored to common tcp transport component, fixed warnings
2018-08-21 11:55:36 +02:00
Manuel Wick
9e2f69cc17
Fixed QoS2 publishing ( #58 )
...
- Fixed message type check: Previously, it checked for PUBREL, but the
enqueued packet is the PUBLISH packet, hence check for this type in
is_valid_mqtt_msg().
- Moved mqtt_enqueue after the preparation of the packet, so that the
correct message id gets stored (also relevant for QoS1).
2018-08-06 13:19:23 +07:00
Tony
4c19674b16
Adding disconnection if no PINGRESP ( #54 )
...
* Adding disconnection if no pingresp
* Initializing wait_for_ping_resp to false
* Setting wait_for_ping_resp to false if aborting connection or when sending connect
2018-08-06 13:18:12 +07:00
Tony
da573b482b
Adding ESP32 core selection for MQTT task ( #53 )
...
* Adding core selection in KConfig and starting thread with those parameters
* Updating for code consistency
2018-07-25 13:58:38 +07:00
Ivan Aponte
87ef46a9b4
fix some keepalives issues ( #51 )
...
* merge some changes
* fix blocking issue
2018-06-01 23:06:53 +07:00
Tuan PM
75d3c65cb6
Add error handling for mqtt, fixed some issues
2018-05-03 21:50:24 +07:00
Christian Gawron
4bc37bb8db
fix handling of large messages ( #40 )
2018-05-03 20:46:06 +07:00
oldgreen
55f04a8e61
Abort MQTT connection if sending of ping fails ( #30 )
...
* Remove unused code: the state here is always MQTT_STATE_CONNECTED.
Under the assumption that only the esp_mqtt_task can change the client state
(otherwise we are missing a lock around the state usage everywhere).
* Change the return type of esp_mqtt_client_ping from int to esp_err_t.
* Abort the MQTT connection if we can't send ping.
Try to handle the situation when the underlying connection changes and the
sockets have wrong status (see esp-idf/docs/api-guides/wifi.rst).
2018-03-16 19:25:34 +08:00
agmuntianu
5c46be5ada
Crash fixes and ssl connection ( #29 )
...
* add missing config for setting default port for SSL in Kconfig
* free the TCP only after closing the connection , not before
* set the config in the client before we access the schema in the client
* fix typo
* dispatch also Publish event
2018-03-09 22:04:33 +07:00
Tijn Kooijmans
6d8a6c79bd
Fixed length of binary lwt message ( #28 )
...
* changed reconnect timeout to 5 seconds
* changed reconnect timeout to 5 sec
* fixed binary lwt message
* stop reconnect timer to block CPU
* reduced task stack and network timeout
* fixed length of non-string lwt message
2018-03-06 18:12:51 +07:00
Tuan PM
60567cb238
Add vTaskDelay in STATE_WAIT_TIMEOUT, resolve #27
2018-03-02 11:24:27 +07:00
Tuan PM
0d4d269dc3
Add Kconfig, make easy to custom configurations
2018-03-01 23:07:26 +07:00
Tuan PM
2c0db6a669
correct length and malloc storate for lwt binary message
2018-03-01 22:30:25 +07:00
Tuan PM
7e3e296581
reset state when stop
2018-02-27 23:14:09 +07:00
Tuan PM
c9e55caa5b
Merge branch 'master' of https://github.com/tuanpmt/espmqtt
2018-02-27 23:02:40 +07:00
Tuan PM
a5ef145163
check transport before use & close the connection if it connects failed
2018-02-27 23:02:35 +07:00
Tuan
fbf592dec3
Merge pull request #24 from StudioSophisti/master
...
Allow non-string lwt message
2018-02-27 23:00:43 +07:00
Tijn Kooijmans
7322fc79e9
fixed indents and bracets
2018-02-27 16:54:13 +01:00
JasonJiaJie
8c34c8df68
Keppalive issue
...
There is no keepalive packget if current time is very large. Caused by integer overflow.
2018-02-26 16:06:42 +08:00
Tijn Kooijmans
f0f3e11f6b
allow setting of cusom length lwt msg
2018-02-22 13:16:41 +01:00
Tuan PM
dd6969098d
Add default scheme, resolve #21 , remove sdkconfig in examples
2018-02-22 10:07:57 +07:00
Tuan PM
4aaadb333a
fixed wrong msg type in websocket connection
2018-02-17 12:53:17 +07:00
Tuan PM
4fd75c1b4b
Add header license
2018-02-17 11:42:41 +07:00
Tuan PM
66b21752ba
clean session =1, not true
2018-02-17 01:15:15 +07:00
Tuan PM
782e1f8042
Add support ws and wss
2018-02-17 01:03:35 +07:00
Tuan PM
33e2324098
Finishing mqtt client
2018-02-16 22:48:22 +07:00
Tuan PM
3115db19ae
Add mqtt over ssl sample
2018-02-16 22:00:57 +07:00
Tuan PM
503c540eee
remove license header and add doc
2018-02-16 18:46:13 +07:00
Tuan PM
05d2b09b37
do not enqueue with qos=0
2018-02-16 02:50:29 +07:00
Tuan PM
af2de9263f
remove build folder
2018-02-16 02:46:20 +07:00
Tuan PM
083f8789ac
Add support outbox, changed API
2018-02-16 02:40:16 +07:00