According to last comments posted in ZEP-632, the unref routine must
be called only when net_send reports an error.
Jira: ZEP-632
Change-Id: I11553edf2c7d686c3e58617c2e05b6f18962955e
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
README files are updated to include information about the
warnings displayed by the compiler.
Applications affected: DNS, NATS and MQTT.
Jira: ZEP-681
Change-Id: I482c3bbf37c5d9af3bb43b7ef5e58957bac2852a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Zephyr's MQTT does not implement a client's message queue.
So, a race-condition may be present when multiple messages are
received and processed.
We remove the pinreq function call to allow the mqtt_read function
to handle all the incoming messages.
CONFIG_IP_BUF_RX_SIZE is also updated to allow more messages to be
queued by the IP stack.
Jira: ZEP-669
Change-Id: Ie3ef55b17020e04c6540adf975a66fb004933914
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Use the goto statement to create a common exit point.
Remove redundant code when possible.
Change-Id: I2e22483c6fca4cb501b401164faf97d585ecec3c
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
The previous version of the pingreq handler function leaves
the semaphore blocked if an error condition is detected.
This patch solves the above described situation.
Change-Id: I4897609fae3f6523244892ae38ffdc5ae85f852d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
MQTT unsubscribe message was not included previously. See ZEP-623.
So, this commit adds the handling functions for the MQTT UNSUBSCRIBE
message.
MQTT high-level API return codes are now unified to only return:
- 0 on success
- -EINVAL when invalid parameters are received
- -EIO on network error
API documentation is also updated to reflect the previous changes.
Jira: ZEP-623
Change-Id: I04d65c303762ce2ecaca73a4f222f0b77fe70503
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
The UNSUBSCRIBE and UNSUBACK functions are added. These functions allow
to create the UNSUBSCRIBE message and to read the UNSUBACK message,
repectively.
Another function to create the PINGRESP message was also added.
Jira: ZEP-623
Change-Id: Ic055e5762051cc9fb5d59a19c6eb974e34014d7e
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
README file now has a Troubleshooting section. It could be useful during
tests.
Change-Id: I925812b9bd62ac00a2f404939c1c0b7d9cf4dfd2
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This patch demonstrates how to use the MQTT UNSUBSCRIBE message.
The publisher application is updated to fix a typo.
Jira: ZEP-623
Change-Id: I2c302c9f9320687fc39f36726394417db89f06d8
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
The zero bytes hack to connect was deprecated by last
commits, so now we send 1 byte initialized to 0 :).
Jira: ZEP-612
Change-Id: I372964bbb102811d33509ad9386d9b360032a180
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Add TCP/IPv4 routines to this sample.
This MQTT sample code demonstrates how to implement an MQTT subscriber
application.
To build this sample, the Paho's MQTT Packet Library is required. See
the README file.
For network application development, see:
* samples/net/echo_server
* samples/net/echo_client
Change-Id: Ibeb175ee2c4594b8961c60f2a0d25296c238401c
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Add TCP/IPv4 routines to this sample.
This MQTT sample code demonstrates how to implement an MQTT publisher
application.
For network application development, see:
* samples/net/echo_server
* samples/net/echo_client
Change-Id: I13ac5ca1da2cd4d984fb595b599c3eab4edc5bf0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Debian and Ubuntu distributions come with an old version of the
mosquitto server that does not support MQTT 3.1.1.
So, the MQTT applications' README file is updated with this
information.
Change-Id: I1c76c757b5a15aa2bdd192bd912835a417cb0031
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This sample demostrates how to write a subscriber application that is
able to receive messages with different Quality of Service values.
The code is self-documented. Read the README file for more information
about the network setup.
This sample code uses the Network for Zephyr API (netz).
More details about MQTT can be found in the official documentation:
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html
Jira: ZEP-416
Jira: ZEP-568
Jira: ZEP-573
Jira: ZEP-594
Change-Id: Ia660313439c0c61c2210abbf8ce09ff278d11a1a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This sample demostrates how to write a publisher application that is
able to send messages with different Quality of Service values.
The code is self-documented. Read the README file for more information
about the network setup.
This sample code uses the Network for Zephyr API (netz).
Old mqtt applications (paho_mqtt_client and paho_mqtt_shell) are now
deprecated.
More details about MQTT can be found in the official documentation:
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html
Jira: ZEP-416
Jira: ZEP-568
Jira: ZEP-593
Jira: ZEP-573
Change-Id: I31f8a01e143e5d446f2fb4055c1cacb9d7174517
Signed-off-by: Flavio Santes <flavio.santes@intel.com>