You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the PIC-IOT with a local MQTT server having a not default port and user password.
I suppose this part of code in Header Files/MCC Generated Files/config/mqtt_config.h is used to set MQTT parameters:
BUT: my local MQTT Broker has not an HOSTURL but I've IP address: 192.168.1.101.
Now I suppose, in this case, I must leave blank the CFG_MQTT_HOSTURL parameter and then fill the CFG_MQTT_BROKERIP in hex format. But CFG_MQTT_BROKERIP macro is not used in any part of code! So I suppose I must put my IP address in the CFG_MQTT_HOSTURL, but nothing works (I've changed PORT, USER and PASSWORD to match my local broker).
How can I use this example for publishing MQTT Topics in my local MQTT broker?
The text was updated successfully, but these errors were encountered:
Select Wireless [WINC15XX] as the 'Transport Layer' during MQTT library configuration in MCC. The WINC15XX library will load automatically (this step might take some time).
The host IP address can be entered in the 'Host Address' field in the UI.
Publish and subscribe topics can be customized using the 'Publish Topic' and 'Subscribe Topic' fields
Configuring the WINC15XXLibrary:
Navigate to the WINC15XX library. Enter the SSID and password of the Wi-Fi network.
The PIC IoT pinout can be used to configure the WINC15XX pins.
For additional information please refer to the 'Running the Example' section of the MQTT library Release Notes.
After code generation, the app_mqttExampleInit() and app_mqttScheduler() function should be called in the main.c file:
intmain(void)
{
SYSTEM_Initialize();
app_mqttExampleInit();
while (1)
{
app_mqttScheduler();
}
}
After programming the PIC IoT Development Board, the application will establish MQTT connection and publish packets to the MQTT broker every 10 seconds.
I'm trying to use the PIC-IOT with a local MQTT server having a not default port and user password.
I suppose this part of code in Header Files/MCC Generated Files/config/mqtt_config.h is used to set MQTT parameters:
`// MCC generated parameters
#define CFG_MQTT_PORT 8883
#define CFG_MQTT_HOSTURL "a1gqt8sttiign3.iot.us-east-2.amazonaws.com"
#define CFG_MQTT_CONN_TIMEOUT 10
#define CFG_MQTT_BROKERIP 0x00000000
#define CFG_MQTT_TXBUFFER_SIZE 400
#define CFG_MQTT_RXBUFFER_SIZE 400
#define CFG_MQTT_USERNAME "mchpUser"
#define CFG_MQTT_PASSWORD "microchip"
#define CFG_QOS 0
#define CFG_PUBTOPIC "mchp/iot/events"
#define CFG_SUBTOPIC "mchp/iot/config"
#define TCPIP_BSD 1`
BUT: my local MQTT Broker has not an HOSTURL but I've IP address: 192.168.1.101.
Now I suppose, in this case, I must leave blank the CFG_MQTT_HOSTURL parameter and then fill the CFG_MQTT_BROKERIP in hex format. But CFG_MQTT_BROKERIP macro is not used in any part of code! So I suppose I must put my IP address in the CFG_MQTT_HOSTURL, but nothing works (I've changed PORT, USER and PASSWORD to match my local broker).
How can I use this example for publishing MQTT Topics in my local MQTT broker?
The text was updated successfully, but these errors were encountered: