Skip to content

Commit e1ed632

Browse files
committed
samples: mqtt_publisher: wait for the ethernet device to come up
A workaround to allow the network device to come up and settle before connecting the network. Fixed a typo on the way and added a boot banner. Change-Id: I8a8391261610dc00f5168e8abf167c8c65778eae Signed-off-by: Anas Nashif <[email protected]>
1 parent 89fc393 commit e1ed632

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

samples/net/mqtt_publisher/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
BOARD ?= frdm_k64f
88
CONF_FILE ?= prj_$(BOARD).conf
99

10-
include $(ZEPHYR_BASE)/Makefile.inc
10+
include $(ZEPHYR_BASE)/Makefile.test
1111

1212
ifeq ($(BOARD), qemu_x86)
1313
include $(ZEPHYR_BASE)/samples/net/common/Makefile.ipstack

samples/net/mqtt_publisher/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Open another terminal window and type:
108108

109109
.. code-block:: console
110110
111-
mosquito_sub -t sensors
111+
mosquitto_sub -t sensors
112112
113113
Sample output
114114
=============

samples/net/mqtt_publisher/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,5 +469,7 @@ static int network_setup(struct net_context **net_ctx, const char *local_addr,
469469

470470
void main(void)
471471
{
472+
printk("Wait for network device to come up...\n");
473+
k_sleep(K_SECONDS(6));
472474
publisher();
473475
}

0 commit comments

Comments
 (0)