-
Notifications
You must be signed in to change notification settings - Fork 8
Description
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?