Reyax RYWB116 Скачать руководство пользователя страница 6

 

6

 

 

RYWB116 MQTT Client Application User Guide

 

Copyright © 2019

, REYAX TECHNOLOGY CO., LTD. 

CONFIGURING THE APPLICATION

 

 
Edit the 

rsi_mqtt.c 

file in the following path

 

sapis/examples/wlan/mqtt_client 

From given configuration,

 

1.

 

Configure the module to join to the specific Access point by configuring following 
parameters 

SSID 

refers to the name of the Access point to connect. 

PSK 

refers to the secret key if the Access point was configured in WPA/WPA2 

security modes. 

#define SSID  

<ap_name>

 

#define CHANNEL_NO 

#define SECURITY_TYPE 

<security-type>  

#define PSK 

<psk>

 

2.

 

To configure the IP of the RYWB116 module in DHCP mode 

 

To configure IP through dhcp set DHCP_MODE to 1, else configure to 0 

3.

 

To configure static IP address 

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 address, update the macro 

DEVICE_IP 

as 

0x010AA8C0

 

IP address of the gateway should also be in long format and in little 

endian byte order 

Example: To configure “192.168.10.1” as Gateway, update the macro 

GATEWAY 

as 

0x010AA8C0 

IP address of the network mask should also be in long format and in little 
endian byte order 

Example: To configure “255.255.255.0” as network mask, update the 

macro 

NETMASK 

as 

0x00FFFFFF 

 

4.

 

Connect to the MQTT broker/server by configuring the following 

parameters 

MQTT server IP address should be in long format and in little endian 
byte order 

#define  DHCP_MODE 

<dhcp mode> 

#define  DEVICE_IP 

0X010AA8C0 

#define  GATEWAY 

0x010AA8C0 

#define 

NETMASK 

0x00FFFFFF 

#define 

SERVER_IP_ADDRESS 0x640AA8C0 

Содержание RYWB116

Страница 1: ...19 SEP 2019 56312E30 RYWB116 MQTT Client Application User Guide...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Отзывы: