Azure-Samples / iot-hub-feather-huzzah-client-app

Application collects weather data from a DHT22 sensor and sends it to IoT hub, also take actions according to cloud-to-device message.
https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-arduino-huzzah-esp8266-get-started
MIT License
35 stars 31 forks source link

SSID in ino file #34

Open TonnieKlappe opened 5 years ago

TonnieKlappe commented 5 years ago

I want to fill the SSID in the ino file because my reset is not working to change the SSID

TonnieKlappe commented 5 years ago

where can I fill in the SSID password and token in the ino file?

martinrbowman commented 5 years ago

You can modify Line 16-18 in credentials.ino in the void readCredentials() function manually hardcode your credentials and return from that function.

Let me know if you have issues and I will try and help you out.

martinrbowman commented 5 years ago

try this modified readCredentials() function...

void readCredentials()
{
    int ssidAddr = 0;
    int passAddr = ssidAddr + SSID_LEN;
    int connectionStringAddr = passAddr + SSID_LEN;

    ssid = (char *)malloc(SSID_LEN);
    pass = (char *)malloc(PASS_LEN);
    connectionString = (char *)malloc(CONNECTION_STRING_LEN);

    ssid = "yournetworkname";
    pass = "yournetworkpass";
    connectionString = "device connection string from iothub";

    return;
}

This can still be cleaned up or modified to check for fixed creds or read from eeprom or serial