123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #ifndef __USER_CONFIG_H__
- #define __USER_CONFIG_H__
- #define USE_OPTIMIZE_PRINTF
- /* FLASH CONFIGURATION SETTINGS */
- #define CFG_HOLDER 0x4171134
- #define CFG_LOCATION 0x2 // this needs to be relocated to end of flash
- /* DEFAULT Wi-Fi SETTINGS */
- #define STA_SSID_1 "SSID"
- #define STA_PASS_1 "PASS"
- #define STA_PASS_2 "SSID"
- #define STA_SSID_2 "PASS"
- #define MAX_APS 5 // number of stored Wi-Fi accesspoint credientials (1 - 5)
- #define STORED_APS 1;
- /* MQTT DEFAULT CONFIGURATIONS */
- #define MQTT_HOST "192.168.0.101" //or "mqtt.yourdomain.com"
- #define MQTT_PORT 1883
- #define MQTT_BUF_SIZE 1024
- #define QUEUE_BUFFER_SIZE 2048
- #define MQTT_RECONNECT_TIMEOUT 5 /*second*/
- #define DEFAULT_SECURITY 0
- #define PROTOCOL_NAMEv31 //MQTT version 3.1 compatible with Mosquitto v0.15
- //PROTOCOL_NAMEv311 //MQTT version 3.11 compatible with https://eclipse.org/paho/clients/testing/
- #define MQTT_SSL_ENABLE
- #define MQTT_CLIENT_ID "CLIENT_1234"
- #define MQTT_USER "USER"
- #define MQTT_PASS "PASS"
- #define MQTT_CLEAN_SESSION 1
- /* OTA SETTINGS */
- #define OTA_HOST "fphx.duckdns.org"
- #define OTA_PORT 2000
- #define OTA_ROM0 "rom0.bin"
- #define OTA_ROM1 "rom1.bin"
- // OTA_FILE is not required, but is part of the example
- // code for writing arbitrary files to flash
- #define OTA_FILE "file.bin"
- // general http header
- #define HTTP_HEADER "Connection: keep-alive\r\n\
- Cache-Control: no-cache\r\n\
- User-Agent: rBoot-Sample/1.0\r\n\
- Accept: */*\r\n\r\n"
- // timeout for the initial connect and each recv (in ms)
- #define OTA_NETWORK_TIMEOUT 10000
- // This needs to be changed to support a logging library
- #if defined(DEBUG_ON)
- #define INFO( format, ... ) os_printf( format, ## __VA_ARGS__ )
- #else
- #define INFO( format, ... )
- #endif
- #endif
|