Back to Smartcitizen.me

Using the Arduino IDE - Constants.h wifi settings


#1

Now that I have my SK working I want to explore the project some more.

Can anyone tell me what the arduino is expecting to see in the wifi settings part of constants.h

//Espacio reservado para los SSID y PASS
#define DEFAULT_ADDR_SSID 200
#define DEFAULT_ADDR_PASS 520
#define DEFAULT_ADDR_AUTH 840
#define DEFAULT_ADDR_ANTENNA 1160

I guess that these settings could do with explanation too, so that we set them in the correct format

char* WEB[8]={
data.smartcitizen.me”,
"PUT /add HTTP/1.1
",
"Host: data.smartcitizen.me
",
"User-Agent: SmartCitizen
",
"X-SmartCitizenMacADDR: ",
"X-SmartCitizenApiKey: ",
"X-SmartCitizenVersion: ",
"X-SmartCitizenData: "};

I want to set these manually rather than using the website.

Thanks


#2

Hi Cie,

Hope you are having a great start to the week.

In constans.h you do not have to change anything. All the parameters there are internal configuration settings.

If you want to set the network configuration manually, you should go to the SCKBase tab and modify the lines you see below:

#define redes 0
#if (redes > 0)
char* mySSID[redes] = { “Red1” , “Red2” , “Red3” };
char* myPassword[redes] = { “Pass1” , “Pass2” , “Pass3” };
char* wifiEncript[redes] = { WPA2 , WPA2 , WPA2 };
char* antennaExt[redes] = { INT_ANT , INT_ANT , INT_ANT }; //EXT_ANT
#endif

Where RedX is the SSID and PassX is the Password.

The easiest way would be to write “#define redes 3”, add the name of your network in “Red1” and the corresponding password in “Pass1”. You could also choose the encryptation mode that fits with your network’s configuration: OPEN, WEP, WPA1, WPA2, WEP64.

If you have any further questions, please do not hesitate to ask.

All the best,
Aitor.


#3

Nice info :slight_smile:


#4

Thank you @netter88! Best. :slight_smile: