Commit Graph

192 Commits

Author SHA1 Message Date
Gregory Eslinger
7223302deb MQTT Client: Check for connection before sending disconnect message
Closes https://github.com/espressif/esp-idf/issues/3619
Closes https://github.com/espressif/esp-mqtt/issues/120
Merges https://github.com/espressif/esp-mqtt/pull/118

Signed-off-by: David Cermak <cermak@espressif.com>
2019-06-27 16:33:58 +02:00
David Cermak
11f884623b Merge branch 'idf' to 'master'
Integration of ESP-MQTT to IDF

See merge request idf/esp-mqttmake
2019-06-10 14:51:27 +02:00
David Čermák
9b003d3504 Merge branch 'bugfix/ci_update' into 'idf'
mqtt ci update (both Gitlab and GitHub)

See merge request idf/esp-mqtt!31
2019-06-07 13:37:28 +08:00
David Cermak
971bf47e14 outbox: suppress clang-tidy warning of using ptr after free (no possible for STAILQ structure), removed unnecessary print 2019-06-06 17:00:03 +02:00
David Cermak
a4d1ef8d79 ci: employ new static analysis utilities 2019-06-06 17:00:03 +02:00
David Cermak
edd67e1c8c used event loop only if defined in supported features (enabled by macros) for backward compatibily with older IDFs 2019-06-06 17:00:03 +02:00
David Cermak
5afe3e6b24 ci: internal ci step for building with legacy idf to avoid travis failures 2019-06-06 16:59:58 +02:00
David Čermák
94f87b98dd Merge branch 'bugfix/ws_subprotocol_mqtt' into 'idf'
Add mqtt sub protocol for websocket

See merge request idf/esp-mqtt!23
2019-06-04 18:53:06 +08:00
David Cermak
48cd04baf1 defined macros for supported features in esp-idf based on idf version 2019-05-29 14:05:49 +02:00
Tuan
a6f8716fff Add mqtt sub protocol for websocket 2019-05-24 09:29:31 +02:00
David Čermák
e205913b2c Merge branch 'bugfix/strict_prototypes' into 'idf'
fix warnings when compiling with `-Wstrict-prototypes`

See merge request idf/esp-mqtt!20
2019-05-17 20:49:38 +08:00
Ivan Grokhotkov
2ef78857e9 fix -Wstrict-prototypes issues 2019-05-17 14:36:44 +02:00
David Čermák
b263e44777 Merge branch 'feature/new_event_loop' into 'idf'
support for esp event loop library while keeping backward compatible mode if callback configured

See merge request idf/esp-mqtt!28
2019-05-16 22:44:13 +08:00
David Cermak
eeebd0215c support for esp event loop library while keeping backward compatible mode if callback configured 2019-05-16 16:29:33 +02:00
David Čermák
6f1fc3785a Merge branch 'feature/reliability_improvemnts' into 'idf'
MQTT reliability improvemnts

See merge request idf/esp-mqtt!30
2019-05-16 03:00:07 +08:00
David Cermak
18b6f2c582 Fixed formatting for all files to comply with idf style formats 2019-05-15 13:40:14 +02:00
David Cermak
e442c19f4e Added API documentaton to public headers 2019-05-15 13:40:14 +02:00
David Cermak
1d294f7606 ci: github build esp-mqtt with more stable IDF (latest release version rather then master)
fixed also internal ci: use the same git command for buld and static analysis (reset --hard instead of checkout)
2019-05-15 13:40:14 +02:00
David Cermak
60cdb79a67 mqtt_msg: avoid uncasting const to mqtt topic and data pointers 2019-05-15 13:40:14 +02:00
João Cabral
db71c753aa FIX: mqtt_get_id wrong logic on msg size checks.
This error was preventing the function from returning the right msg ID,
returning always 0.
2019-05-15 13:40:14 +02:00
David Cermak
d159bf4575 support for publishing message with empty data 2019-05-15 13:40:08 +02:00
David Cermak
891646681e client_init: fix crashing client upon wrong parameters, init or deinit
Closes https://github.com/espressif/esp-idf/issues/3191
2019-05-15 13:37:51 +02:00
David Cermak
35fc42d2b9 mqtt_msg: added missing message type for unsubscribe msg type
Closes #109
2019-05-06 11:23:35 +02:00
David Cermak
7d22ab5fe6 pending_msg_count update on delete expired from outbox
Closes #111
2019-05-06 11:23:35 +02:00
David Cermak
fd564b1f17 client receive: refactor receive to read only one message to fragment only payload for longer messages
Closes #113
2019-05-06 11:23:28 +02:00
David Čermák
c4fdd7759c Merge branch 'bugfix/recv_empty_payload' into 'idf'
Added support for receiving empty payload

See merge request idf/esp-mqtt!27
2019-04-28 03:42:29 +08:00
Gregory Eslinger
0450bd0093 MQTT Client: Added support for receiving empty payload 2019-04-26 17:07:04 +02:00
David Čermák
55e72e4ded Merge branch 'bugfix/ci_checkout_fix' into 'idf'
ci: fixed incorrect git checkout submodule

See merge request idf/esp-mqtt!24
2019-04-15 00:36:54 +08:00
David Cermak
9d70713b2e ci: fixed incorrect git checkout submodules causing build failures when switching between IDF releases 2019-04-10 14:21:07 +02:00
David Čermák
27780e3c45 Merge branch 'feature/github_issue_sync' into 'master'
github: Add workflow file for syncing to Jira

See merge request idf/esp-mqtt!22
2019-03-29 15:12:35 +08:00
David Čermák
b1aa1d444e Merge branch 'feature/support_for_disconnect_msg' into 'idf'
MQTT Client:  Added disconnect message on client stop

See merge request idf/esp-mqtt!21
2019-03-28 16:56:36 +08:00
Gregory Eslinger
caf5007b99 MQTT Client: Added disconnect message on client stop
Closes https://github.com/espressif/esp-mqtt/issues/97 and closes https://github.com/espressif/esp-idf/issues/3215
2019-03-27 17:41:03 +01:00
Angus Gratton
78a55fac68 github: Add workflow file for syncing to Jira 2019-03-27 18:18:33 +11:00
David Čermák
39118d5182 Merge branch 'feature/update_queue_h' into 'idf'
change rom/queue.h to sys/queue.h

See merge request idf/esp-mqtt!19
2019-03-20 16:23:55 +08:00
suda-morris
ca373e22cb change rom/queue.h to sys/queue.h 2019-03-14 20:26:28 +08:00
David Čermák
5a4d5518b2 Merge branch 'bugfix/set_client_state_on_timeout' into 'idf'
Bugfix: state not correctly set on disconnect -- PR from GitHub

See merge request idf/esp-mqtt!18
2019-02-20 21:15:55 +08:00
leewo0
57d2774462 fix bug: client->state not set
If auto_reconnect is disabled, client->state won't be setted in MQTT_STATE_WAIT_TIMEOUT statement, which results in an error if esp_mqtt_client_start() is called.
2019-02-20 16:49:46 +08:00
David Čermák
15818b3a50 Merge branch 'feature/resend_qos12_rebased' into 'idf'
Updated MQTT library

See merge request idf/esp-mqtt!17
2019-02-16 03:58:15 +08:00
David Cermak
3300338c85 tabs to spaces corrections 2019-02-13 15:21:32 +01:00
David Cermak
51089629f7 corrected outbox for oversized messge and qos1, added errno to error messages 2019-02-13 15:21:32 +01:00
David Cermak
752953dc3b added mqtt api locks, so methods can be executed from user context
closes #67, closes #90, closes https://github.com/espressif/esp-idf/issues/2975
2019-02-13 15:21:32 +01:00
David Cermak
6a0d1e7bff support for qos1 and qos2 message retrasmission on reconnect 2019-02-13 15:21:32 +01:00
David Cermak
815623dfe5 improvements on runtime configuration of uri
closes https://github.com/espressif/esp-idf/issues/2870
2019-02-13 15:21:32 +01:00
David Cermak
d4b6655618 minor fixes for issues present with fragmented/packed data 2019-02-13 14:59:38 +01:00
David Čermák
6fed019b9d Merge branch 'feature/reconnection_improvements' into 'idf'
Reconnection improvements: Github PR

See merge request idf/esp-mqtt!15
2019-02-13 21:49:03 +08:00
Mikael Kanstrup
df455d2a5f Add client force reconnect function
esp-mqtt library is unaware of underlying network connectivity states
and current auto reconnect mechanism is built around timed retry
attempts every MQTT_RECONNECT_TIMEOUT_MS.

As application code usually keeps track of network connectity state
export a new function that application can use to request a forced
reconnect attempt as soon as connected to the network.
2019-02-04 08:44:55 +01:00
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
Anton Maklakov
f9abda0ddd Merge branch 'feature/simple_ci_support' into 'idf'
Basic ci support with static checker

See merge request idf/esp-mqtt!13
2019-01-30 12:23:00 +08:00
David Cermak
dc801ce8ea ci: added basic support for building + static analysis with IDF master 2019-01-29 16:31:14 +01:00
David Čermák
8163e12b80 Merge branch 'feature/mqtt_support_arbitrary_datalen' into 'idf'
MQTT rework for packed and fragmented messages -- available for testing

See merge request idf/esp-mqtt!12
2019-01-03 18:57:30 +08:00