samples/net: Add network-related functions to MQTT Subscriber

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>
This commit is contained in:
Flavio Santes 2016-07-29 17:02:45 -05:00 committed by Andrew Boie
commit e22df46b61
2 changed files with 7 additions and 4 deletions

View file

@ -14,8 +14,13 @@
# limitations under the License.
#
ccflags-y +=-I${ZEPHYR_BASE}/net/ip/contiki
ccflags-y +=-I${ZEPHYR_BASE}/net/ip/contiki/os/lib
ccflags-y +=-I${ZEPHYR_BASE}/net/ip/contiki/os
ccflags-y +=-I${ZEPHYR_BASE}/net/ip
ccflags-y += -I$(SOURCE_DIR)/../publisher/src
obj-y += main.o
obj-y += ../../publisher/src/mqtt_pack.o
obj-y += ../../publisher/src/netz.o
obj-y += ../../publisher/src/mqtt.o
obj-y += main.o

View file

@ -18,9 +18,7 @@
#include <stdio.h>
#include <errno.h>
/* Network for Zephyr API - netz */
#include <netz.h>
#include "netz.h"
#include "mqtt.h"
#define STACK_SIZE 2048