New branch for my new AIO key.
Will have to remember to sanitize before committing to master. Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>
This commit is contained in:
parent
70cf55efdf
commit
1cd8191682
4 changed files with 24 additions and 21 deletions
33
main.c
33
main.c
|
@ -65,31 +65,26 @@ void ICACHE_FLASH_ATTR user_init() {
|
|||
|
||||
// prepare the TCP/MQTT connection stuff
|
||||
// Adafruit IO is at 52.5.238.97
|
||||
|
||||
static const char testUser[11] = { 0x4d, 0x72, 0x41, 0x75, 0x72, 0x65, 0x6c, 0x69, 0x75, 0x73, 0x52 };
|
||||
static const uint8_t testUser_len = 11;
|
||||
static const char testPass[32] = { 0x63, 0x61, 0x62, 0x31, 0x39, 0x36, 0x36, 0x34, 0x31, 0x66, 0x33, 0x63, 0x34, 0x34, 0x36, 0x32, 0x61, 0x35, 0x30, 0x39, 0x64, 0x62, 0x64, 0x31, 0x34, 0x61, 0x30, 0x61, 0x66, 0x36, 0x64, 0x32 };
|
||||
static const uint8_t testPass_len = 32;
|
||||
//static const char testPass[4] = { 0x74, 0x65, 0x73, 0x74 };
|
||||
//static const uint8_t testPass_len = 4;
|
||||
static const char testTopic[37] = { 0x4d, 0x72, 0x41, 0x75, 0x72, 0x65, 0x6c, 0x69, 0x75, 0x73, 0x52, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x62, 0x65, 0x64, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x62, 0x65, 0x64, 0x72, 0x6f, 0x6f, 0x6d, 0x74, 0x65, 0x6d, 0x70 };
|
||||
static const uint8_t testTopic_len = 37;
|
||||
//static const char testTopic[4] = { 0x74, 0x65, 0x73, 0x74 };
|
||||
//static const uint8_t testTopic_len = 4;
|
||||
static const char ioUser[11] = { 0x4d, 0x72, 0x41, 0x75, 0x72, 0x65, 0x6c, 0x69, 0x75, 0x73, 0x52 }; // MrAureliusR
|
||||
static const uint8_t ioUser_len = 11;
|
||||
static const char ioKey[32] = { 0x32, 0x63, 0x39, 0x36, 0x65, 0x30, 0x35, 0x61, 0x66, 0x34, 0x35, 0x30, 0x34, 0x31, 0x66, 0x31, 0x38, 0x36, 0x65, 0x62, 0x39, 0x30, 0x33, 0x32, 0x33, 0x31, 0x31, 0x31, 0x61, 0x32, 0x61, 0x38 }; // 2c96e05af45041f186eb90323111a2a8
|
||||
static const uint8_t ioKey_len = 32;
|
||||
static const char ioTopic[37] = { 0x4d, 0x72, 0x41, 0x75, 0x72, 0x65, 0x6c, 0x69, 0x75, 0x73, 0x52, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x62, 0x65, 0x64, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x62, 0x65, 0x64, 0x72, 0x6f, 0x6f, 0x6d, 0x74, 0x65, 0x6d, 0x70 };
|
||||
static const uint8_t ioTopic_len = 37;
|
||||
static const char clientID[5] = { 0x46, 0x5a, 0x5a, 0x4e, 0x30 };
|
||||
static const uint8_t clientID_len = 5;
|
||||
pGlobalSession->port = 1883; // mqtt port
|
||||
static const char esp_tcp_server_ip[4] = {52, 5, 238, 97};
|
||||
os_memcpy(pGlobalSession->ip, esp_tcp_server_ip, 4);
|
||||
pGlobalSession->username_len = testUser_len;
|
||||
static const char adafruitIO_ip[4] = {52, 5, 238, 97};
|
||||
os_memcpy(pGlobalSession->ip, adafruitIO_ip, 4);
|
||||
pGlobalSession->username_len = ioUser_len;
|
||||
pGlobalSession->username = os_zalloc(sizeof(uint8_t) * pGlobalSession->username_len);
|
||||
os_memcpy(pGlobalSession->username, testUser, pGlobalSession->username_len);
|
||||
pGlobalSession->password_len = testPass_len;
|
||||
os_memcpy(pGlobalSession->username, ioUser, pGlobalSession->username_len);
|
||||
pGlobalSession->password_len = ioKey_len;
|
||||
pGlobalSession->password = os_zalloc(sizeof(uint8_t) * pGlobalSession->password_len);
|
||||
os_memcpy(pGlobalSession->password, testPass, pGlobalSession->password_len);
|
||||
pGlobalSession->topic_name_len = testTopic_len;
|
||||
os_memcpy(pGlobalSession->password, ioKey, pGlobalSession->password_len);
|
||||
pGlobalSession->topic_name_len = ioTopic_len;
|
||||
pGlobalSession->topic_name = os_zalloc(sizeof(uint8_t) * pGlobalSession->topic_name_len);
|
||||
os_memcpy(pGlobalSession->topic_name, testTopic, pGlobalSession->topic_name_len);
|
||||
os_memcpy(pGlobalSession->topic_name, ioTopic, pGlobalSession->topic_name_len);
|
||||
pGlobalSession->client_id_len = clientID_len;
|
||||
pGlobalSession->client_id = os_zalloc(sizeof(uint8_t) * pGlobalSession->client_id_len);
|
||||
os_memcpy(pGlobalSession->client_id, clientID, pGlobalSession->client_id_len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue