background image

 

7

 

 

RYWB116 MQTT Client Application User Guide

 

Copyright © 2019

, REYAX TECHNOLOGY CO., LTD. 

 

Server port number of MQTT broker/server 

Client port number of the MQTT client 

 

5.

 

The following parameters are configured if OS is used. 

WLAN task priority is given and this should be of low priority 

Driver task priority is given and this should be of highest priority 

 

WLAN Task stack size is configured by this macro 

Driver Task stack size is configured by this macro 

 

6.

 

The following parameters are used for the MQTT client specific 

information configuration 

MQTT client Keep alive period 

Memory to initialize MQTT client Info structure 

 

Global buffer or memory which is used for MQTT client initialization.  

This buffer is used for the MQTT client information storage. 

 

QOS of the message. This QOS is MQTT protocol specific and the valid 

values are 0,1 and 2. This field indicates the level of assurance for 
delivery of an Application Message. The QoS levels are 

0 - At most once delivery  

1 - At least once delivery  

2 - Exactly once delivery 

 

MQTT topic to which client is supposed to subscribe 

MQTT Message to publish on the topic subscribed 

 

#define  CLIENT_PORT 

1883 

#define RSI_DRIVER_TASK_PRIORITY 

#define RSI_DRIVER_TASK_STACK_SIZE  500 

#define MQTT_CLIENT_INIT_BUFF_LEN  3500 

uint8_t mqqt_client_buffer[MQTT_CLIENT_INIT_BUFF_LEN] 

#define QOS 

uint8_t publish_message[] ="THIS IS MQTT CLIENT DEMO 

FROM REYAX" 

#define SERVER_PORT 

1883 

#define RSI_WLAN_TASK_PRIORITY 

#define RSI_WLAN_TASK_STACK_SIZE 

500 

#define RSI_KEEP_ALIVE_PERIOD 

100 

#define RSI_MQTT_TOPIC 

"REYAX" 

Summary of Contents for RYWB116

Page 1: ...19 SEP 2019 56312E30 RYWB116 MQTT Client Application User Guide...

Page 2: ...ed to another client directly MQTT CLIENT A MQTT client is any device from a micro controller up to a full fledged server that has a MQTT library running and is connecting to an MQTT broker over any k...

Page 3: ...messages filtering them decide who is interested in it and then sending the message to all subscribed clients It also holds the session of all persisted clients including subscriptions and missed mess...

Page 4: ...ives the messages which are published on that topic SETUP REQUIRED 1 Windows PC 1 with Coocox IDE 2 RYWB116 device 3 WLAN Access point 4 Windows PC 2 with MQTT broker installed in it 5 Windows PC 3 wi...

Page 5: ...CRIPTION This application is used to configure RYWB116 connected to a WLAN Access point This example witness MQTT Client functionality of the RYWB116 This example demonstrates how message exchanges ha...

Page 6: ...ss IP address to be configured to the device should be in long format and in little endian byte order The following parameters are valid only if DHCP_MODE is 1 Example To configure 192 168 10 1 as IP...

Page 7: ...QTT client initialization This buffer is used for the MQTT client information storage QOS of the message This QOS is MQTT protocol specific and the valid values are 0 1 and 2 This field indicates the...

Page 8: ...entials password for login credentials Edit the Wlan configuration file sapis include rsi_wlan_config h CONCURRENT_MODE DISABLE RSI_FEATURE_BIT_MAP FEAT_SECURITY_OPEN RSI_TCP_IP_BYPASS DISABLE RSI_TCP...

Page 9: ...on Windows PC 2 as shown in the screen shot below 3 Open the MQTT client Utility in Windows PC 3 and connect to the MQTT broker which is running in the Windows PC 2 and subscribe to the topic given i...

Page 10: ...d MQTT clients information message is displayed in the MQTT broker application 9 After the subscription to the topic REYAX publish a message THIS IS MQTT CLIENT DEMO FROM REYAX on the subscribed topic...

Reviews: