diff --git a/Project/applications/smartcities/buffer.c b/Project/applications/smartcities/buffer.c index c3994f2..10e96e9 100644 --- a/Project/applications/smartcities/buffer.c +++ b/Project/applications/smartcities/buffer.c @@ -9,6 +9,7 @@ char** put_message(char* info, char** buf,uint32_t *index, uint32_t *buf_len) { char** buffer = join_buf(buf, buf_len); buffer[*index] = chHeapAlloc(NULL,strlen(info)+1); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,strlen(info)+1,buffer[*index],0x1B); strcpy(buffer[*index],info); DBG_BUFFER("Data copied\r\n"); i = *index+1; @@ -19,6 +20,7 @@ char** put_message(char* info, char** buf,uint32_t *index, uint32_t *buf_len) { DBG_BUFFER("%c[1;31m[ERROR] WTF in put_message%c[1;00m\r\n",0x1B,0x1B); buf[*index] = chHeapAlloc(NULL,strlen(info)+1); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,strlen(info)+1,buf[*index],0x1B); buf[*index] = info; i = *index+1; *index = i; @@ -58,6 +60,7 @@ int send(char** buf, uint32_t *index, uint32_t *size_buf, char *provider_ID, cha } uint8_t res = send_json(statement, size, provider_ID, sensor_ID); chHeapFree(statement); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,statement,0x1B); int i; if(res==JSON_POST_OK) { @@ -65,10 +68,12 @@ int send(char** buf, uint32_t *index, uint32_t *size_buf, char *provider_ID, cha for(i=0;i<*index;i++) { chHeapFree(buf[i]); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,buf[i],0x1B); } if(buf!=NULL) { chHeapFree(buf); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,buf,0x1B); } *index=0; *size_buf=0; @@ -82,16 +87,20 @@ char** join_buf(char** buf, uint32_t *buf_len) char** n_buf; int len = *buf_len; n_buf = chHeapAlloc (NULL,sizeof (char *) * (len+1)); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,sizeof(char*) * (len+1),n_buf,0x1B); int i; for(i=0; i read response code. "HTTP/1.1 301 Moved Permanently" DBG_HTTP("Response code: %s\r\n",response); int http_response = response2int(response); @@ -119,6 +123,7 @@ int httpRequest(struct httpHeaders head, char* content, int content_size) netconn_close(neocon); netconn_delete(neocon); chHeapFree(response); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,response,0x1B); return http_response; } @@ -143,6 +148,7 @@ char* int2string(int num) { char* manders; manders = (char*)chHeapAlloc(NULL,numberofdigits(num)+1); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,numberofdigits(num)+1,manders,0x1B); sprintf(manders, "%d", num); return manders; } diff --git a/Project/applications/smartcities/include/buffer.h b/Project/applications/smartcities/include/buffer.h index 769724e..6bb72f7 100644 --- a/Project/applications/smartcities/include/buffer.h +++ b/Project/applications/smartcities/include/buffer.h @@ -10,8 +10,8 @@ #define SOFT_REACHED 1 #define HARD_REACHED 2 -//#define DBG_BUFFER(fmt,...) printf("%c[1;35mbuffer.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__) -#define DBG_BUFFER(fmt,...) printf("") +#define DBG_BUFFER(fmt,...) printf("%c[1;35mbuffer.c:%c[1;00m "fmt,0x1B,0x1B, ##__VA_ARGS__) +//#define DBG_BUFFER(fmt,...) printf("") char** put_message(char* info, char** buf,uint32_t *index, uint32_t *buf_len); int check_memory(void); diff --git a/Project/applications/smartcities/json.c b/Project/applications/smartcities/json.c index 92584b9..f0199e2 100644 --- a/Project/applications/smartcities/json.c +++ b/Project/applications/smartcities/json.c @@ -14,6 +14,7 @@ uint8_t register_sensor(sensor sens) DBG_JSON("callibration_data is: %s\r\n",callibration_data); statement = prepare_json_register_statement(mod,sens,callibration_data); chHeapFree(callibration_data); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,callibration_data,0x1B); } else { @@ -23,6 +24,7 @@ uint8_t register_sensor(sensor sens) sprintf(sensor_ID,"%02x",sens.ID); result = send_json(statement,strlen(statement),mod.ID,NULL); chHeapFree(statement); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,statement,0x1B); return result; } @@ -42,6 +44,7 @@ char* prepare_json_observation_statement(char** data, uint32_t nObservations) length--; //REMOVE LAST ',' json_statement = join_strings(str_aux,"]}\0",length,3,JOIN_NO_FREE); chHeapFree(str_aux); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux,0x1B); return json_statement; } @@ -57,40 +60,51 @@ char* prepare_json_register_statement(module mod, sensor sens, char *additional_ length += MODULE_ID_LENGTH+2; str_aux2 = join_strings(str_aux,"\",\"description\":\"",length,17,JOIN_NO_FREE); chHeapFree(str_aux); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux,0x1B); length += 17; str_aux = join_strings(str_aux2,sens.description,length,strlen(sens.description),JOIN_NO_FREE); chHeapFree(str_aux2); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux2,0x1B); length += strlen(sens.description); str_aux2 = join_strings(str_aux,"\",\"type\":\"",length,10,JOIN_NO_FREE); chHeapFree(str_aux); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux,0x1B); length += 10; str_aux = join_strings(str_aux2,sens.type,length,strlen(sens.type),JOIN_NO_FREE); chHeapFree(str_aux2); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux2,0x1B); length += strlen(sens.type); str_aux2 = join_strings(str_aux,"\",\"unit\":\"",length,10,JOIN_NO_FREE); chHeapFree(str_aux); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux,0x1B); length += 10; str_aux = join_strings(str_aux2,sens.unit,length,strlen(sens.unit),JOIN_NO_FREE); chHeapFree(str_aux2); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux2,0x1B); length += strlen(sens.unit); str_aux2 = join_strings(str_aux,"\",\"location\":\"",length,14,JOIN_NO_FREE); chHeapFree(str_aux); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux,0x1B); length += 14; str_aux = join_strings(str_aux2,mod.geoloc,length,strlen(mod.geoloc),JOIN_NO_FREE); chHeapFree(str_aux2); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux2,0x1B); length += strlen(mod.geoloc); if(additional_info != NULL) { DBG_JSON("In prepare_json_register_statement: Detected additional_info\r\n"); str_aux2 = join_strings(str_aux,"\",\"additionalInfo\":\"",length,20,JOIN_NO_FREE); chHeapFree(str_aux); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux,0x1B); length += 20; str_aux = join_strings(str_aux2,additional_info,length,strlen(additional_info),JOIN_NO_FREE); chHeapFree(str_aux2); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux2,0x1B); length += strlen(additional_info); } json_statement = join_strings(str_aux,"\"}]}\0",length,5,JOIN_NO_FREE); chHeapFree(str_aux); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux,0x1B); return json_statement; } @@ -112,7 +126,9 @@ char* prepare_observation(char* observation, uint32_t length) } int timestamp_length = length - (value_length + 1); char *value = (char*) chHeapAlloc(NULL,value_length+1); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,value_length+1,value,0x1B); char *timestamp = (char*) chHeapAlloc(NULL,timestamp_length+1); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,timestamp_length+1,timestamp,0x1B); strncpy(value,observation,value_length); strncpy(timestamp,observation+(value_length+1),timestamp_length); value[value_length] = '\0'; @@ -122,8 +138,11 @@ char* prepare_observation(char* observation, uint32_t length) str_aux2 = join_strings(str_aux2,timestamp,25+value_length,timestamp_length,JOIN_FREE_MEM); json_data = join_strings(str_aux2,"\"},",25+value_length+timestamp_length,3,JOIN_NO_FREE); chHeapFree(str_aux); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux,0x1B); chHeapFree(str_aux2); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str_aux2,0x1B); chHeapFree(value); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,value,0x1B); return json_data; } @@ -139,29 +158,34 @@ uint8_t send_json(char* statement, uint32_t length, char* provider_ID, char* sen if(sensor_ID == NULL) //Register sensor { URL = (char*) chHeapAlloc(NULL,1+strlen(SERVER_HOSTNAME)); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,1+strlen(SERVER_HOSTNAME),URL,0x1B); strcpy(URL,SERVER_HOSTNAME); #ifdef SERVER_VANILLA //VANILLA SERVER (SENTILO) DBG_JSON("Server is vanilla\r\n") PATH = (char*) chHeapAlloc(NULL,19); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,19,PATH,0x1B); strcpy(PATH,"/catalog/register"); #endif #ifdef SERVER_LEWIS //FUCKING LEWIS... DBG_JSON("Server is lewis.upc.es\r\n"); PATH = (char*) chHeapAlloc(NULL,50); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,50,PATH,0x1B); strcpy(PATH,"/modularsense/wordpress/opendata/catalog/register"); #endif } else //Post data { URL = (char*) chHeapAlloc(NULL,1+strlen(SERVER_HOSTNAME)); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,1+strlen(SERVER_HOSTNAME),URL,0x1B); strcpy(URL,SERVER_HOSTNAME); URL[strlen(SERVER_HOSTNAME)] = '\0'; #ifdef SERVER_VANILLA //VANILLA SERVER (SENTILO) DBG_JSON("Server is vanilla\r\n") PATH = (char*) chHeapAlloc(NULL,22+strlen(provider_ID)+strlen(sensor_ID)); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,22+strlen(provider_ID)+strlen(sensor_ID),PATH,0x1B); strcpy(PATH,"/data/modularupload/"); strcpy(PATH+20,provider_ID); strcpy(PATH+20+strlen(provider_ID),sensor_ID); @@ -170,6 +194,7 @@ uint8_t send_json(char* statement, uint32_t length, char* provider_ID, char* sen //FUCKING LEWIS... DBG_JSON("Server is lewis.upc.es\r\n"); PATH = (char*) chHeapAlloc(NULL,54+strlen(provider_ID)+strlen(sensor_ID)); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,54+strlen(provider_ID)+strlen(sensor_ID),PATH,0x1B); strcpy(PATH,"/modularsense/wordpress/opendata/data/modularupload/"); strcpy(PATH+52,provider_ID); strcpy(PATH+52+strlen(provider_ID),sensor_ID); @@ -178,7 +203,9 @@ uint8_t send_json(char* statement, uint32_t length, char* provider_ID, char* sen struct httpHeaders server = { put,PATH,strlen(PATH),URL,strlen(URL)}; response_code = httpRequest(server, statement, length); chHeapFree(PATH); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,PATH,0x1B); chHeapFree(URL); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,URL,0x1B); if(response_code == 200) { DBG_JSON("Success: %c[1;32mJSON_POST_OK%c[1;00m\r\n",0x1B,0x1B); @@ -213,13 +240,16 @@ uint32_t find_next_index(char* string, uint32_t length, char delimiter) char* join_strings(char* str1, char* str2, uint32_t len1, uint32_t len2, uint8_t free_mem) { char* str = (char*) chHeapAlloc(NULL,len1+len2+1); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,1+len1+len2,str,0x1B); strncpy(str,str1,len1); str[len1] = '\0'; strncat(str,str2,len2); if(free_mem) { chHeapFree(str1); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str1,0x1B); chHeapFree(str2); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,str2,0x1B); } return str; } \ No newline at end of file diff --git a/Project/applications/smartcities/logger/ttyS0.log b/Project/applications/smartcities/logger/ttyS0.log index 94f20ec..52a7066 100644 --- a/Project/applications/smartcities/logger/ttyS0.log +++ b/Project/applications/smartcities/logger/ttyS0.log @@ -8,354 +8,254 @@ main.c: Encryption type = 4 main.c: Geo Localization = 41.557255 2.096183 main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected +Connected Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 buffer.c: Checking available memory... buffer.c: Available memory: 33320 B buffer.c: Used memory: 1384 B -sensors.c: Waking up sensors... -sensors.c: Woken Pin 3 -sensors.c: Woken Pin 4 -sensors.c: Woken Pin 5 -sensors.c: Woken Pin 6 -sensors.c: Woken Pin 7 -json.c: Registering sensor: Light sensor -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/catalog/register HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 131 - -{"sensors":[{"sensor":"00000139","description":"Light sensor","type":"illumination","unit":"lux","location":"41.557255 2.096183"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -json.c: Registering sensor: Pressure sensor -json.c: Putting additional info for pressure sensor... -sensors.c: [PRESSURE] Fetching callibration data -sensors.c: [PRESSURE] Got callibration data -json.c: callibration_data is: 7453,64557,51006,32123,24742,20239,5498,49,32768,54461,2432 -json.c: In prepare_json_register_statement: Detected additional_info -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/catalog/register HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 209 - -{"sensors":[{"sensor":"00000177","description":"Pressure sensor","type":"pressure","unit":"hPa","location":"41.557255 2.096183","additionalInfo":"7453,64557,51006,32123,24742,20239,5498,49,32768,54461,2432"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -json.c: Registering sensor: Temperature and humidity sensor -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/catalog/register HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 161 - -{"sensors":[{"sensor":"00000127","description":"Temperature and humidity sensor","type":"temperature,humidity","unit":"ÂșC,RH","location":"41.557255 2.096183"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -json.c: Registering sensor: Battery Level -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/catalog/register HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 124 - -{"sensors":[{"sensor":"00000100","description":"Battery Level","type":"power","unit":"mV","location":"41.557255 2.096183"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: 3 sensor detected... -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611065977 -main.c: Updating new time to 3611065977 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -timer-loop.c: Time to sleep! for 3 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611065980 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 11 -sensors.c: [LIGHT] CH0 = 94 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611065981 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611065981 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 1114260,6/6/2014T19:53:1 -ntp.c: Writing timestamp... -main.c: Data is: 39174,29066,6/6/2014T19:53:1 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10300,6/6/2014T19:53:1 +[ALLOC] Allocated 120 bytes to 2000FCA8 +[ALLOC] Allocated 32 bytes to 2000FC20 +[ALLOC] Allocated 49 bytes to 2000FC48 +[FREE] Freed bytes from 2000FC20 +[ALLOC] Allocated 64 bytes to 2000FEC0 +[FREE] Freed bytes from 2000FC48 +[ALLOC] Allocated 74 bytes to 2000FC20 +[FREE] Freed bytes from 2000FEC0 +[ALLOC] Allocated 82 bytes to 2000FEC0 +[FREE] Freed bytes from 2000FC20 +[ALLOC] Allocated 92 bytes to 2000FC20 +[FREE] Freed bytes from 2000FEC0 +[ALLOC] Allocated 95 bytes to 2000FEC0 +[FREE] Freed bytes from 2000FC20 +[ALLOC] Allocated 109 bytes to 2000FF28 +[FREE] Freed bytes from 2000FEC0 +[ALLOC] Allocated 127 bytes to 2000FFA0 +[FREE] Freed bytes from 2000FF28 +[ALLOC] Allocated 147 bytes to 2000FEC0 +[FREE] Freed bytes from 2000FFA0 +[ALLOC] Allocated 206 bytes to 2000FF60 +[FREE] Freed bytes from 2000FEC0 +[ALLOC] Allocated 211 bytes to 20010038 +[FREE] Freed bytes from 2000FF60 +[FREE] Freed bytes from 2000FCA8 +[ALLOC] Allocated 14 bytes to 2000FC20 +[ALLOC] Allocated 50 bytes to 2000FC38 +[ALLOC] Allocated 368 bytes to 2000FEC0 +[ALLOC] Allocated 4 bytes to 2000FC78 +[FREE] Freed bytes from 2000FC78 +[FREE] Freed bytes from 2000FEC0 +[ALLOC] Allocated 4 bytes to 2000F328 +[FREE] Freed bytes from 2000F328 +[FREE] Freed bytes from 2000FC38 +[FREE] Freed bytes from 2000FC20 +[FREE] Freed bytes from 20010038 +[ALLOC] Allocated 32 bytes to 2000FC20 +[ALLOC] Allocated 49 bytes to 2000FC48 +[FREE] Freed bytes from 2000FC20 +[ALLOC] Allocated 80 bytes to 2000FCA8 +[FREE] Freed bytes from 2000FC48 +[ALLOC] Allocated 90 bytes to 2000FC20 +[FREE] Freed bytes from 2000FCA8 +[ALLOC] Allocated 110 bytes to 2000FCA8 +[FREE] Freed bytes from 2000FC20 +[ALLOC] Allocated 120 bytes to 2000FEC0 +[FREE] Freed bytes from 2000FCA8 +[ALLOC] Allocated 126 bytes to 2000FCA8 +[FREE] Freed bytes from 2000FEC0 +[ALLOC] Allocated 140 bytes to 2000FEC0 +[FREE] Freed bytes from 2000FCA8 +[ALLOC] Allocated 158 bytes to 2000FF58 +[FREE] Freed bytes from 2000FEC0 +[ALLOC] Allocated 163 bytes to 20010000 +[FREE] Freed bytes from 2000FF58 +[ALLOC] Allocated 14 bytes to 2000F328 +[ALLOC] Allocated 50 bytes to 2000FC20 +[ALLOC] Allocated 320 bytes to 20010208 +[ALLOC] Allocated 4 bytes to 2000FC60 +[FREE] Freed bytes from 2000FC60 +[FREE] Freed bytes from 20010208 +[ALLOC] Allocated 4 bytes to 2000FC78 +[FREE] Freed bytes from 2000FC78 +[FREE] Freed bytes from 2000FC20 +[FREE] Freed bytes from 2000F328 +[FREE] Freed bytes from 20010000 +[ALLOC] Allocated 32 bytes to 2000FC20 +[ALLOC] Allocated 49 bytes to 2000FC48 +[FREE] Freed bytes from 2000FC20 +[ALLOC] Allocated 62 bytes to 2000FCA8 +[FREE] Freed bytes from 2000FC48 +[ALLOC] Allocated 72 bytes to 2000FC20 +[FREE] Freed bytes from 2000FCA8 +[ALLOC] Allocated 77 bytes to 2000FCA8 +[FREE] Freed bytes from 2000FC20 +[ALLOC] Allocated 87 bytes to 2000FC20 +[FREE] Freed bytes from 2000FCA8 +[ALLOC] Allocated 89 bytes to 2000FCA8 +[FREE] Freed bytes from 2000FC20 +[ALLOC] Allocated 103 bytes to 2000FEC0 +[FREE] Freed bytes from 2000FCA8 +[ALLOC] Allocated 121 bytes to 2000FCA8 +[FREE] Freed bytes from 2000FEC0 +[ALLOC] Allocated 126 bytes to 2000FEC0 +[FREE] Freed bytes from 2000FCA8 +[ALLOC] Allocated 14 bytes to 2000F328 +[ALLOC] Allocated 50 bytes to 2000FC20 +[ALLOC] Allocated 283 bytes to 2000FF48 +[ALLOC] Allocated 4 bytes to 2000FC60 +[FREE] Freed bytes from 2000FC60 +[FREE] Freed bytes from 2000FF48 +[ALLOC] Allocated 4 bytes to 2000FC78 +[FREE] Freed bytes from 2000FC78 +[FREE] Freed bytes from 2000FC20 +[FREE] Freed bytes from 2000F328 +[FREE] Freed bytes from 2000FEC0 +main.c: 2 sensor detected... +main.c: Requesting new NTP time... +main.c: Updating new time to 3611097704 +main.c: Time updated +main.c: Disconnecting wifi... +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS +Failed +main.c: Time (absolute): 3611097720 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +[ALLOC] Allocated 12 bytes to 2000EFC8 +[ALLOC] Allocated 12 bytes to 2000F400 +main.c: Time (absolute): 3611097720 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611097720 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +[ALLOC] Allocated 8 bytes to 2000F418 +[ALLOC] Allocated 32 bytes to 2000F428 +main.c: Data is: 39172,29020,7/6/2014T4:42:0 +[FREE] Freed bytes from 2000EFC8 +[ALLOC] Allocated 31 bytes to 2000F450 +main.c: Data is: 6507,10252,7/6/2014T4:42:0 +[FREE] Freed bytes from 2000F400 main.c: Returning timestamped data... main.c: Putting data in buffers... -main.c: Putting data: 1114260,6/6/2014T19:53:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 1114260,6/6/2014T19:53:1 -main.c: Memory freed - main.c: Putting data: 39174,29066,6/6/2014T19:53:1 +main.c: Putting data: 39172,29020,7/6/2014T4:42:0 buffer.c: Joining buffer... +[ALLOC] Allocated 4 bytes to 2000EFC8 +[ALLOC] Allocated 28 bytes to 2000F478 buffer.c: Data copied -main.c: Message put: 39174,29066,6/6/2014T19:53:1 +main.c: Message put: 39172,29020,7/6/2014T4:42:0 +[FREE] Freed bytes from 2000F428 main.c: Memory freed - main.c: Putting data: 6541,10300,6/6/2014T19:53:1 + main.c: Putting data: 6507,10252,7/6/2014T4:42:0 buffer.c: Joining buffer... +[ALLOC] Allocated 4 bytes to 2000EFD8 +[ALLOC] Allocated 27 bytes to 2000F428 buffer.c: Data copied -main.c: Message put: 6541,10300,6/6/2014T19:53:1 +main.c: Message put: 6507,10252,7/6/2014T4:42:0 +[FREE] Freed bytes from 2000F450 main.c: Memory freed main.c: Data is now in buffer buffer.c: Checking available memory... -buffer.c: Available memory: 33528 B -buffer.c: Used memory: 1176 B -main.c: Time (absolute): 3611065981 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611066040 +buffer.c: Available memory: 33600 B +buffer.c: Used memory: 1104 B +main.c: Time (absolute): 3611097720 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Time (absolute): 3611097780 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 10 -sensors.c: [LIGHT] CH0 = 91 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066040 +[ALLOC] Allocated 12 bytes to 2000F400 +[ALLOC] Allocated 12 bytes to 2000F450 +main.c: Time (absolute): 3611097780 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611066040 +main.c: Timestamp (absolute): 3611097780 Timestamp LONG_PERIOD: 0 Timestamp SHORT_PERIOD: 0 main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 1048721,6/6/2014T19:54:0 -ntp.c: Writing timestamp... -main.c: Data is: 39176,29062,6/6/2014T19:54:0 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10280,6/6/2014T19:54:0 +[ALLOC] Allocated 8 bytes to 2000F468 +[ALLOC] Allocated 32 bytes to 2000F4A0 +main.c: Data is: 39176,29013,7/6/2014T4:43:0 +[FREE] Freed bytes from 2000F400 +[ALLOC] Allocated 31 bytes to 2000F4C8 +main.c: Data is: 6506,10268,7/6/2014T4:43:0 +[FREE] Freed bytes from 2000F450 main.c: Returning timestamped data... main.c: Putting data in buffers... -main.c: Putting data: 1048721,6/6/2014T19:54:0 +main.c: Putting data: 39176,29013,7/6/2014T4:43:0 buffer.c: Joining buffer... +[ALLOC] Allocated 8 bytes to 2000F400 +[ALLOC] Allocated 28 bytes to 2000F4F0 +[FREE] Freed bytes from 2000F478 +[FREE] Freed bytes from 2000EFC8 +[ALLOC] Allocated 28 bytes to 2000F478 buffer.c: Data copied -main.c: Message put: 1048721,6/6/2014T19:54:0 +main.c: Message put: 39176,29013,7/6/2014T4:43:0 +[FREE] Freed bytes from 2000F4A0 main.c: Memory freed - main.c: Putting data: 39176,29062,6/6/2014T19:54:0 + main.c: Putting data: 6506,10268,7/6/2014T4:43:0 buffer.c: Joining buffer... +[ALLOC] Allocated 8 bytes to 2000EFC8 +[ALLOC] Allocated 27 bytes to 2000F4A0 +[FREE] Freed bytes from 2000F428 +[FREE] Freed bytes from 2000EFD8 +[ALLOC] Allocated 27 bytes to 2000F428 buffer.c: Data copied -main.c: Message put: 39176,29062,6/6/2014T19:54:0 -main.c: Memory freed - main.c: Putting data: 6541,10280,6/6/2014T19:54:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6541,10280,6/6/2014T19:54:0 +main.c: Message put: 6506,10268,7/6/2014T4:43:0 +[FREE] Freed bytes from 2000F4C8 main.c: Memory freed main.c: Data is now in buffer buffer.c: Checking available memory... -buffer.c: Available memory: 33376 B -buffer.c: Used memory: 1328 B -main.c: Time (absolute): 3611066041 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611066100 +buffer.c: Available memory: 33488 B +buffer.c: Used memory: 1216 B +main.c: Time (absolute): 3611097780 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Time (absolute): 3611097840 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 83 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066100 +[ALLOC] Allocated 12 bytes to 2000F450 +[ALLOC] Allocated 12 bytes to 2000F4C8 +main.c: Time (absolute): 3611097840 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611066100 +main.c: Timestamp (absolute): 3611097840 Timestamp LONG_PERIOD: 0 Timestamp SHORT_PERIOD: 0 main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983171,6/6/2014T19:55:0 -ntp.c: Writing timestamp... -main.c: Data is: 39176,29062,6/6/2014T19:55:0 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10304,6/6/2014T19:55:0 +[ALLOC] Allocated 8 bytes to 2000EFD8 +[ALLOC] Allocated 32 bytes to 2000F518 +main.c: Data is: 39184,29009,7/6/2014T4:44:0 +[FREE] Freed bytes from 2000F450 +[ALLOC] Allocated 31 bytes to 2000F540 +main.c: Data is: 6499,10193,7/6/2014T4:44:0 +[FREE] Freed bytes from 2000F4C8 main.c: Returning timestamped data... main.c: Putting data in buffers... -main.c: Putting data: 983171,6/6/2014T19:55:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983171,6/6/2014T19:55:0 -main.c: Memory freed - main.c: Putting data: 39176,29062,6/6/2014T19:55:0 +main.c: Putting data: 39184,29009,7/6/2014T4:44:0 buffer.c: Joining buffer... +[ALLOC] Allocated 12 bytes to 2000F450 +[ALLOC] Allocated 28 bytes to 2000F4C8 +[FREE] Freed bytes from 2000F4F0 +[ALLOC] Allocated 28 bytes to 2000F4F0 +[FREE] Freed bytes from 2000F478 +[FREE] Freed bytes from 2000F400 +[ALLOC] Allocated 28 bytes to 2000F478 buffer.c: Data copied -main.c: Message put: 39176,29062,6/6/2014T19:55:0 +main.c: Message put: 39184,29009,7/6/2014T4:44:0 +[FREE] Freed bytes from 2000F518 main.c: Memory freed - main.c: Putting data: 6541,10304,6/6/2014T19:55:0 + main.c: Putting data: 6499,10193,7/6/2014T4:44:0 buffer.c: Joining buffer... +[ALLOC] Allocated 12 bytes to 2000F400 +[ALLOC] Allocated 27 bytes to 2000F518 +[FREE] Freed bytes from 2000F4A0 +[ALLOC] Allocated 27 bytes to 2000F4A0 +[FREE] Freed bytes from 2000F428 +[FREE] Freed bytes from 2000EFC8 +[ALLOC] Allocated 27 bytes to 2000F428 buffer.c: Data copied -main.c: Message put: 6541,10304,6/6/2014T19:55:0 +main.c: Message put: 6499,10193,7/6/2014T4:44:0 +[FREE] Freed bytes from 2000F540 main.c: Memory freed main.c: Data is now in buffer main.c: Programmed send cycle... @@ -363,1114 +263,327 @@ Timestamp SHORT_PERIOD: 0 main.c: SSID = SERVER_WLAN main.c: Wep key = TGW2YHNKT9TW main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 1114260,6/6/2014T19:53:1 with length 24 -json.c: Preparing: 1048721,6/6/2014T19:54:0 with length 24 -json.c: Preparing: 983171,6/6/2014T19:55:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 170 - -{"observations":[{"value":"1114260","timestamp":"6/6/2014T19:53:1"},{"value":"1048721","timestamp":"6/6/2014T19:54:0"},{"value":"983171","timestamp":"6/6/2014T19:55:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39174,29066,6/6/2014T19:53:1 with length 28 -json.c: Preparing: 39176,29062,6/6/2014T19:54:0 with length 28 -json.c: Preparing: 39176,29062,6/6/2014T19:55:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39174,29066","timestamp":"6/6/2014T19:53:1"},{"value":"39176,29062","timestamp":"6/6/2014T19:54:0"},{"value":"39176,29062","timestamp":"6/6/2014T19:55:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6541,10300,6/6/2014T19:53:1 with length 27 -json.c: Preparing: 6541,10280,6/6/2014T19:54:0 with length 27 -json.c: Preparing: 6541,10304,6/6/2014T19:55:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6541,10300","timestamp":"6/6/2014T19:53:1"},{"value":"6541,10280","timestamp":"6/6/2014T19:54:0"},{"value":"6541,10304","timestamp":"6/6/2014T19:55:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T19:55:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T19:55:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611066114 -main.c: Updating new time to 3611066114 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611066114 -Time LONG_PERIOD: 42 -Time SHORT_PERIOD: 14 -buffer.c: Checking available memory... -buffer.c: Available memory: 33632 B -buffer.c: Used memory: 1072 B -main.c: Time (absolute): 3611066115 +main.c: User = +main.c: Password = +main.c: Encryption type = 4 +main.c: Geo Localization = 41.557255 2.096183 +main.c: WPA network detected +Connected +Connected to: 00:26:5B:D9:0D:18 +main.c: Sending buffer 0 +buffer.c: Preparing JSON statement... +[ALLOC] Allocated 18 bytes to 2000F328 +[ALLOC] Allocated 12 bytes to 2000F570 +[ALLOC] Allocated 16 bytes to 2000FC60 +[ALLOC] Allocated 22 bytes to 2000FC78 +[ALLOC] Allocated 37 bytes to 2000FC98 +[ALLOC] Allocated 52 bytes to 2000FCC8 +[FREE] Freed bytes from 2000FC98 +[FREE] Freed bytes from 2000FC60 +[ALLOC] Allocated 55 bytes to 20010040 +[FREE] Freed bytes from 2000FC78 +[FREE] Freed bytes from 2000FCC8 +[FREE] Freed bytes from 2000F570 +[ALLOC] Allocated 72 bytes to 2000FC60 +[FREE] Freed bytes from 2000F328 +[FREE] Freed bytes from 20010040 +[ALLOC] Allocated 12 bytes to 2000F328 +[ALLOC] Allocated 16 bytes to 2000F570 +[ALLOC] Allocated 22 bytes to 2000FCB0 +[ALLOC] Allocated 37 bytes to 2000FCD0 +[ALLOC] Allocated 52 bytes to 20010040 +[FREE] Freed bytes from 2000FCD0 +[FREE] Freed bytes from 2000F570 +[ALLOC] Allocated 55 bytes to 2000FCD0 +[FREE] Freed bytes from 2000FCB0 +[FREE] Freed bytes from 20010040 +[FREE] Freed bytes from 2000F328 +[ALLOC] Allocated 126 bytes to 20010040 +[FREE] Freed bytes from 2000FC60 +[FREE] Freed bytes from 2000FCD0 +[ALLOC] Allocated 12 bytes to 2000F328 +[ALLOC] Allocated 16 bytes to 2000F570 +[ALLOC] Allocated 22 bytes to 2000FC60 +[ALLOC] Allocated 37 bytes to 2000FC80 +[ALLOC] Allocated 52 bytes to 2000FCB0 +[FREE] Freed bytes from 2000FC80 +[FREE] Freed bytes from 2000F570 +[ALLOC] Allocated 55 bytes to 200100C8 +[FREE] Freed bytes from 2000FC60 +[FREE] Freed bytes from 2000FCB0 +[FREE] Freed bytes from 2000F328 +[ALLOC] Allocated 180 bytes to 20010108 +[FREE] Freed bytes from 20010040 +[FREE] Freed bytes from 200100C8 +[ALLOC] Allocated 182 bytes to 20010040 +[FREE] Freed bytes from 20010108 +[ALLOC] Allocated 14 bytes to 2000F328 +[ALLOC] Allocated 62 bytes to 2000FC60 +[ALLOC] Allocated 350 bytes to 20010100 +[ALLOC] Allocated 4 bytes to 2000F570 +[FREE] Freed bytes from 2000F570 +[FREE] Freed bytes from 20010100 +[ALLOC] Allocated 4 bytes to 2000FC20 +[FREE] Freed bytes from 2000FC20 +[FREE] Freed bytes from 2000FC60 +[FREE] Freed bytes from 2000F328 +[FREE] Freed bytes from 20010040 +buffer.c: Data sent successfully +[FREE] Freed bytes from 2000F4C8 +[FREE] Freed bytes from 2000F4F0 +[FREE] Freed bytes from 2000F478 +[FREE] Freed bytes from 2000F450 +main.c: Sending buffer 1 +buffer.c: Preparing JSON statement... +[ALLOC] Allocated 18 bytes to 2000F328 +[ALLOC] Allocated 11 bytes to 2000F450 +[ALLOC] Allocated 16 bytes to 2000F478 +[ALLOC] Allocated 21 bytes to 2000F4C8 +[ALLOC] Allocated 36 bytes to 2000F4E8 +[ALLOC] Allocated 51 bytes to 2000FC60 +[FREE] Freed bytes from 2000F4E8 +[FREE] Freed bytes from 2000F478 +[ALLOC] Allocated 54 bytes to 20010040 +[FREE] Freed bytes from 2000F4C8 +[FREE] Freed bytes from 2000FC60 +[FREE] Freed bytes from 2000F450 +[ALLOC] Allocated 71 bytes to 2000F4C8 +[FREE] Freed bytes from 2000F328 +[FREE] Freed bytes from 20010040 +[ALLOC] Allocated 11 bytes to 2000F328 +[ALLOC] Allocated 16 bytes to 2000F450 +[ALLOC] Allocated 21 bytes to 2000F478 +[ALLOC] Allocated 36 bytes to 2000FC60 +[ALLOC] Allocated 51 bytes to 2000FC90 +[FREE] Freed bytes from 2000FC60 +[FREE] Freed bytes from 2000F450 +[ALLOC] Allocated 54 bytes to 2000FCD0 +[FREE] Freed bytes from 2000F478 +[FREE] Freed bytes from 2000FC90 +[FREE] Freed bytes from 2000F328 +[ALLOC] Allocated 124 bytes to 20010040 +[FREE] Freed bytes from 2000F4C8 +[FREE] Freed bytes from 2000FCD0 +[ALLOC] Allocated 11 bytes to 2000F328 +[ALLOC] Allocated 16 bytes to 2000F450 +[ALLOC] Allocated 21 bytes to 2000F478 +[ALLOC] Allocated 36 bytes to 2000F4C8 +[ALLOC] Allocated 51 bytes to 2000FC60 +[FREE] Freed bytes from 2000F4C8 +[FREE] Freed bytes from 2000F450 +[ALLOC] Allocated 54 bytes to 2000F4C8 +[FREE] Freed bytes from 2000F478 +[FREE] Freed bytes from 2000FC60 +[FREE] Freed bytes from 2000F328 +[ALLOC] Allocated 177 bytes to 200100C8 +[FREE] Freed bytes from 20010040 +[FREE] Freed bytes from 2000F4C8 +[ALLOC] Allocated 179 bytes to 20010188 +[FREE] Freed bytes from 200100C8 +[ALLOC] Allocated 14 bytes to 2000F328 +[ALLOC] Allocated 62 bytes to 2000F4C8 +[ALLOC] Allocated 347 bytes to 20010248 +[ALLOC] Allocated 4 bytes to 2000F450 +[FREE] Freed bytes from 2000F450 +[FREE] Freed bytes from 20010248 +[ALLOC] Allocated 4 bytes to 2000F478 +[FREE] Freed bytes from 2000F478 +[FREE] Freed bytes from 2000F4C8 +[FREE] Freed bytes from 2000F328 +[FREE] Freed bytes from 20010188 +buffer.c: Data sent successfully +[FREE] Freed bytes from 2000F518 +[FREE] Freed bytes from 2000F4A0 +[FREE] Freed bytes from 2000F428 +[FREE] Freed bytes from 2000F400 +main.c: Polling battery level... +[ALLOC] Allocated 12 bytes to 2000F328 +[ALLOC] Allocated 25 bytes to 2000F428 +[FREE] Freed bytes from 2000F328 +[ALLOC] Allocated 18 bytes to 2000F328 +[ALLOC] Allocated 5 bytes to 2000F400 +[ALLOC] Allocated 16 bytes to 2000F450 +[ALLOC] Allocated 15 bytes to 2000F478 +[ALLOC] Allocated 30 bytes to 2000F490 +[ALLOC] Allocated 45 bytes to 2000F4B8 +[FREE] Freed bytes from 2000F490 +[FREE] Freed bytes from 2000F450 +[ALLOC] Allocated 48 bytes to 2000F4F0 +[FREE] Freed bytes from 2000F478 +[FREE] Freed bytes from 2000F4B8 +[FREE] Freed bytes from 2000F400 +[ALLOC] Allocated 65 bytes to 2000F478 +[FREE] Freed bytes from 2000F328 +[FREE] Freed bytes from 2000F4F0 +[ALLOC] Allocated 67 bytes to 2000F4C8 +[FREE] Freed bytes from 2000F478 +[FREE] Freed bytes from 2000F428 +[ALLOC] Allocated 14 bytes to 2000F328 +[ALLOC] Allocated 62 bytes to 2000F478 +[ALLOC] Allocated 234 bytes to 20010040 +[ALLOC] Allocated 3 bytes to 2000F400 +[FREE] Freed bytes from 2000F400 +[FREE] Freed bytes from 20010040 +[ALLOC] Allocated 4 bytes to 2000F428 +[FREE] Freed bytes from 2000F428 +[FREE] Freed bytes from 2000F478 +[FREE] Freed bytes from 2000F328 +[FREE] Freed bytes from 2000F4C8 +main.c: Requesting new NTP time... +main.c: Updating new time to 3611097855 +main.c: Time updated +main.c: Disconnecting wifi... +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS +main.c: New NTP time (absolute): 3611097855 Time LONG_PERIOD: 45 Time SHORT_PERIOD: 15 -timer-loop.c: Time to sleep! for 45 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611066160 +buffer.c: Checking available memory... +buffer.c: Available memory: 33576 B +buffer.c: Used memory: 1128 B +main.c: Time (absolute): 3611097856 +Time LONG_PERIOD: 48 +Time SHORT_PERIOD: 16 +Failed +main.c: Time (absolute): 3611097900 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 10 -sensors.c: [LIGHT] CH0 = 92 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066160 +[ALLOC] Allocated 12 bytes to 2000F328 +[ALLOC] Allocated 12 bytes to 2000F428 +main.c: Time (absolute): 3611097900 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611066160 +main.c: Timestamp (absolute): 3611097900 Timestamp LONG_PERIOD: 0 Timestamp SHORT_PERIOD: 0 main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 1048722,6/6/2014T19:56:0 -ntp.c: Writing timestamp... -main.c: Data is: 39176,29061,6/6/2014T19:56:0 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10323,6/6/2014T19:56:0 +[ALLOC] Allocated 8 bytes to 2000F408 +[ALLOC] Allocated 32 bytes to 2000F440 +main.c: Data is: 39186,29010,7/6/2014T4:45:0 +[FREE] Freed bytes from 2000F328 +[ALLOC] Allocated 31 bytes to 2000F478 +main.c: Data is: 6498,10182,7/6/2014T4:45:0 +[FREE] Freed bytes from 2000F428 main.c: Returning timestamped data... main.c: Putting data in buffers... -main.c: Putting data: 1048722,6/6/2014T19:56:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 1048722,6/6/2014T19:56:0 -main.c: Memory freed - main.c: Putting data: 39176,29061,6/6/2014T19:56:0 +main.c: Putting data: 39186,29010,7/6/2014T4:45:0 buffer.c: Joining buffer... +[ALLOC] Allocated 4 bytes to 2000F328 +[ALLOC] Allocated 28 bytes to 2000F4A0 buffer.c: Data copied -main.c: Message put: 39176,29061,6/6/2014T19:56:0 +main.c: Message put: 39186,29010,7/6/2014T4:45:0 +[FREE] Freed bytes from 2000F440 main.c: Memory freed - main.c: Putting data: 6541,10323,6/6/2014T19:56:0 + main.c: Putting data: 6498,10182,7/6/2014T4:45:0 buffer.c: Joining buffer... +[ALLOC] Allocated 4 bytes to 2000F338 +[ALLOC] Allocated 27 bytes to 2000F428 buffer.c: Data copied -main.c: Message put: 6541,10323,6/6/2014T19:56:0 +main.c: Message put: 6498,10182,7/6/2014T4:45:0 +[FREE] Freed bytes from 2000F478 main.c: Memory freed main.c: Data is now in buffer buffer.c: Checking available memory... buffer.c: Available memory: 33456 B buffer.c: Used memory: 1248 B -main.c: Time (absolute): 3611066160 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611066220 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 10 -sensors.c: [LIGHT] CH0 = 90 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066221 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611066221 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 1048720,6/6/2014T19:57:1 -ntp.c: Writing timestamp... -main.c: Data is: 39183,29064,6/6/2014T19:57:1 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10308,6/6/2014T19:57:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 1048720,6/6/2014T19:57:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 1048720,6/6/2014T19:57:1 -main.c: Memory freed - main.c: Putting data: 39183,29064,6/6/2014T19:57:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39183,29064,6/6/2014T19:57:1 -main.c: Memory freed - main.c: Putting data: 6541,10308,6/6/2014T19:57:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6541,10308,6/6/2014T19:57:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 33304 B -buffer.c: Used memory: 1400 B -main.c: Time (absolute): 3611066221 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611066280 +main.c: Time (absolute): 3611097900 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 10 -sensors.c: [LIGHT] CH0 = 93 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066281 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611066281 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 1048723,6/6/2014T19:58:1 -ntp.c: Writing timestamp... -main.c: Data is: 39180,29066,6/6/2014T19:58:1 -ntp.c: Writing timestamp... -main.c: Data is: 6542,10323,6/6/2014T19:58:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 1048723,6/6/2014T19:58:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 1048723,6/6/2014T19:58:1 -main.c: Memory freed - main.c: Putting data: 39180,29066,6/6/2014T19:58:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39180,29066,6/6/2014T19:58:1 -main.c: Memory freed - main.c: Putting data: 6542,10323,6/6/2014T19:58:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6542,10323,6/6/2014T19:58:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 1048722,6/6/2014T19:56:0 with length 24 -json.c: Preparing: 1048720,6/6/2014T19:57:1 with length 24 -json.c: Preparing: 1048723,6/6/2014T19:58:1 with length 24 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 171 - -{"observations":[{"value":"1048722","timestamp":"6/6/2014T19:56:0"},{"value":"1048720","timestamp":"6/6/2014T19:57:1"},{"value":"1048723","timestamp":"6/6/2014T19:58:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39176,29061,6/6/2014T19:56:0 with length 28 -json.c: Preparing: 39183,29064,6/6/2014T19:57:1 with length 28 -json.c: Preparing: 39180,29066,6/6/2014T19:58:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39176,29061","timestamp":"6/6/2014T19:56:0"},{"value":"39183,29064","timestamp":"6/6/2014T19:57:1"},{"value":"39180,29066","timestamp":"6/6/2014T19:58:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6541,10323,6/6/2014T19:56:0 with length 27 -json.c: Preparing: 6541,10308,6/6/2014T19:57:1 with length 27 -json.c: Preparing: 6542,10323,6/6/2014T19:58:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6541,10323","timestamp":"6/6/2014T19:56:0"},{"value":"6541,10308","timestamp":"6/6/2014T19:57:1"},{"value":"6542,10323","timestamp":"6/6/2014T19:58:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T19:58:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T19:58:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611066296 -main.c: Updating new time to 3611066296 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611066296 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 33536 B -buffer.c: Used memory: 1168 B -main.c: Time (absolute): 3611066296 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611066340 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command€űsensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 10 -sensors.c: [LIGHT] CH0 = 92 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066341 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611066341 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 1048722,6/6/2014T19:59:1 -ntp.c: Writing timestamp... -main.c: Data is: 39172,29066,6/6/2014T19:59:1 -ntp.c: Writing timestamp... -main.c: Data is: 6544,10304,6/6/2014T19:59:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 1048722,6/6/2014T19:59:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 1048722,6/6/2014T19:59:1 -main.c: Memory freed - main.c: Putting data: 39172,29066,6/6/2014T19:59:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39172,29066,6/6/2014T19:59:1 -main.c: Memory freed - main.c: Putting data: 6544,10304,6/6/2014T19:59:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6544,10304,6/6/2014T19:59:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 33360 B -buffer.c: Used memory: 1344 B -main.c: Time (absolute): 3611066341 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611066400 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 10 -sensors.c: [LIGHT] CH0 = 92 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066401 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611066401 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 1048722,6/6/2014T20:0:1 -ntp.c: Writing timestamp... -main.c: Data is: 39182,29066,6/6/2014T20:0:1 -ntp.c: Writing timestamp... -main.c: Data is: 6542,10288,6/6/2014T20:0:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 1048722,6/6/2014T20:0:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 1048722,6/6/2014T20:0:1 -main.c: Memory freed - main.c: Putting data: 39182,29066,6/6/2014T20:0:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39182,29066,6/6/2014T20:0:1 -main.c: Memory freed - main.c: Putting data: 6542,10288,6/6/2014T20:0:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6542,10288,6/6/2014T20:0:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 33216 B -buffer.c: Used memory: 1488 B -main.c: Time (absolute): 3611066401 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611066460 +main.c: Time (absolute): 3611097960 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 10 -sensors.c: [LIGHT] CH0 = 92 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066461 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611066461 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 1048722,6/6/2014T20:1:1 -ntp.c: Writing timestamp... -main.c: Data is: 39181,29065,6/6/2014T20:1:1 -ntp.c: Writing timestamp... -main.c: Data is: 6544,10327,6/6/2014T20:1:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 1048722,6/6/2014T20:1:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 1048722,6/6/2014T20:1:1 -main.c: Memory freed - main.c: Putting data: 39181,29065,6/6/2014T20:1:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39181,29065,6/6/2014T20:1:1 -main.c: Memory freed - main.c: Putting data: 6544,10327,6/6/2014T20:1:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6544,10327,6/6/2014T20:1:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 1048722,6/6/2014T19:59:1 with length 24 -json.c: Preparing: 1048722,6/6/2014T20:0:1 with length 23 -json.c: Preparing: 1048722,6/6/2014T20:1:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 169 - -{"observations":[{"value":"1048722","timestamp":"6/6/2014T19:59:1"},{"value":"1048722","timestamp":"6/6/2014T20:0:1"},{"value":"1048722","timestamp":"6/6/2014T20:1:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39172,29066,6/6/2014T19:59:1 with length 28 -json.c: Preparing: 39182,29066,6/6/2014T20:0:1 with length 27 -json.c: Preparing: 39181,29065,6/6/2014T20:1:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 181 - -{"observations":[{"value":"39172,29066","timestamp":"6/6/2014T19:59:1"},{"value":"39182,29066","timestamp":"6/6/2014T20:0:1"},{"value":"39181,29065","timestamp":"6/6/2014T20:1:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6544,10304,6/6/2014T19:59:1 with length 27 -json.c: Preparing: 6542,10288,6/6/2014T20:0:1 with length 26 -json.c: Preparing: 6544,10327,6/6/2014T20:1:1 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 178 - -{"observations":[{"value":"6544,10304","timestamp":"6/6/2014T19:59:1"},{"value":"6542,10288","timestamp":"6/6/2014T20:0:1"},{"value":"6544,10327","timestamp":"6/6/2014T20:1:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:1:1 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:1:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611066476 -main.c: Updating new time to 3611066476 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611066476 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 33448 B -buffer.c: Used memory: 1256 B -main.c: Time (absolute): 3611066476 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611066520 +[ALLOC] Allocated 12 bytes to 2000F450 +[ALLOC] Allocated 12 bytes to 2000F478 +main.c: Time (absolute): 3611097960 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 10 -sensors.c: [LIGHT] CH0 = 92 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066521 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611066521 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 +main.c: Timestamp (absolute): 3611097960 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 1048722,6/6/2014T20:2:1 -ntp.c: Writing timestamp... -main.c: Data is: 39178,29064,6/6/2014T20:2:1 -ntp.c: Writing timestamp... -main.c: Data is: 6542,10315,6/6/2014T20:2:1 +[ALLOC] Allocated 8 bytes to 2000F490 +[ALLOC] Allocated 32 bytes to 2000F4C8 +main.c: Data is: 39180,29010,7/6/2014T4:46:0 +[FREE] Freed bytes from 2000F450 +[ALLOC] Allocated 31 bytes to 2000F4F0 +main.c: Data is: 6496,10162,7/6/2014T4:46:0 +[FREE] Freed bytes from 2000F478 main.c: Returning timestamped data... main.c: Putting data in buffers... -main.c: Putting data: 1048722,6/6/2014T20:2:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 1048722,6/6/2014T20:2:1 -main.c: Memory freed - main.c: Putting data: 39178,29064,6/6/2014T20:2:1 +main.c: Putting data: 39180,29010,7/6/2014T4:46:0 buffer.c: Joining buffer... +[ALLOC] Allocated 8 bytes to 2000F450 +[ALLOC] Allocated 28 bytes to 2000F518 +[FREE] Freed bytes from 2000F4A0 +[FREE] Freed bytes from 2000F328 +[ALLOC] Allocated 28 bytes to 2000F4A0 buffer.c: Data copied -main.c: Message put: 39178,29064,6/6/2014T20:2:1 +main.c: Message put: 39180,29010,7/6/2014T4:46:0 +[FREE] Freed bytes from 2000F4C8 main.c: Memory freed - main.c: Putting data: 6542,10315,6/6/2014T20:2:1 + main.c: Putting data: 6496,10162,7/6/2014T4:46:0 buffer.c: Joining buffer... +[ALLOC] Allocated 8 bytes to 2000F328 +[ALLOC] Allocated 27 bytes to 2000F4C8 +[FREE] Freed bytes from 2000F428 +[FREE] Freed bytes from 2000F338 +[ALLOC] Allocated 27 bytes to 2000F428 buffer.c: Data copied -main.c: Message put: 6542,10315,6/6/2014T20:2:1 +main.c: Message put: 6496,10162,7/6/2014T4:46:0 +[FREE] Freed bytes from 2000F4F0 main.c: Memory freed main.c: Data is now in buffer buffer.c: Checking available memory... -buffer.c: Available memory: 33280 B -buffer.c: Used memory: 1424 B -main.c: Time (absolute): 3611066521 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611066580 +buffer.c: Available memory: 33344 B +buffer.c: Used memory: 1360 B +main.c: Time (absolute): 3611097960 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 10 -sensors.c: [LIGHT] CH0 = 92 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066581 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611066581 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 1048722,6/6/2014T20:3:1 -ntp.c: Writing timestamp... -main.c: Data is: 39182,29064,6/6/2014T20:3:1 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10315,6/6/2014T20:3:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 1048722,6/6/2014T20:3:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 1048722,6/6/2014T20:3:1 -main.c: Memory freed - main.c: Putting data: 39182,29064,6/6/2014T20:3:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39182,29064,6/6/2014T20:3:1 -main.c: Memory freed - main.c: Putting data: 6541,10315,6/6/2014T20:3:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6541,10315,6/6/2014T20:3:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 33160 B -buffer.c: Used memory: 1544 B -main.c: Time (absolute): 3611066581 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611066640 +main.c: Time (absolute): 3611098020 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 10 -sensors.c: [LIGHT] CH0 = 92 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066640 +[ALLOC] Allocated 12 bytes to 2000F478 +[ALLOC] Allocated 12 bytes to 2000F4F0 +main.c: Time (absolute): 3611098020 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611066640 +main.c: Timestamp (absolute): 3611098020 Timestamp LONG_PERIOD: 0 Timestamp SHORT_PERIOD: 0 main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 1048722,6/6/2014T20:4:0 -ntp.c: Writing timestamp... -main.c: Data is: 39184,29064,6/6/2014T20:4:0 -ntp.c: Writing timestamp... -main.c: Data is: 6542,10327,6/6/2014T20:4:0 +[ALLOC] Allocated 8 bytes to 2000F338 +[ALLOC] Allocated 32 bytes to 2000FC20 +main.c: Data is: 39184,29008,7/6/2014T4:47:0 +[FREE] Freed bytes from 2000F478 +[ALLOC] Allocated 31 bytes to 2000FCC0 +main.c: Data is: 6500,10233,7/6/2014T4:47:0 +[FREE] Freed bytes from 2000F4F0 main.c: Returning timestamped data... main.c: Putting data in buffers... -main.c: Putting data: 1048722,6/6/2014T20:4:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 1048722,6/6/2014T20:4:0 -main.c: Memory freed - main.c: Putting data: 39184,29064,6/6/2014T20:4:0 +main.c: Putting data: 39184,29008,7/6/2014T4:47:0 buffer.c: Joining buffer... +[ALLOC] Allocated 12 bytes to 2000F478 +[ALLOC] Allocated 28 bytes to 2000F4F0 +[FREE] Freed bytes from 2000F518 +[ALLOC] Allocated 28 bytes to 2000F518 +[FREE] Freed bytes from 2000F4A0 +[FREE] Freed bytes from 2000F450 +[ALLOC] Allocated 28 bytes to 2000F4A0 buffer.c: Data copied -main.c: Message put: 39184,29064,6/6/2014T20:4:0 +main.c: Message put: 39184,29008,7/6/2014T4:47:0 +[FREE] Freed bytes from 2000FC20 main.c: Memory freed - main.c: Putting data: 6542,10327,6/6/2014T20:4:0 + main.c: Putting data: 6500,10233,7/6/2014T4:47:0 buffer.c: Joining buffer... +[ALLOC] Allocated 12 bytes to 2000F450 +[ALLOC] Allocated 27 bytes to 2000FC20 +[FREE] Freed bytes from 2000F4C8 +[ALLOC] Allocated 27 bytes to 2000F4C8 +[FREE] Freed bytes from 2000F428 +[FREE] Freed bytes from 2000F328 +[ALLOC] Allocated 27 bytes to 2000F428 buffer.c: Data copied -main.c: Message put: 6542,10327,6/6/2014T20:4:0 +main.c: Message put: 6500,10233,7/6/2014T4:47:0 +[FREE] Freed bytes from 2000FCC0 main.c: Memory freed main.c: Data is now in buffer main.c: Programmed send cycle... @@ -1478,29501 +591,184 @@ Timestamp SHORT_PERIOD: 0 main.c: SSID = SERVER_WLAN main.c: Wep key = TGW2YHNKT9TW main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 1048722,6/6/2014T20:2:1 with length 23 -json.c: Preparing: 1048722,6/6/2014T20:3:1 with length 23 -json.c: Preparing: 1048722,6/6/2014T20:4:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"1048722","timestamp":"6/6/2014T20:2:1"},{"value":"1048722","timestamp":"6/6/2014T20:3:1"},{"value":"1048722","timestamp":"6/6/2014T20:4:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39178,29064,6/6/2014T20:2:1 with length 27 -json.c: Preparing: 39182,29064,6/6/2014T20:3:1 with length 27 -json.c: Preparing: 39184,29064,6/6/2014T20:4:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"39178,29064","timestamp":"6/6/2014T20:2:1"},{"value":"39182,29064","timestamp":"6/6/2014T20:3:1"},{"value":"39184,29064","timestamp":"6/6/2014T20:4:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6542,10315,6/6/2014T20:2:1 with length 26 -json.c: Preparing: 6541,10315,6/6/2014T20:3:1 with length 26 -json.c: Preparing: 6542,10327,6/6/2014T20:4:0 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 177 - -{"observations":[{"value":"6542,10315","timestamp":"6/6/2014T20:2:1"},{"value":"6541,10315","timestamp":"6/6/2014T20:3:1"},{"value":"6542,10327","timestamp":"6/6/2014T20:4:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:4:0 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:4:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611066656 -main.c: Updating new time to 3611066656 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611066656 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 +main.c: User = +main.c: Password = +main.c: Encryption type = 4 +main.c: Geo Localization = 41.557255 2.096183 +main.c: WPA network detected +Connected +Connected to: 00:26:5B:D9:0D:18 +main.c: Sending buffer 0 +buffer.c: Preparing JSON statement... +[ALLOC] Allocated 18 bytes to 2000F540 +[ALLOC] Allocated 12 bytes to 2000FC48 +[ALLOC] Allocated 16 bytes to 20010018 +[ALLOC] Allocated 22 bytes to 20010030 +[ALLOC] Allocated 37 bytes to 20010050 +[ALLOC] Allocated 52 bytes to 20010080 +[FREE] Freed bytes from 20010050 +[FREE] Freed bytes from 20010018 +[ALLOC] Allocated 55 bytes to 200100C0 +[FREE] Freed bytes from 20010030 +[FREE] Freed bytes from 20010080 +[FREE] Freed bytes from 2000FC48 +[ALLOC] Allocated 72 bytes to 20010018 +[FREE] Freed bytes from 2000F540 +[FREE] Freed bytes from 200100C0 +[ALLOC] Allocated 12 bytes to 2000F540 +[ALLOC] Allocated 16 bytes to 2000F558 +[ALLOC] Allocated 22 bytes to 20010068 +[ALLOC] Allocated 37 bytes to 20010088 +[ALLOC] Allocated 52 bytes to 200100B8 +[FREE] Freed bytes from 20010088 +[FREE] Freed bytes from 2000F558 +[ALLOC] Allocated 55 bytes to 200100F8 +[FREE] Freed bytes from 20010068 +[FREE] Freed bytes from 200100B8 +[FREE] Freed bytes from 2000F540 +[ALLOC] Allocated 126 bytes to 20010068 +[FREE] Freed bytes from 20010018 +[FREE] Freed bytes from 200100F8 +[ALLOC] Allocated 12 bytes to 2000F540 +[ALLOC] Allocated 16 bytes to 2000F558 +[ALLOC] Allocated 22 bytes to 20010018 +[ALLOC] Allocated 37 bytes to 20010038 +[ALLOC] Allocated 52 bytes to 200100F0 +[FREE] Freed bytes from 20010038 +[FREE] Freed bytes from 2000F558 +[ALLOC] Allocated 55 bytes to 20010130 +[FREE] Freed bytes from 20010018 +[FREE] Freed bytes from 200100F0 +[FREE] Freed bytes from 2000F540 +[ALLOC] Allocated 180 bytes to 20010170 +[FREE] Freed bytes from 20010068 +[FREE] Freed bytes from 20010130 +[ALLOC] Allocated 182 bytes to 20010018 +[FREE] Freed bytes from 20010170 +[ALLOC] Allocated 14 bytes to 2000F540 +[ALLOC] Allocated 62 bytes to 200100D8 +[ALLOC] Allocated 350 bytes to 20010120 +[ALLOC] Allocated 4 bytes to 2000F558 +[FREE] Freed bytes from 2000F558 +[FREE] Freed bytes from 20010120 +[ALLOC] Allocated 4 bytes to 2000FC48 +[FREE] Freed bytes from 2000FC48 +[FREE] Freed bytes from 200100D8 +[FREE] Freed bytes from 2000F540 +[FREE] Freed bytes from 20010018 +buffer.c: Data sent successfully +[FREE] Freed bytes from 2000F4F0 +[FREE] Freed bytes from 2000F518 +[FREE] Freed bytes from 2000F4A0 +[FREE] Freed bytes from 2000F478 +main.c: Sending buffer 1 +buffer.c: Preparing JSON statement... +[ALLOC] Allocated 18 bytes to 2000F4A0 +[ALLOC] Allocated 11 bytes to 2000F478 +[ALLOC] Allocated 16 bytes to 2000F4F0 +[ALLOC] Allocated 21 bytes to 2000F508 +[ALLOC] Allocated 36 bytes to 2000F528 +[ALLOC] Allocated 51 bytes to 20010018 +[FREE] Freed bytes from 2000F528 +[FREE] Freed bytes from 2000F4F0 +[ALLOC] Allocated 54 bytes to 2000F528 +[FREE] Freed bytes from 2000F508 +[FREE] Freed bytes from 20010018 +[FREE] Freed bytes from 2000F478 +[ALLOC] Allocated 71 bytes to 20010018 +[FREE] Freed bytes from 2000F4A0 +[FREE] Freed bytes from 2000F528 +[ALLOC] Allocated 11 bytes to 2000F478 +[ALLOC] Allocated 16 bytes to 2000F4A0 +[ALLOC] Allocated 21 bytes to 2000F4F0 +[ALLOC] Allocated 36 bytes to 2000F510 +[ALLOC] Allocated 51 bytes to 20010068 +[FREE] Freed bytes from 2000F510 +[FREE] Freed bytes from 2000F4A0 +[ALLOC] Allocated 54 bytes to 2000F510 +[FREE] Freed bytes from 2000F4F0 +[FREE] Freed bytes from 20010068 +[FREE] Freed bytes from 2000F478 +[ALLOC] Allocated 124 bytes to 20010068 +[FREE] Freed bytes from 20010018 +[FREE] Freed bytes from 2000F510 +[ALLOC] Allocated 11 bytes to 2000F478 +[ALLOC] Allocated 16 bytes to 2000F4A0 +[ALLOC] Allocated 21 bytes to 2000F4F0 +[ALLOC] Allocated 36 bytes to 2000F510 +[ALLOC] Allocated 51 bytes to 20010018 +[FREE] Freed bytes from 2000F510 +[FREE] Freed bytes from 2000F4A0 +[ALLOC] Allocated 54 bytes to 2000F510 +[FREE] Freed bytes from 2000F4F0 +[FREE] Freed bytes from 20010018 +[FREE] Freed bytes from 2000F478 +[ALLOC] Allocated 177 bytes to 200100F0 +[FREE] Freed bytes from 20010068 +[FREE] Freed bytes from 2000F510 +[ALLOC] Allocated 179 bytes to 20010018 +[FREE] Freed bytes from 200100F0 +[ALLOC] Allocated 14 bytes to 2000F478 +[ALLOC] Allocated 62 bytes to 2000F4F0 +[ALLOC] Allocated 347 bytes to 200100D8 +[ALLOC] Allocated 4 bytes to 2000F4A0 +[FREE] Freed bytes from 2000F4A0 +[FREE] Freed bytes from 200100D8 +[ALLOC] Allocated 4 bytes to 2000F4B8 +[FREE] Freed bytes from 2000F4B8 +[FREE] Freed bytes from 2000F4F0 +[FREE] Freed bytes from 2000F478 +[FREE] Freed bytes from 20010018 +buffer.c: Data sent successfully +[FREE] Freed bytes from 2000FC20 +[FREE] Freed bytes from 2000F4C8 +[FREE] Freed bytes from 2000F428 +[FREE] Freed bytes from 2000F450 +main.c: Polling battery level... +[ALLOC] Allocated 12 bytes to 2000F428 +[ALLOC] Allocated 25 bytes to 2000F440 +[FREE] Freed bytes from 2000F428 +[ALLOC] Allocated 18 bytes to 2000F4A0 +[ALLOC] Allocated 5 bytes to 2000F428 +[ALLOC] Allocated 16 bytes to 2000F478 +[ALLOC] Allocated 15 bytes to 2000F4C0 +[ALLOC] Allocated 30 bytes to 2000F4D8 +[ALLOC] Allocated 45 bytes to 2000F500 +[FREE] Freed bytes from 2000F4D8 +[FREE] Freed bytes from 2000F478 +[ALLOC] Allocated 48 bytes to 2000F538 +[FREE] Freed bytes from 2000F4C0 +[FREE] Freed bytes from 2000F500 +[FREE] Freed bytes from 2000F428 +[ALLOC] Allocated 65 bytes to 2000F4C0 +[FREE] Freed bytes from 2000F4A0 +[FREE] Freed bytes from 2000F538 +[ALLOC] Allocated 67 bytes to 2000F510 +[FREE] Freed bytes from 2000F4C0 +[FREE] Freed bytes from 2000F440 +[ALLOC] Allocated 14 bytes to 2000F428 +[ALLOC] Allocated 62 bytes to 2000F4A0 +[ALLOC] Allocated 234 bytes to 20010018 +[ALLOC] Allocated 3 bytes to 2000F440 +[FREE] Freed bytes from 2000F440 +[FREE] Freed bytes from 20010018 +[ALLOC] Allocated 4 bytes to 2000F458 +[FREE] Freed bytes from 2000F458 +[FREE] Freed bytes from 2000F4A0 +[FREE] Freed bytes from 2000F428 +[FREE] Freed bytes from 2000F510 +main.c: Requesting new NTP time... +main.c: Updating new time to 3611098035 +main.c: Time updated +main.c: Disconnecting wifi... +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS +main.c: New NTP time (absolute): 3611098035 +Time LONG_PERIOD: 45 +Time SHORT_PERIOD: 15 buffer.c: Checking available memory... -buffer.c: Available memory: 33264 B -buffer.c: Used memory: 1440 B -main.c: Time (absolute): 3611066656 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611066700 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 10 -sensors.c: [LIGHT] CH0 = 92 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066701 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611066701 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 1048722,6/6/2014T20:5:1 -ntp.c: Writing timestamp... -main.c: Data is: 39180,29065,6/6/2014T20:5:1 -ntp.c: Writing timestamp... -main.c: Data is: 6544,10327,6/6/2014T20:5:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 1048722,6/6/2014T20:5:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 1048722,6/6/2014T20:5:1 -main.c: Memory freed - main.c: Putting data: 39180,29065,6/6/2014T20:5:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39180,29065,6/6/2014T20:5:1 -main.c: Memory freed - main.c: Putting data: 6544,10327,6/6/2014T20:5:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6544,10327,6/6/2014T20:5:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 33096 B -buffer.c: Used memory: 1608 B -main.c: Time (absolute): 3611066701 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611066760 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 10 -sensors.c: [LIGHT] CH0 = 91 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066760 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611066760 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 1048721,6/6/2014T20:6:0 -ntp.c: Writing timestamp... -main.c: Data is: 39184,29067,6/6/2014T20:6:0 -ntp.c: Writing timestamp... -main.c: Data is: 6544,10351,6/6/2014T20:6:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 1048721,6/6/2014T20:6:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 1048721,6/6/2014T20:6:0 -main.c: Memory freed - main.c: Putting data: 39184,29067,6/6/2014T20:6:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39184,29067,6/6/2014T20:6:0 -main.c: Memory freed - main.c: Putting data: 6544,10351,6/6/2014T20:6:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6544,10351,6/6/2014T20:6:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32984 B -buffer.c: Used memory: 1720 B -main.c: Time (absolute): 3611066761 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611066820 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 8F -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066820 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611066820 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983183,6/6/2014T20:7:0 -ntp.c: Writing timestamp... -main.c: Data is: 39184,29065,6/6/2014T20:7:0 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10343,6/6/2014T20:7:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983183,6/6/2014T20:7:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983183,6/6/2014T20:7:0 -main.c: Memory freed - main.c: Putting data: 39184,29065,6/6/2014T20:7:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39184,29065,6/6/2014T20:7:0 -main.c: Memory freed - main.c: Putting data: 6541,10343,6/6/2014T20:7:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6541,10343,6/6/2014T20:7:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 1048722,6/6/2014T20:5:1 with length 23 -json.c: Preparing: 1048721,6/6/2014T20:6:0 with length 23 -json.c: Preparing: 983183,6/6/2014T20:7:0 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 167 - -{"observations":[{"value":"1048722","timestamp":"6/6/2014T20:5:1"},{"value":"1048721","timestamp":"6/6/2014T20:6:0"},{"value":"983183","timestamp":"6/6/2014T20:7:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39180,29065,6/6/2014T20:5:1 with length 27 -json.c: Preparing: 39184,29067,6/6/2014T20:6:0 with length 27 -json.c: Preparing: 39184,29065,6/6/2014T20:7:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"39180,29065","timestamp":"6/6/2014T20:5:1"},{"value":"39184,29067","timestamp":"6/6/2014T20:6:0"},{"value":"39184,29065","timestamp":"6/6/2014T20:7:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6544,10327,6/6/2014T20:5:1 with length 26 -json.c: Preparing: 6544,10351,6/6/2014T20:6:0 with length 26 -json.c: Preparing: 6541,10343,6/6/2014T20:7:0 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 177 - -{"observations":[{"value":"6544,10327","timestamp":"6/6/2014T20:5:1"},{"value":"6544,10351","timestamp":"6/6/2014T20:6:0"},{"value":"6541,10343","timestamp":"6/6/2014T20:7:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:7:0 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:7:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611066836 -main.c: Updating new time to 3611066836 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611066836 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 33184 B -buffer.c: Used memory: 1520 B -main.c: Time (absolute): 3611066836 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611066880 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 8E -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066880 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611066880 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983182,6/6/2014T20:8:0 -ntp.c: Writing timestamp... -main.c: Data is: 39190,29067,6/6/2014T20:8:0 -ntp.c: Writing timestamp... -main.c: Data is: 6542,10343,6/6/2014T20:8:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983182,6/6/2014T20:8:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983182,6/6/2014T20:8:0 -main.c: Memory freed - main.c: Putting data: 39190,29067,6/6/2014T20:8:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39190,29067,6/6/2014T20:8:0 -main.c: Memory freed - main.c: Putting data: 6542,10343,6/6/2014T20:8:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6542,10343,6/6/2014T20:8:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 33024 B -buffer.c: Used memory: 1680 B -main.c: Time (absolute): 3611066880 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611066940 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 91 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611066940 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611066940 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983185,6/6/2014T20:9:0 -ntp.c: Writing timestamp... -main.c: Data is: 39187,29068,6/6/2014T20:9:0 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10347,6/6/2014T20:9:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983185,6/6/2014T20:9:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983185,6/6/2014T20:9:0 -main.c: Memory freed - main.c: Putting data: 39187,29068,6/6/2014T20:9:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39187,29068,6/6/2014T20:9:0 -main.c: Memory freed - main.c: Putting data: 6541,10347,6/6/2014T20:9:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6541,10347,6/6/2014T20:9:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32912 B -buffer.c: Used memory: 1792 B -main.c: Time (absolute): 3611066940 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611067000 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 91 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067001 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611067001 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983185,6/6/2014T20:10:1 -ntp.c: Writing timestamp... -main.c: Data is: 39184,29066,6/6/2014T20:10:1 -ntp.c: Writing timestamp... -main.c: Data is: 6542,10339,6/6/2014T20:10:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983185,6/6/2014T20:10:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983185,6/6/2014T20:10:1 -main.c: Memory freed - main.c: Putting data: 39184,29066,6/6/2014T20:10:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39184,29066,6/6/2014T20:10:1 -main.c: Memory freed - main.c: Putting data: 6542,10339,6/6/2014T20:10:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6542,10339,6/6/2014T20:10:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 983182,6/6/2014T20:8:0 with length 22 -json.c: Preparing: 983185,6/6/2014T20:9:0 with length 22 -json.c: Preparing: 983185,6/6/2014T20:10:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 166 - -{"observations":[{"value":"983182","timestamp":"6/6/2014T20:8:0"},{"value":"983185","timestamp":"6/6/2014T20:9:0"},{"value":"983185","timestamp":"6/6/2014T20:10:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39190,29067,6/6/2014T20:8:0 with length 27 -json.c: Preparing: 39187,29068,6/6/2014T20:9:0 with length 27 -json.c: Preparing: 39184,29066,6/6/2014T20:10:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 181 - -{"observations":[{"value":"39190,29067","timestamp":"6/6/2014T20:8:0"},{"value":"39187,29068","timestamp":"6/6/2014T20:9:0"},{"value":"39184,29066","timestamp":"6/6/2014T20:10:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6542,10343,6/6/2014T20:8:0 with length 26 -json.c: Preparing: 6541,10347,6/6/2014T20:9:0 with length 26 -json.c: Preparing: 6542,10339,6/6/2014T20:10:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 178 - -{"observations":[{"value":"6542,10343","timestamp":"6/6/2014T20:8:0"},{"value":"6541,10347","timestamp":"6/6/2014T20:9:0"},{"value":"6542,10339","timestamp":"6/6/2014T20:10:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:10:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:10:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611067018 -main.c: Updating new time to 3611067018 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611067018 -Time LONG_PERIOD: 54 -Time SHORT_PERIOD: 18 -buffer.c: Checking available memory... -buffer.c: Available memory: 33000 B -buffer.c: Used memory: 1704 B -main.c: Time (absolute): 3611067018 -Time LONG_PERIOD: 54 -Time SHORT_PERIOD: 18 -timer-loop.c: Time to sleep! for 42 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611067060 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 90 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067061 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611067061 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983184,6/6/2014T20:11:1 -ntp.c: Writing timestamp... -main.c: Data is: 39186,29064,6/6/2014T20:11:1 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10343,6/6/2014T20:11:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983184,6/6/2014T20:11:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983184,6/6/2014T20:11:1 -main.c: Memory freed - main.c: Putting data: 39186,29064,6/6/2014T20:11:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39186,29064,6/6/2014T20:11:1 -main.c: Memory freed - main.c: Putting data: 6541,10343,6/6/2014T20:11:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6541,10343,6/6/2014T20:11:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32848 B -buffer.c: Used memory: 1856 B -main.c: Time (absolute): 3611067061 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611067120 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 90 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067121 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611067121 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983184,6/6/2014T20:12:1 -ntp.c: Writing timestamp... -main.c: Data is: 39183,29066,6/6/2014T20:12:1 -ntp.c: Writing timestamp... -main.c: Data is: 6546,10406,6/6/2014T20:12:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983184,6/6/2014T20:12:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983184,6/6/2014T20:12:1 -main.c: Memory freed - main.c: Putting data: 39183,29066,6/6/2014T20:12:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39183,29066,6/6/2014T20:12:1 -main.c: Memory freed - main.c: Putting data: 6546,10406,6/6/2014T20:12:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6546,10406,6/6/2014T20:12:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32728 B -buffer.c: Used memory: 1976 B -main.c: Time (absolute): 3611067121 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611067180 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 90 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067181 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611067181 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983184,6/6/2014T20:13:1 -ntp.c: Writing timestamp... -main.c: Data is: 39185,29064,6/6/2014T20:13:1 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10398,6/6/2014T20:13:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983184,6/6/2014T20:13:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983184,6/6/2014T20:13:1 -main.c: Memory freed - main.c: Putting data: 39185,29064,6/6/2014T20:13:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39185,29064,6/6/2014T20:13:1 -main.c: Memory freed - main.c: Putting data: 6541,10398,6/6/2014T20:13:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6541,10398,6/6/2014T20:13:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 983184,6/6/2014T20:11:1 with length 23 -json.c: Preparing: 983184,6/6/2014T20:12:1 with length 23 -json.c: Preparing: 983184,6/6/2014T20:13:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"983184","timestamp":"6/6/2014T20:11:1"},{"value":"983184","timestamp":"6/6/2014T20:12:1"},{"value":"983184","timestamp":"6/6/2014T20:13:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39186,29064,6/6/2014T20:11:1 with length 28 -json.c: Preparing: 39183,29066,6/6/2014T20:12:1 with length 28 -json.c: Preparing: 39185,29064,6/6/2014T20:13:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39186,29064","timestamp":"6/6/2014T20:11:1"},{"value":"39183,29066","timestamp":"6/6/2014T20:12:1"},{"value":"39185,29064","timestamp":"6/6/2014T20:13:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6541,10343,6/6/2014T20:11:1 with length 27 -json.c: Preparing: 6546,10406,6/6/2014T20:12:1 with length 27 -json.c: Preparing: 6541,10398,6/6/2014T20:13:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6541,10343","timestamp":"6/6/2014T20:11:1"},{"value":"6546,10406","timestamp":"6/6/2014T20:12:1"},{"value":"6541,10398","timestamp":"6/6/2014T20:13:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:13:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:13:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611067197 -main.c: Updating new time to 3611067197 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611067197 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 32928 B -buffer.c: Used memory: 1776 B -main.c: Time (absolute): 3611067197 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611067240 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 90 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067240 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611067240 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983184,6/6/2014T20:14:0 -ntp.c: Writing timestamp... -main.c: Data is: 39184,29064,6/6/2014T20:14:0 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10394,6/6/2014T20:14:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983184,6/6/2014T20:14:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983184,6/6/2014T20:14:0 -main.c: Memory freed - main.c: Putting data: 39184,29064,6/6/2014T20:14:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39184,29064,6/6/2014T20:14:0 -main.c: Memory freed - main.c: Putting data: 6541,10394,6/6/2014T20:14:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6541,10394,6/6/2014T20:14:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32784 B -buffer.c: Used memory: 1920 B -main.c: Time (absolute): 3611067241 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611067300 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 8F -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067300 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611067300 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983183,6/6/2014T20:15:0 -ntp.c: Writing timestamp... -main.c: Data is: 39189,29061,6/6/2014T20:15:0 -ntp.c: Writing timestamp... -main.c: Data is: 6538,10449,6/6/2014T20:15:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983183,6/6/2014T20:15:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983183,6/6/2014T20:15:0 -main.c: Memory freed - main.c: Putting data: 39189,29061,6/6/2014T20:15:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39189,29061,6/6/2014T20:15:0 -main.c: Memory freed - main.c: Putting data: 6538,10449,6/6/2014T20:15:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6538,10449,6/6/2014T20:15:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32656 B -buffer.c: Used memory: 2048 B -main.c: Time (absolute): 3611067300 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611067360 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 8F -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067361 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611067361 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983183,6/6/2014T20:16:1 -ntp.c: Writing timestamp... -main.c: Data is: 39188,29060,6/6/2014T20:16:1 -ntp.c: Writing timestamp... -main.c: Data is: 6537,10410,6/6/2014T20:16:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983183,6/6/2014T20:16:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983183,6/6/2014T20:16:1 -main.c: Memory freed - main.c: Putting data: 39188,29060,6/6/2014T20:16:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39188,29060,6/6/2014T20:16:1 -main.c: Memory freed - main.c: Putting data: 6537,10410,6/6/2014T20:16:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6537,10410,6/6/2014T20:16:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 983184,6/6/2014T20:14:0 with length 23 -json.c: Preparing: 983183,6/6/2014T20:15:0 with length 23 -json.c: Preparing: 983183,6/6/2014T20:16:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"983184","timestamp":"6/6/2014T20:14:0"},{"value":"983183","timestamp":"6/6/2014T20:15:0"},{"value":"983183","timestamp":"6/6/2014T20:16:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39184,29064,6/6/2014T20:14:0 with length 28 -json.c: Preparing: 39189,29061,6/6/2014T20:15:0 with length 28 -json.c: Preparing: 39188,29060,6/6/2014T20:16:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39184,29064","timestamp":"6/6/2014T20:14:0"},{"value":"39189,29061","timestamp":"6/6/2014T20:15:0"},{"value":"39188,29060","timestamp":"6/6/2014T20:16:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6541,10394,6/6/2014T20:14:0 with length 27 -json.c: Preparing: 6538,10449,6/6/2014T20:15:0 with length 27 -json.c: Preparing: 6537,10410,6/6/2014T20:16:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6541,10394","timestamp":"6/6/2014T20:14:0"},{"value":"6538,10449","timestamp":"6/6/2014T20:15:0"},{"value":"6537,10410","timestamp":"6/6/2014T20:16:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:16:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:16:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611067377 -main.c: Updating new time to 3611067377 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611067377 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 32848 B -buffer.c: Used memory: 1856 B -main.c: Time (absolute): 3611067377 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611067420 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 8F -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067420 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611067420 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983183,6/6/2014T20:17:0 -ntp.c: Writing timestamp... -main.c: Data is: 39194,29064,6/6/2014T20:17:0 -ntp.c: Writing timestamp... -main.c: Data is: 6538,10414,6/6/2014T20:17:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983183,6/6/2014T20:17:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983183,6/6/2014T20:17:0 -main.c: Memory freed - main.c: Putting data: 39194,29064,6/6/2014T20:17:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39194,29064,6/6/2014T20:17:0 -main.c: Memory freed - main.c: Putting data: 6538,10414,6/6/2014T20:17:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6538,10414,6/6/2014T20:17:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32696 B -buffer.c: Used memory: 2008 B -main.c: Time (absolute): 3611067420 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611067480 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 8F -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067481 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611067481 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983183,6/6/2014T20:18:1 -ntp.c: Writing timestamp... -main.c: Data is: 39194,29062,6/6/2014T20:18:1 -ntp.c: Writing timestamp... -main.c: Data is: 6535,10433,6/6/2014T20:18:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983183,6/6/2014T20:18:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983183,6/6/2014T20:18:1 -main.c: Memory freed - main.c: Putting data: 39194,29062,6/6/2014T20:18:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39194,29062,6/6/2014T20:18:1 -main.c: Memory freed - main.c: Putting data: 6535,10433,6/6/2014T20:18:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6535,10433,6/6/2014T20:18:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32568 B -buffer.c: Used memory: 2136 B -main.c: Time (absolute): 3611067481 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611067540 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command úsensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 8F -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067541 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611067541 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983183,6/6/2014T20:19:1 -ntp.c: Writing timestamp... -main.c: Data is: 39194,29064,6/6/2014T20:19:1 -ntp.c: Writing timestamp... -main.c: Data is: 6539,10410,6/6/2014T20:19:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983183,6/6/2014T20:19:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983183,6/6/2014T20:19:1 -main.c: Memory freed - main.c: Putting data: 39194,29064,6/6/2014T20:19:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39194,29064,6/6/2014T20:19:1 -main.c: Memory freed - main.c: Putting data: 6539,10410,6/6/2014T20:19:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6539,10410,6/6/2014T20:19:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 983183,6/6/2014T20:17:0 with length 23 -json.c: Preparing: 983183,6/6/2014T20:18:1 with length 23 -json.c: Preparing: 983183,6/6/2014T20:19:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"983183","timestamp":"6/6/2014T20:17:0"},{"value":"983183","timestamp":"6/6/2014T20:18:1"},{"value":"983183","timestamp":"6/6/2014T20:19:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39194,29064,6/6/2014T20:17:0 with length 28 -json.c: Preparing: 39194,29062,6/6/2014T20:18:1 with length 28 -json.c: Preparing: 39194,29064,6/6/2014T20:19:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39194,29064","timestamp":"6/6/2014T20:17:0"},{"value":"39194,29062","timestamp":"6/6/2014T20:18:1"},{"value":"39194,29064","timestamp":"6/6/2014T20:19:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6538,10414,6/6/2014T20:17:0 with length 27 -json.c: Preparing: 6535,10433,6/6/2014T20:18:1 with length 27 -json.c: Preparing: 6539,10410,6/6/2014T20:19:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6538,10414","timestamp":"6/6/2014T20:17:0"},{"value":"6535,10433","timestamp":"6/6/2014T20:18:1"},{"value":"6539,10410","timestamp":"6/6/2014T20:19:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:19:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:19:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611067557 -main.c: Updating new time to 3611067557 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611067557 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 32776 B -buffer.c: Used memory: 1928 B -main.c: Time (absolute): 3611067557 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611067600 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 8F -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067601 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611067601 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983183,6/6/2014T20:20:1 -ntp.c: Writing timestamp... -main.c: Data is: 39190,29064,6/6/2014T20:20:1 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10410,6/6/2014T20:20:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983183,6/6/2014T20:20:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983183,6/6/2014T20:20:1 -main.c: Memory freed - main.c: Putting data: 39190,29064,6/6/2014T20:20:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39190,29064,6/6/2014T20:20:1 -main.c: Memory freed - main.c: Putting data: 6541,10410,6/6/2014T20:20:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6541,10410,6/6/2014T20:20:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32624 B -buffer.c: Used memory: 2080 B -main.c: Time (absolute): 3611067601 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611067660 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 8E -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067661 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611067661 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983182,6/6/2014T20:21:1 -ntp.c: Writing timestamp... -main.c: Data is: 39186,29064,6/6/2014T20:21:1 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10367,6/6/2014T20:21:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983182,6/6/2014T20:21:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983182,6/6/2014T20:21:1 -main.c: Memory freed - main.c: Putting data: 39186,29064,6/6/2014T20:21:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39186,29064,6/6/2014T20:21:1 -main.c: Memory freed - main.c: Putting data: 6541,10367,6/6/2014T20:21:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6541,10367,6/6/2014T20:21:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32480 B -buffer.c: Used memory: 2224 B -main.c: Time (absolute): 3611067661 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611067720 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 8E -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067721 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611067721 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983182,6/6/2014T20:22:1 -ntp.c: Writing timestamp... -main.c: Data is: 39188,29060,6/6/2014T20:22:1 -ntp.c: Writing timestamp... -main.c: Data is: 6539,10453,6/6/2014T20:22:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983182,6/6/2014T20:22:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983182,6/6/2014T20:22:1 -main.c: Memory freed - main.c: Putting data: 39188,29060,6/6/2014T20:22:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39188,29060,6/6/2014T20:22:1 -main.c: Memory freed - main.c: Putting data: 6539,10453,6/6/2014T20:22:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6539,10453,6/6/2014T20:22:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 983183,6/6/2014T20:20:1 with length 23 -json.c: Preparing: 983182,6/6/2014T20:21:1 with length 23 -json.c: Preparing: 983182,6/6/2014T20:22:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"983183","timestamp":"6/6/2014T20:20:1"},{"value":"983182","timestamp":"6/6/2014T20:21:1"},{"value":"983182","timestamp":"6/6/2014T20:22:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 0ô -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39190,29064,6/6/2014T20:20:1 with length 28 -json.c: Preparing: 39186,29064,6/6/2014T20:21:1 with length 28 -json.c: Preparing: 39188,29060,6/6/2014T20:22:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39190,29064","timestamp":"6/6/2014T20:20:1"},{"value":"39186,29064","timestamp":"6/6/2014T20:21:1"},{"value":"39188,29060","timestamp":"6/6/2014T20:22:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6541,10410,6/6/2014T20:20:1 with length 27 -json.c: Preparing: 6541,10367,6/6/2014T20:21:1 with length 27 -json.c: Preparing: 6539,10453,6/6/2014T20:22:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6541,10410","timestamp":"6/6/2014T20:20:1"},{"value":"6541,10367","timestamp":"6/6/2014T20:21:1"},{"value":"6539,10453","timestamp":"6/6/2014T20:22:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:22:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:22:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611067737 -main.c: Updating new time to 3611067737 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611067737 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 32704 B -buffer.c: Used memory: 2000 B -main.c: Time (absolute): 3611067737 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611067780 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0F -sensors.c: [LIGHT] CH0 = 8E -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067781 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611067781 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 983182,6/6/2014T20:23:1 -ntp.c: Writing timestamp... -main.c: Data is: 39192,29060,6/6/2014T20:23:1 -ntp.c: Writing timestamp... -main.c: Data is: 6535,10433,6/6/2014T20:23:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 983182,6/6/2014T20:23:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 983182,6/6/2014T20:23:1 -main.c: Memory freed - main.c: Putting data: 39192,29060,6/6/2014T20:23:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39192,29060,6/6/2014T20:23:1 -main.c: Memory freed - main.c: Putting data: 6535,10433,6/6/2014T20:23:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6535,10433,6/6/2014T20:23:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32560 B -buffer.c: Used memory: 2144 B -main.c: Time (absolute): 3611067781 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611067840 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8E -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067840 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611067840 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917646,6/6/2014T20:24:0 -ntp.c: Writing timestamp... -main.c: Data is: 39187,29060,6/6/2014T20:24:0 -ntp.c: Writing timestamp... -main.c: Data is: 6535,10430,6/6/2014T20:24:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917646,6/6/2014T20:24:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917646,6/6/2014T20:24:0 -main.c: Memory freed - main.c: Putting data: 39187,29060,6/6/2014T20:24:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39187,29060,6/6/2014T20:24:0 -main.c: Memory freed - main.c: Putting data: 6535,10430,6/6/2014T20:24:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6535,10430,6/6/2014T20:24:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32424 B -buffer.c: Used memory: 2280 B -main.c: Time (absolute): 3611067841 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611067900 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8E -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067900 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611067900 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917646,6/6/2014T20:25:0 -ntp.c: Writing timestamp... -main.c: Data is: 39186,29061,6/6/2014T20:25:0 -ntp.c: Writing timestamp... -main.c: Data is: 6535,10426,6/6/2014T20:25:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917646,6/6/2014T20:25:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917646,6/6/2014T20:25:0 -main.c: Memory freed - main.c: Putting data: 39186,29061,6/6/2014T20:25:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39186,29061,6/6/2014T20:25:0 -main.c: Memory freed - main.c: Putting data: 6535,10426,6/6/2014T20:25:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6535,10426,6/6/2014T20:25:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 983182,6/6/2014T20:23:1 with length 23 -json.c: Preparing: 917646,6/6/2014T20:24:0 with length 23 -json.c: Preparing: 917646,6/6/2014T20:25:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"983182","timestamp":"6/6/2014T20:23:1"},{"value":"917646","timestamp":"6/6/2014T20:24:0"},{"value":"917646","timestamp":"6/6/2014T20:25:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39192,29060,6/6/2014T20:23:1 with length 28 -json.c: Preparing: 39187,29060,6/6/2014T20:24:0 with length 28 -json.c: Preparing: 39186,29061,6/6/2014T20:25:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39192,29060","timestamp":"6/6/2014T20:23:1"},{"value":"39187,29060","timestamp":"6/6/2014T20:24:0"},{"value":"39186,29061","timestamp":"6/6/2014T20:25:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6535,10433,6/6/2014T20:23:1 with length 27 -json.c: Preparing: 6535,10430,6/6/2014T20:24:0 with length 27 -json.c: Preparing: 6535,10426,6/6/2014T20:25:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6535,10433","timestamp":"6/6/2014T20:23:1"},{"value":"6535,10430","timestamp":"6/6/2014T20:24:0"},{"value":"6535,10426","timestamp":"6/6/2014T20:25:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:25:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:25:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611067916 -main.c: Updating new time to 3611067916 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611067916 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 32632 B -buffer.c: Used memory: 2072 B -main.c: Time (absolute): 3611067917 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611067960 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8E -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611067960 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611067960 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917646,6/6/2014T20:26:0 -ntp.c: Writing timestamp... -main.c: Data is: 39192,29060,6/6/2014T20:26:0 -ntp.c: Writing timestamp... -main.c: Data is: 6538,10374,6/6/2014T20:26:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917646,6/6/2014T20:26:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917646,6/6/2014T20:26:0 -main.c: Memory freed - main.c: Putting data: 39192,29060,6/6/2014T20:26:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39192,29060,6/6/2014T20:26:0 -main.c: Memory freed - main.c: Putting data: 6538,10374,6/6/2014T20:26:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6538,10374,6/6/2014T20:26:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32488 B -buffer.c: Used memory: 2216 B -main.c: Time (absolute): 3611067960 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611068020 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8E -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068021 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068021 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917646,6/6/2014T20:27:1 -ntp.c: Writing timestamp... -main.c: Data is: 39192,29061,6/6/2014T20:27:1 -ntp.c: Writing timestamp... -main.c: Data is: 6542,10394,6/6/2014T20:27:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917646,6/6/2014T20:27:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917646,6/6/2014T20:27:1 -main.c: Memory freed - main.c: Putting data: 39192,29061,6/6/2014T20:27:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39192,29061,6/6/2014T20:27:1 -main.c: Memory freed - main.c: Putting data: 6542,10394,6/6/2014T20:27:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6542,10394,6/6/2014T20:27:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32360 B -buffer.c: Used memory: 2344 B -main.c: Time (absolute): 3611068021 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611068080 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068081 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068081 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917644,6/6/2014T20:28:1 -ntp.c: Writing timestamp... -main.c: Data is: 39190,29059,6/6/2014T20:28:1 -ntp.c: Writing timestamp... -main.c: Data is: 6538,10469,6/6/2014T20:28:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917644,6/6/2014T20:28:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917644,6/6/2014T20:28:1 -main.c: Memory freed - main.c: Putting data: 39190,29059,6/6/2014T20:28:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39190,29059,6/6/2014T20:28:1 -main.c: Memory freed - main.c: Putting data: 6538,10469,6/6/2014T20:28:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6538,10469,6/6/2014T20:28:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 917646,6/6/2014T20:26:0 with length 23 -json.c: Preparing: 917646,6/6/2014T20:27:1 with length 23 -json.c: Preparing: 917644,6/6/2014T20:28:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"917646","timestamp":"6/6/2014T20:26:0"},{"value":"917646","timestamp":"6/6/2014T20:27:1"},{"value":"917644","timestamp":"6/6/2014T20:28:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39192,29060,6/6/2014T20:26:0 with length 28 -json.c: Preparing: 39192,29061,6/6/2014T20:27:1 with length 28 -json.c: Preparing: 39190,29059,6/6/2014T20:28:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39192,29060","timestamp":"6/6/2014T20:26:0"},{"value":"39192,29061","timestamp":"6/6/2014T20:27:1"},{"value":"39190,29059","timestamp":"6/6/2014T20:28:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6538,10374,6/6/2014T20:26:0 with length 27 -json.c: Preparing: 6542,10394,6/6/2014T20:27:1 with length 27 -json.c: Preparing: 6538,10469,6/6/2014T20:28:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6538,10374","timestamp":"6/6/2014T20:26:0"},{"value":"6542,10394","timestamp":"6/6/2014T20:27:1"},{"value":"6538,10469","timestamp":"6/6/2014T20:28:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:28:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:28:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611068096 -main.c: Updating new time to 3611068096 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611068096 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 32560 B -buffer.c: Used memory: 2144 B -main.c: Time (absolute): 3611068096 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611068140 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068141 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068141 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917645,6/6/2014T20:29:1 -ntp.c: Writing timestamp... -main.c: Data is: 39193,29061,6/6/2014T20:29:1 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10469,6/6/2014T20:29:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917645,6/6/2014T20:29:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917645,6/6/2014T20:29:1 -main.c: Memory freed - main.c: Putting data: 39193,29061,6/6/2014T20:29:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39193,29061,6/6/2014T20:29:1 -main.c: Memory freed - main.c: Putting data: 6534,10469,6/6/2014T20:29:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10469,6/6/2014T20:29:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32408 B -buffer.c: Used memory: 2296 B -main.c: Time (absolute): 3611068141 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611068200 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8E -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068201 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068201 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917646,6/6/2014T20:30:1 -ntp.c: Writing timestamp... -main.c: Data is: 39188,29062,6/6/2014T20:30:1 -ntp.c: Writing timestamp... -main.c: Data is: 6537,10457,6/6/2014T20:30:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917646,6/6/2014T20:30:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917646,6/6/2014T20:30:1 -main.c: Memory freed - main.c: Putting data: 39188,29062,6/6/2014T20:30:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39188,29062,6/6/2014T20:30:1 -main.c: Memory freed - main.c: Putting data: 6537,10457,6/6/2014T20:30:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6537,10457,6/6/2014T20:30:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32272 B -buffer.c: Used memory: 2432 B -main.c: Time (absolute): 3611068201 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611068260 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068261 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068261 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917644,6/6/2014T20:31:1 -ntp.c: Writing timestamp... -main.c: Data is: 39190,29060,6/6/2014T20:31:1 -ntp.c: Writing timestamp... -main.c: Data is: 6538,10449,6/6/2014T20:31:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917644,6/6/2014T20:31:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917644,6/6/2014T20:31:1 -main.c: Memory freed - main.c: Putting data: 39190,29060,6/6/2014T20:31:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39190,29060,6/6/2014T20:31:1 -main.c: Memory freed - main.c: Putting data: 6538,10449,6/6/2014T20:31:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6538,10449,6/6/2014T20:31:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 917645,6/6/2014T20:29:1 with length 23 -json.c: Preparing: 917646,6/6/2014T20:30:1 with length 23 -json.c: Preparing: 917644,6/6/2014T20:31:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"917645","timestamp":"6/6/2014T20:29:1"},{"value":"917646","timestamp":"6/6/2014T20:30:1"},{"value":"917644","timestamp":"6/6/2014T20:31:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39193,29061,6/6/2014T20:29:1 with length 28 -json.c: Preparing: 39188,29062,6/6/2014T20:30:1 with length 28 -json.c: Preparing: 39190,29060,6/6/2014T20:31:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39193,29061","timestamp":"6/6/2014T20:29:1"},{"value":"39188,29062","timestamp":"6/6/2014T20:30:1"},{"value":"39190,29060","timestamp":"6/6/2014T20:31:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6534,10469,6/6/2014T20:29:1 with length 27 -json.c: Preparing: 6537,10457,6/6/2014T20:30:1 with length 27 -json.c: Preparing: 6538,10449,6/6/2014T20:31:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6534,10469","timestamp":"6/6/2014T20:29:1"},{"value":"6537,10457","timestamp":"6/6/2014T20:30:1"},{"value":"6538,10449","timestamp":"6/6/2014T20:31:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:31:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:31:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611068276 -main.c: Updating new time to 3611068276 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611068276 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 32464 B -buffer.c: Used memory: 2240 B -main.c: Time (absolute): 3611068276 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611068320 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8A -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068321 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068321 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917642,6/6/2014T20:32:1 -ntp.c: Writing timestamp... -main.c: Data is: 39193,29062,6/6/2014T20:32:1 -ntp.c: Writing timestamp... -main.c: Data is: 6538,10477,6/6/2014T20:32:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917642,6/6/2014T20:32:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917642,6/6/2014T20:32:1 -main.c: Memory freed - main.c: Putting data: 39193,29062,6/6/2014T20:32:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39193,29062,6/6/2014T20:32:1 -main.c: Memory freed - main.c: Putting data: 6538,10477,6/6/2014T20:32:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6538,10477,6/6/2014T20:32:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32328 B -buffer.c: Used memory: 2376 B -main.c: Time (absolute): 3611068321 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611068380 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8A -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068381 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068381 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917642,6/6/2014T20:33:1 -ntp.c: Writing timestamp... -main.c: Data is: 39192,29061,6/6/2014T20:33:1 -ntp.c: Writing timestamp... -main.c: Data is: 6537,10481,6/6/2014T20:33:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917642,6/6/2014T20:33:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917642,6/6/2014T20:33:1 -main.c: Memory freed - main.c: Putting data: 39192,29061,6/6/2014T20:33:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39192,29061,6/6/2014T20:33:1 -main.c: Memory freed - main.c: Putting data: 6537,10481,6/6/2014T20:33:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6537,10481,6/6/2014T20:33:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32200 B -buffer.c: Used memory: 2504 B -main.c: Time (absolute): 3611068381 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611068440 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8A -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068441 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068441 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917642,6/6/2014T20:34:1 -ntp.c: Writing timestamp... -main.c: Data is: 39192,29061,6/6/2014T20:34:1 -ntp.c: Writing timestamp... -main.c: Data is: 6537,10457,6/6/2014T20:34:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917642,6/6/2014T20:34:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917642,6/6/2014T20:34:1 -main.c: Memory freed - main.c: Putting data: 39192,29061,6/6/2014T20:34:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39192,29061,6/6/2014T20:34:1 -main.c: Memory freed - main.c: Putting data: 6537,10457,6/6/2014T20:34:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6537,10457,6/6/2014T20:34:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 917642,6/6/2014T20:32:1 with length 23 -json.c: Preparing: 917642,6/6/2014T20:33:1 with length 23 -json.c: Preparing: 917642,6/6/2014T20:34:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"917642","timestamp":"6/6/2014T20:32:1"},{"value":"917642","timestamp":"6/6/2014T20:33:1"},{"value":"917642","timestamp":"6/6/2014T20:34:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39193,29062,6/6/2014T20:32:1 with length 28 -json.c: Preparing: 39192,29061,6/6/2014T20:33:1 with length 28 -json.c: Preparing: 39192,29061,6/6/2014T20:34:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39193,29062","timestamp":"6/6/2014T20:32:1"},{"value":"39192,29061","timestamp":"6/6/2014T20:33:1"},{"value":"39192,29061","timestamp":"6/6/2014T20:34:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6538,10477,6/6/2014T20:32:1 with length 27 -json.c: Preparing: 6537,10481,6/6/2014T20:33:1 with length 27 -json.c: Preparing: 6537,10457,6/6/2014T20:34:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6538,10477","timestamp":"6/6/2014T20:32:1"},{"value":"6537,10481","timestamp":"6/6/2014T20:33:1"},{"value":"6537,10457","timestamp":"6/6/2014T20:34:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:34:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:34:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611068456 -main.c: Updating new time to 3611068456 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611068456 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 32384 B -buffer.c: Used memory: 2320 B -main.c: Time (absolute): 3611068456 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611068500 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068501 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068501 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917645,6/6/2014T20:35:1 -ntp.c: Writing timestamp... -main.c: Data is: 39190,29061,6/6/2014T20:35:1 -ntp.c: Writing timestamp... -main.c: Data is: 6538,10453,6/6/2014T20:35:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917645,6/6/2014T20:35:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917645,6/6/2014T20:35:1 -main.c: Memory freed - main.c: Putting data: 39190,29061,6/6/2014T20:35:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39190,29061,6/6/2014T20:35:1 -main.c: Memory freed - main.c: Putting data: 6538,10453,6/6/2014T20:35:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6538,10453,6/6/2014T20:35:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32240 B -buffer.c: Used memory: 2464 B -main.c: Time (absolute): 3611068501 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611068560 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068560 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611068560 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917645,6/6/2014T20:36:0 -ntp.c: Writing timestamp... -main.c: Data is: 39193,29061,6/6/2014T20:36:0 -ntp.c: Writing timestamp... -main.c: Data is: 6538,10516,6/6/2014T20:36:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917645,6/6/2014T20:36:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917645,6/6/2014T20:36:0 -main.c: Memory freed - main.c: Putting data: 39193,29061,6/6/2014T20:36:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39193,29061,6/6/2014T20:36:0 -main.c: Memory freed - main.c: Putting data: 6538,10516,6/6/2014T20:36:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6538,10516,6/6/2014T20:36:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32120 B -buffer.c: Used memory: 2584 B -main.c: Time (absolute): 3611068561 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611068620 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8A -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068620 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611068620 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917642,6/6/2014T20:37:0 -ntp.c: Writing timestamp... -main.c: Data is: 39197,29060,6/6/2014T20:37:0 -ntp.c: Writing timestamp... -main.c: Data is: 6535,10489,6/6/2014T20:37:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917642,6/6/2014T20:37:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917642,6/6/2014T20:37:0 -main.c: Memory freed - main.c: Putting data: 39197,29060,6/6/2014T20:37:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39197,29060,6/6/2014T20:37:0 -main.c: Memory freed - main.c: Putting data: 6535,10489,6/6/2014T20:37:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6535,10489,6/6/2014T20:37:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 917645,6/6/2014T20:35:1 with length 23 -json.c: Preparing: 917645,6/6/2014T20:36:0 with length 23 -json.c: Preparing: 917642,6/6/2014T20:37:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"917645","timestamp":"6/6/2014T20:35:1"},{"value":"917645","timestamp":"6/6/2014T20:36:0"},{"value":"917642","timestamp":"6/6/2014T20:37:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39190,29061,6/6/2014T20:35:1 with length 28 -json.c: Preparing: 39193,29061,6/6/2014T20:36:0 with length 28 -json.c: Preparing: 39197,29060,6/6/2014T20:37:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39190,29061","timestamp":"6/6/2014T20:35:1"},{"value":"39193,29061","timestamp":"6/6/2014T20:36:0"},{"value":"39197,29060","timestamp":"6/6/2014T20:37:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6538,10453,6/6/2014T20:35:1 with length 27 -json.c: Preparing: 6538,10516,6/6/2014T20:36:0 with length 27 -json.c: Preparing: 6535,10489,6/6/2014T20:37:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6538,10453","timestamp":"6/6/2014T20:35:1"},{"value":"6538,10516","timestamp":"6/6/2014T20:36:0"},{"value":"6535,10489","timestamp":"6/6/2014T20:37:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:37:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:37:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611068636 -main.c: Updating new time to 3611068636 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611068636 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 32208 B -buffer.c: Used memory: 2496 B -main.c: Time (absolute): 3611068636 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611068680 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8B -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068680 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611068680 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917643,6/6/2014T20:38:0 -ntp.c: Writing timestamp... -main.c: Data is: 39199,29060,6/6/2014T20:38:0 -ntp.c: Writing timestamp... -main.c: Data is: 6535,10445,6/6/2014T20:38:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917643,6/6/2014T20:38:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917643,6/6/2014T20:38:0 -main.c: Memory freed - main.c: Putting data: 39199,29060,6/6/2014T20:38:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39199,29060,6/6/2014T20:38:0 -main.c: Memory freed - main.c: Putting data: 6535,10445,6/6/2014T20:38:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6535,10445,6/6/2014T20:38:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 32056 B -buffer.c: Used memory: 2648 B -main.c: Time (absolute): 3611068680 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611068740 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 87 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068741 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068741 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852103,6/6/2014T20:39:1 -ntp.c: Writing timestamp... -main.c: Data is: 39198,29062,6/6/2014T20:39:1 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10489,6/6/2014T20:39:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852103,6/6/2014T20:39:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852103,6/6/2014T20:39:1 -main.c: Memory freed - main.c: Putting data: 39198,29062,6/6/2014T20:39:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39198,29062,6/6/2014T20:39:1 -main.c: Memory freed - main.c: Putting data: 6534,10489,6/6/2014T20:39:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10489,6/6/2014T20:39:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31936 B -buffer.c: Used memory: 2768 B -main.c: Time (absolute): 3611068741 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611068800 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068801 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068801 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T20:40:1 -ntp.c: Writing timestamp... -main.c: Data is: 39193,29061,6/6/2014T20:40:1 -ntp.c: Writing timestamp... -main.c: Data is: 6539,10485,6/6/2014T20:40:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T20:40:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T20:40:1 -main.c: Memory freed - main.c: Putting data: 39193,29061,6/6/2014T20:40:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39193,29061,6/6/2014T20:40:1 -main.c: Memory freed - main.c: Putting data: 6539,10485,6/6/2014T20:40:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6539,10485,6/6/2014T20:40:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 917643,6/6/2014T20:38:0 with length 23 -json.c: Preparing: 852103,6/6/2014T20:39:1 with length 23 -json.c: Preparing: 852105,6/6/2014T20:40:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"917643","timestamp":"6/6/2014T20:38:0"},{"value":"852103","timestamp":"6/6/2014T20:39:1"},{"value":"852105","timestamp":"6/6/2014T20:40:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39199,29060,6/6/2014T20:38:0 with length 28 -json.c: Preparing: 39198,29062,6/6/2014T20:39:1 with length 28 -json.c: Preparing: 39193,29061,6/6/2014T20:40:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39199,29060","timestamp":"6/6/2014T20:38:0"},{"value":"39198,29062","timestamp":"6/6/2014T20:39:1"},{"value":"39193,29061","timestamp":"6/6/2014T20:40:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6535,10445,6/6/2014T20:38:0 with length 27 -json.c: Preparing: 6534,10489,6/6/2014T20:39:1 with length 27 -json.c: Preparing: 6539,10485,6/6/2014T20:40:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6535,10445","timestamp":"6/6/2014T20:38:0"},{"value":"6534,10489","timestamp":"6/6/2014T20:39:1"},{"value":"6539,10485","timestamp":"6/6/2014T20:40:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:40:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:40:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611068817 -main.c: Updating new time to 3611068817 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611068817 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 32136 B -buffer.c: Used memory: 2568 B -main.c: Time (absolute): 3611068817 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611068860 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068861 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068861 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917644,6/6/2014T20:41:1 -ntp.c: Writing timestamp... -main.c: Data is: 39199,29062,6/6/2014T20:41:1 -ntp.c: Writing timestamp... -main.c: Data is: 6539,10477,6/6/2014T20:41:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917644,6/6/2014T20:41:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917644,6/6/2014T20:41:1 -main.c: Memory freed - main.c: Putting data: 39199,29062,6/6/2014T20:41:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39199,29062,6/6/2014T20:41:1 -main.c: Memory freed - main.c: Putting data: 6539,10477,6/6/2014T20:41:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6539,10477,6/6/2014T20:41:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31976 B -buffer.c: Used memory: 2728 B -main.c: Time (absolute): 3611068861 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611068920 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068921 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068921 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917644,6/6/2014T20:42:1 -ntp.c: Writing timestamp... -main.c: Data is: 39195,29060,6/6/2014T20:42:1 -ntp.c: Writing timestamp... -main.c: Data is: 6535,10504,6/6/2014T20:42:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917644,6/6/2014T20:42:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917644,6/6/2014T20:42:1 -main.c: Memory freed - main.c: Putting data: 39195,29060,6/6/2014T20:42:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39195,29060,6/6/2014T20:42:1 -main.c: Memory freed - main.c: Putting data: 6535,10504,6/6/2014T20:42:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6535,10504,6/6/2014T20:42:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31848 B -buffer.c: Used memory: 2856 B -main.c: Time (absolute): 3611068921 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611068980 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0E -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611068981 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611068981 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 917644,6/6/2014T20:43:1 -ntp.c: Writing timestamp... -main.c: Data is: 39189,29060,6/6/2014T20:43:1 -ntp.c: Writing timestamp... -main.c: Data is: 6538,10437,6/6/2014T20:43:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 917644,6/6/2014T20:43:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 917644,6/6/2014T20:43:1 -main.c: Memory freed - main.c: Putting data: 39189,29060,6/6/2014T20:43:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39189,29060,6/6/2014T20:43:1 -main.c: Memory freed - main.c: Putting data: 6538,10437,6/6/2014T20:43:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6538,10437,6/6/2014T20:43:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 917644,6/6/2014T20:41:1 with length 23 -json.c: Preparing: 917644,6/6/2014T20:42:1 with length 23 -json.c: Preparing: 917644,6/6/2014T20:43:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"917644","timestamp":"6/6/2014T20:41:1"},{"value":"917644","timestamp":"6/6/2014T20:42:1"},{"value":"917644","timestamp":"6/6/2014T20:43:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39199,29062,6/6/2014T20:41:1 with length 28 -json.c: Preparing: 39195,29060,6/6/2014T20:42:1 with length 28 -json.c: Preparing: 39189,29060,6/6/2014T20:43:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39199,29062","timestamp":"6/6/2014T20:41:1"},{"value":"39195,29060","timestamp":"6/6/2014T20:42:1"},{"value":"39189,29060","timestamp":"6/6/2014T20:43:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6539,10477,6/6/2014T20:41:1 with length 27 -json.c: Preparing: 6535,10504,6/6/2014T20:42:1 with length 27 -json.c: Preparing: 6538,10437,6/6/2014T20:43:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6539,10477","timestamp":"6/6/2014T20:41:1"},{"value":"6535,10504","timestamp":"6/6/2014T20:42:1"},{"value":"6538,10437","timestamp":"6/6/2014T20:43:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:43:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:43:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611068996 -main.c: Updating new time to 3611068996 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611068996 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 32040 B -buffer.c: Used memory: 2664 B -main.c: Time (absolute): 3611068996 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611069040 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069041 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611069041 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852108,6/6/2014T20:44:1 -ntp.c: Writing timestamp... -main.c: Data is: 39189,29059,6/6/2014T20:44:1 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10418,6/6/2014T20:44:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852108,6/6/2014T20:44:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852108,6/6/2014T20:44:1 -main.c: Memory freed - main.c: Putting data: 39189,29059,6/6/2014T20:44:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39189,29059,6/6/2014T20:44:1 -main.c: Memory freed - main.c: Putting data: 6541,10418,6/6/2014T20:44:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6541,10418,6/6/2014T20:44:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31904 B -buffer.c: Used memory: 2800 B -main.c: Time (absolute): 3611069041 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611069100 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8B -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069101 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611069101 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852107,6/6/2014T20:45:1 -ntp.c: Writing timestamp... -main.c: Data is: 39196,29058,6/6/2014T20:45:1 -ntp.c: Writing timestamp... -main.c: Data is: 6538,10414,6/6/2014T20:45:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852107,6/6/2014T20:45:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852107,6/6/2014T20:45:1 -main.c: Memory freed - main.c: Putting data: 39196,29058,6/6/2014T20:45:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39196,29058,6/6/2014T20:45:1 -main.c: Memory freed - main.c: Putting data: 6538,10414,6/6/2014T20:45:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6538,10414,6/6/2014T20:45:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31776 B -buffer.c: Used memory: 2928 B -main.c: Time (absolute): 3611069101 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611069160 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8B -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069160 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611069160 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852107,6/6/2014T20:46:0 -ntp.c: Writing timestamp... -main.c: Data is: 39199,29057,6/6/2014T20:46:0 -ntp.c: Writing timestamp... -main.c: Data is: 6538,10485,6/6/2014T20:46:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852107,6/6/2014T20:46:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852107,6/6/2014T20:46:0 -main.c: Memory freed - main.c: Putting data: 39199,29057,6/6/2014T20:46:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39199,29057,6/6/2014T20:46:0 -main.c: Memory freed - main.c: Putting data: 6538,10485,6/6/2014T20:46:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6538,10485,6/6/2014T20:46:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852108,6/6/2014T20:44:1 with length 23 -json.c: Preparing: 852107,6/6/2014T20:45:1 with length 23 -json.c: Preparing: 852107,6/6/2014T20:46:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"852108","timestamp":"6/6/2014T20:44:1"},{"value":"852107","timestamp":"6/6/2014T20:45:1"},{"value":"852107","timestamp":"6/6/2014T20:46:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39189,29059,6/6/2014T20:44:1 with length 28 -json.c: Preparing: 39196,29058,6/6/2014T20:45:1 with length 28 -json.c: Preparing: 39199,29057,6/6/2014T20:46:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39189,29059","timestamp":"6/6/2014T20:44:1"},{"value":"39196,29058","timestamp":"6/6/2014T20:45:1"},{"value":"39199,29057","timestamp":"6/6/2014T20:46:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6541,10418,6/6/2014T20:44:1 with length 27 -json.c: Preparing: 6538,10414,6/6/2014T20:45:1 with length 27 -json.c: Preparing: 6538,10485,6/6/2014T20:46:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6541,10418","timestamp":"6/6/2014T20:44:1"},{"value":"6538,10414","timestamp":"6/6/2014T20:45:1"},{"value":"6538,10485","timestamp":"6/6/2014T20:46:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:46:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:46:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611069188 -main.c: Updating new time to 3611069188 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611069188 -Time LONG_PERIOD: 84 -Time SHORT_PERIOD: 28 -buffer.c: Checking available memory... -buffer.c: Available memory: 31976 B -buffer.c: Used memory: 2728 B -main.c: Time (absolute): 3611069188 -Time LONG_PERIOD: 84 -Time SHORT_PERIOD: 28 -timer-loop.c: Time to sleep! for 32 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611069220 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8B -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069221 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611069221 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852107,6/6/2014T20:47:1 -ntp.c: Writing timestamp... -main.c: Data is: 39196,29057,6/6/2014T20:47:1 -ntp.c: Writing timestamp... -main.c: Data is: 6535,10500,6/6/2014T20:47:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852107,6/6/2014T20:47:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852107,6/6/2014T20:47:1 -main.c: Memory freed - main.c: Putting data: 39196,29057,6/6/2014T20:47:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39196,29057,6/6/2014T20:47:1 -main.c: Memory freed - main.c: Putting data: 6535,10500,6/6/2014T20:47:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6535,10500,6/6/2014T20:47:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31832 B -buffer.c: Used memory: 2872 B -main.c: Time (absolute): 3611069221 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611069280 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8B -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069281 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611069281 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852107,6/6/2014T20:48:1 -ntp.c: Writing timestamp... -main.c: Data is: 39199,29057,6/6/2014T20:48:1 -ntp.c: Writing timestamp... -main.c: Data is: 6535,10461,6/6/2014T20:48:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852107,6/6/2014T20:48:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852107,6/6/2014T20:48:1 -main.c: Memory freed - main.c: Putting data: 39199,29057,6/6/2014T20:48:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39199,29057,6/6/2014T20:48:1 -main.c: Memory freed - main.c: Putting data: 6535,10461,6/6/2014T20:48:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6535,10461,6/6/2014T20:48:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31712 B -buffer.c: Used memory: 2992 B -main.c: Time (absolute): 3611069281 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611069340 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8B -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069340 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611069340 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852107,6/6/2014T20:49:0 -ntp.c: Writing timestamp... -main.c: Data is: 39207,29056,6/6/2014T20:49:0 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10445,6/6/2014T20:49:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852107,6/6/2014T20:49:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852107,6/6/2014T20:49:0 -main.c: Memory freed - main.c: Putting data: 39207,29056,6/6/2014T20:49:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39207,29056,6/6/2014T20:49:0 -main.c: Memory freed - main.c: Putting data: 6534,10445,6/6/2014T20:49:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10445,6/6/2014T20:49:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852107,6/6/2014T20:47:1 with length 23 -json.c: Preparing: 852107,6/6/2014T20:48:1 with length 23 -json.c: Preparing: 852107,6/6/2014T20:49:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"852107","timestamp":"6/6/2014T20:47:1"},{"value":"852107","timestamp":"6/6/2014T20:48:1"},{"value":"852107","timestamp":"6/6/2014T20:49:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39196,29057,6/6/2014T20:47:1 with length 28 -json.c: Preparing: 39199,29057,6/6/2014T20:48:1 with length 28 -json.c: Preparing: 39207,29056,6/6/2014T20:49:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39196,29057","timestamp":"6/6/2014T20:47:1"},{"value":"39199,29057","timestamp":"6/6/2014T20:48:1"},{"value":"39207,29056","timestamp":"6/6/2014T20:49:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6535,10500,6/6/2014T20:47:1 with length 27 -json.c: Preparing: 6535,10461,6/6/2014T20:48:1 with length 27 -json.c: Preparing: 6534,10445,6/6/2014T20:49:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6535,10500","timestamp":"6/6/2014T20:47:1"},{"value":"6535,10461","timestamp":"6/6/2014T20:48:1"},{"value":"6534,10445","timestamp":"6/6/2014T20:49:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:49:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:49:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611069355 -main.c: Updating new time to 3611069355 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611069355 -Time LONG_PERIOD: 45 -Time SHORT_PERIOD: 15 -buffer.c: Checking available memory... -buffer.c: Available memory: 31896 B -buffer.c: Used memory: 2808 B -main.c: Time (absolute): 3611069355 -Time LONG_PERIOD: 45 -Time SHORT_PERIOD: 15 -timer-loop.c: Time to sleep! for 45 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611069400 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 7D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069400 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611069400 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786557,6/6/2014T20:50:0 -ntp.c: Writing timestamp... -main.c: Data is: 39199,29056,6/6/2014T20:50:0 -ntp.c: Writing timestamp... -main.c: Data is: 6535,10453,6/6/2014T20:50:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786557,6/6/2014T20:50:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786557,6/6/2014T20:50:0 -main.c: Memory freed - main.c: Putting data: 39199,29056,6/6/2014T20:50:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39199,29056,6/6/2014T20:50:0 -main.c: Memory freed - main.c: Putting data: 6535,10453,6/6/2014T20:50:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6535,10453,6/6/2014T20:50:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31752 B -buffer.c: Used memory: 2952 B -main.c: Time (absolute): 3611069401 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611069460 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069460 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611069460 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852104,6/6/2014T20:51:0 -ntp.c: Writing timestamp... -main.c: Data is: 39207,29060,6/6/2014T20:51:0 -ntp.c: Writing timestamp... -main.c: Data is: 6539,10465,6/6/2014T20:51:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852104,6/6/2014T20:51:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852104,6/6/2014T20:51:0 -main.c: Memory freed - main.c: Putting data: 39207,29060,6/6/2014T20:51:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39207,29060,6/6/2014T20:51:0 -main.c: Memory freed - main.c: Putting data: 6539,10465,6/6/2014T20:51:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6539,10465,6/6/2014T20:51:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31624 B -buffer.c: Used memory: 3080 B -main.c: Time (absolute): 3611069460 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611069520 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069521 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611069521 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852104,6/6/2014T20:52:1 -ntp.c: Writing timestamp... -main.c: Data is: 39201,29058,6/6/2014T20:52:1 -ntp.c: Writing timestamp... -main.c: Data is: 6538,10516,6/6/2014T20:52:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852104,6/6/2014T20:52:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852104,6/6/2014T20:52:1 -main.c: Memory freed - main.c: Putting data: 39201,29058,6/6/2014T20:52:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39201,29058,6/6/2014T20:52:1 -main.c: Memory freed - main.c: Putting data: 6538,10516,6/6/2014T20:52:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6538,10516,6/6/2014T20:52:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786557,6/6/2014T20:50:0 with length 23 -json.c: Preparing: 852104,6/6/2014T20:51:0 with length 23 -json.c: Preparing: 852104,6/6/2014T20:52:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786557","timestamp":"6/6/2014T20:50:0"},{"value":"852104","timestamp":"6/6/2014T20:51:0"},{"value":"852104","timestamp":"6/6/2014T20:52:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39199,29056,6/6/2014T20:50:0 with length 28 -json.c: Preparing: 39207,29060,6/6/2014T20:51:0 with length 28 -json.c: Preparing: 39201,29058,6/6/2014T20:52:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39199,29056","timestamp":"6/6/2014T20:50:0"},{"value":"39207,29060","timestamp":"6/6/2014T20:51:0"},{"value":"39201,29058","timestamp":"6/6/2014T20:52:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6535,10453,6/6/2014T20:50:0 with length 27 -json.c: Preparing: 6539,10465,6/6/2014T20:51:0 with length 27 -json.c: Preparing: 6538,10516,6/6/2014T20:52:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6535,10453","timestamp":"6/6/2014T20:50:0"},{"value":"6539,10465","timestamp":"6/6/2014T20:51:0"},{"value":"6538,10516","timestamp":"6/6/2014T20:52:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:52:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:52:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611069537 -main.c: Updating new time to 3611069537 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611069537 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 31720 B -buffer.c: Used memory: 2984 B -main.c: Time (absolute): 3611069537 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611069580 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 87 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069581 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611069581 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852103,6/6/2014T20:53:1 -ntp.c: Writing timestamp... -main.c: Data is: 39194,29057,6/6/2014T20:53:1 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10473,6/6/2014T20:53:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852103,6/6/2014T20:53:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852103,6/6/2014T20:53:1 -main.c: Memory freed - main.c: Putting data: 39194,29057,6/6/2014T20:53:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39194,29057,6/6/2014T20:53:1 -main.c: Memory freed - main.c: Putting data: 6534,10473,6/6/2014T20:53:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10473,6/6/2014T20:53:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31568 B -buffer.c: Used memory: 3136 B -main.c: Time (absolute): 3611069581 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611069640 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 82 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069641 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611069641 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786562,6/6/2014T20:54:1 -ntp.c: Writing timestamp... -main.c: Data is: 39204,29057,6/6/2014T20:54:1 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10477,6/6/2014T20:54:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786562,6/6/2014T20:54:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786562,6/6/2014T20:54:1 -main.c: Memory freed - main.c: Putting data: 39204,29057,6/6/2014T20:54:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39204,29057,6/6/2014T20:54:1 -main.c: Memory freed - main.c: Putting data: 6534,10477,6/6/2014T20:54:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10477,6/6/2014T20:54:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31440 B -buffer.c: Used memory: 3264 B -main.c: Time (absolute): 3611069641 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611069700 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 87 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069701 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611069701 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852103,6/6/2014T20:55:1 -ntp.c: Writing timestamp... -main.c: Data is: 39203,29059,6/6/2014T20:55:1 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10516,6/6/2014T20:55:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852103,6/6/2014T20:55:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852103,6/6/2014T20:55:1 -main.c: Memory freed - main.c: Putting data: 39203,29059,6/6/2014T20:55:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39203,29059,6/6/2014T20:55:1 -main.c: Memory freed - main.c: Putting data: 6534,10516,6/6/2014T20:55:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10516,6/6/2014T20:55:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852103,6/6/2014T20:53:1 with length 23 -json.c: Preparing: 786562,6/6/2014T20:54:1 with length 23 -json.c: Preparing: 852103,6/6/2014T20:55:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"852103","timestamp":"6/6/2014T20:53:1"},{"value":"786562","timestamp":"6/6/2014T20:54:1"},{"value":"852103","timestamp":"6/6/2014T20:55:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39194,29057,6/6/2014T20:53:1 with length 28 -json.c: Preparing: 39204,29057,6/6/2014T20:54:1 with length 28 -json.c: Preparing: 39203,29059,6/6/2014T20:55:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39194,29057","timestamp":"6/6/2014T20:53:1"},{"value":"39204,29057","timestamp":"6/6/2014T20:54:1"},{"value":"39203,29059","timestamp":"6/6/2014T20:55:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6534,10473,6/6/2014T20:53:1 with length 27 -json.c: Preparing: 6534,10477,6/6/2014T20:54:1 with length 27 -json.c: Preparing: 6534,10516,6/6/2014T20:55:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6534,10473","timestamp":"6/6/2014T20:53:1"},{"value":"6534,10477","timestamp":"6/6/2014T20:54:1"},{"value":"6534,10516","timestamp":"6/6/2014T20:55:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:55:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:55:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611069716 -main.c: Updating new time to 3611069716 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611069716 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 31544 B -buffer.c: Used memory: 3160 B -main.c: Time (absolute): 3611069716 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611069760 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8E -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069761 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611069761 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852110,6/6/2014T20:56:1 -ntp.c: Writing timestamp... -main.c: Data is: 39199,29059,6/6/2014T20:56:1 -ntp.c: Writing timestamp... -main.c: Data is: 6533,10469,6/6/2014T20:56:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852110,6/6/2014T20:56:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852110,6/6/2014T20:56:1 -main.c: Memory freed - main.c: Putting data: 39199,29059,6/6/2014T20:56:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39199,29059,6/6/2014T20:56:1 -main.c: Memory freed - main.c: Putting data: 6533,10469,6/6/2014T20:56:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6533,10469,6/6/2014T20:56:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31392 B -buffer.c: Used memory: 3312 B -main.c: Time (absolute): 3611069761 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611069820 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8B -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069821 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611069821 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852107,6/6/2014T20:57:1 -ntp.c: Writing timestamp... -main.c: Data is: 39204,29060,6/6/2014T20:57:1 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10492,6/6/2014T20:57:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852107,6/6/2014T20:57:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852107,6/6/2014T20:57:1 -main.c: Memory freed - main.c: Putting data: 39204,29060,6/6/2014T20:57:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39204,29060,6/6/2014T20:57:1 -main.c: Memory freed - main.c: Putting data: 6534,10492,6/6/2014T20:57:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10492,6/6/2014T20:57:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31248 B -buffer.c: Used memory: 3456 B -main.c: Time (absolute): 3611069821 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611069880 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8A -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069880 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611069880 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852106,6/6/2014T20:58:0 -ntp.c: Writing timestamp... -main.c: Data is: 39203,29058,6/6/2014T20:58:0 -ntp.c: Writing timestamp... -main.c: Data is: 6537,10516,6/6/2014T20:58:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852106,6/6/2014T20:58:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852106,6/6/2014T20:58:0 -main.c: Memory freed - main.c: Putting data: 39203,29058,6/6/2014T20:58:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39203,29058,6/6/2014T20:58:0 -main.c: Memory freed - main.c: Putting data: 6537,10516,6/6/2014T20:58:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6537,10516,6/6/2014T20:58:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852110,6/6/2014T20:56:1 with length 23 -json.c: Preparing: 852107,6/6/2014T20:57:1 with length 23 -json.c: Preparing: 852106,6/6/2014T20:58:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"852110","timestamp":"6/6/2014T20:56:1"},{"value":"852107","timestamp":"6/6/2014T20:57:1"},{"value":"852106","timestamp":"6/6/2014T20:58:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39199,29059,6/6/2014T20:56:1 with length 28 -json.c: Preparing: 39204,29060,6/6/2014T20:57:1 with length 28 -json.c: Preparing: 39203,29058,6/6/2014T20:58:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39199,29059","timestamp":"6/6/2014T20:56:1"},{"value":"39204,29060","timestamp":"6/6/2014T20:57:1"},{"value":"39203,29058","timestamp":"6/6/2014T20:58:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6533,10469,6/6/2014T20:56:1 with length 27 -json.c: Preparing: 6534,10492,6/6/2014T20:57:1 with length 27 -json.c: Preparing: 6537,10516,6/6/2014T20:58:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6533,10469","timestamp":"6/6/2014T20:56:1"},{"value":"6534,10492","timestamp":"6/6/2014T20:57:1"},{"value":"6537,10516","timestamp":"6/6/2014T20:58:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T20:58:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T20:58:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611069896 -main.c: Updating new time to 3611069896 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611069896 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 31456 B -buffer.c: Used memory: 3248 B -main.c: Time (absolute): 3611069896 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611069940 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8A -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611069941 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611069941 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852106,6/6/2014T20:59:1 -ntp.c: Writing timestamp... -main.c: Data is: 39204,29056,6/6/2014T20:59:1 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10544,6/6/2014T20:59:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852106,6/6/2014T20:59:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852106,6/6/2014T20:59:1 -main.c: Memory freed - main.c: Putting data: 39204,29056,6/6/2014T20:59:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39204,29056,6/6/2014T20:59:1 -main.c: Memory freed - main.c: Putting data: 6534,10544,6/6/2014T20:59:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10544,6/6/2014T20:59:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31304 B -buffer.c: Used memory: 3400 B -main.c: Time (absolute): 3611069941 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611070000 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8A -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070000 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611070000 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852106,6/6/2014T21:0:0 -ntp.c: Writing timestamp... -main.c: Data is: 39206,29053,6/6/2014T21:0:0 -ntp.c: Writing timestamp... -main.c: Data is: 6533,10496,6/6/2014T21:0:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852106,6/6/2014T21:0:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852106,6/6/2014T21:0:0 -main.c: Memory freed - main.c: Putting data: 39206,29053,6/6/2014T21:0:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39206,29053,6/6/2014T21:0:0 -main.c: Memory freed - main.c: Putting data: 6533,10496,6/6/2014T21:0:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6533,10496,6/6/2014T21:0:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31176 B -buffer.c: Used memory: 3528 B -main.c: Time (absolute): 3611070001 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611070060 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0B -sensors.c: [LIGHT] CH0 = 7B -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070060 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611070060 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 721019,6/6/2014T21:1:0 -ntp.c: Writing timestamp... -main.c: Data is: 39199,29053,6/6/2014T21:1:0 -ntp.c: Writing timestamp... -main.c: Data is: 6531,10547,6/6/2014T21:1:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 721019,6/6/2014T21:1:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 721019,6/6/2014T21:1:0 -main.c: Memory freed - main.c: Putting data: 39199,29053,6/6/2014T21:1:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39199,29053,6/6/2014T21:1:0 -main.c: Memory freed - main.c: Putting data: 6531,10547,6/6/2014T21:1:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6531,10547,6/6/2014T21:1:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852106,6/6/2014T20:59:1 with length 23 -json.c: Preparing: 852106,6/6/2014T21:0:0 with length 22 -json.c: Preparing: 721019,6/6/2014T21:1:0 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 166 - -{"observations":[{"value":"852106","timestamp":"6/6/2014T20:59:1"},{"value":"852106","timestamp":"6/6/2014T21:0:0"},{"value":"721019","timestamp":"6/6/2014T21:1:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39204,29056,6/6/2014T20:59:1 with length 28 -json.c: Preparing: 39206,29053,6/6/2014T21:0:0 with length 27 -json.c: Preparing: 39199,29053,6/6/2014T21:1:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 181 - -{"observations":[{"value":"39204,29056","timestamp":"6/6/2014T20:59:1"},{"value":"39206,29053","timestamp":"6/6/2014T21:0:0"},{"value":"39199,29053","timestamp":"6/6/2014T21:1:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6534,10544,6/6/2014T20:59:1 with length 27 -json.c: Preparing: 6533,10496,6/6/2014T21:0:0 with length 26 -json.c: Preparing: 6531,10547,6/6/2014T21:1:0 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 178 - -{"observations":[{"value":"6534,10544","timestamp":"6/6/2014T20:59:1"},{"value":"6533,10496","timestamp":"6/6/2014T21:0:0"},{"value":"6531,10547","timestamp":"6/6/2014T21:1:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:1:0 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:1:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611070076 -main.c: Updating new time to 3611070076 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611070076 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 31272 B -buffer.c: Used memory: 3432 B -main.c: Time (absolute): 3611070076 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611070120 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 84 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070121 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611070121 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786564,6/6/2014T21:2:1 -ntp.c: Writing timestamp... -main.c: Data is: 39199,29054,6/6/2014T21:2:1 -ntp.c: Writing timestamp... -main.c: Data is: 6531,10516,6/6/2014T21:2:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786564,6/6/2014T21:2:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786564,6/6/2014T21:2:1 -main.c: Memory freed - main.c: Putting data: 39199,29054,6/6/2014T21:2:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39199,29054,6/6/2014T21:2:1 -main.c: Memory freed - main.c: Putting data: 6531,10516,6/6/2014T21:2:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6531,10516,6/6/2014T21:2:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31120 B -buffer.c: Used memory: 3584 B -main.c: Time (absolute): 3611070121 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611070180 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8A -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070181 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611070181 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852106,6/6/2014T21:3:1 -ntp.c: Writing timestamp... -main.c: Data is: 39198,29052,6/6/2014T21:3:1 -ntp.c: Writing timestamp... -main.c: Data is: 6530,10504,6/6/2014T21:3:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852106,6/6/2014T21:3:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852106,6/6/2014T21:3:1 -main.c: Memory freed - main.c: Putting data: 39198,29052,6/6/2014T21:3:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39198,29052,6/6/2014T21:3:1 -main.c: Memory freed - main.c: Putting data: 6530,10504,6/6/2014T21:3:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6530,10504,6/6/2014T21:3:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30992 B -buffer.c: Used memory: 3712 B -main.c: Time (absolute): 3611070181 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611070240 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8A -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070241 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611070241 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852106,6/6/2014T21:4:1 -ntp.c: Writing timestamp... -main.c: Data is: 39201,29054,6/6/2014T21:4:1 -ntp.c: Writing timestamp... -main.c: Data is: 6531,10544,6/6/2014T21:4:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852106,6/6/2014T21:4:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852106,6/6/2014T21:4:1 -main.c: Memory freed - main.c: Putting data: 39201,29054,6/6/2014T21:4:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39201,29054,6/6/2014T21:4:1 -main.c: Memory freed - main.c: Putting data: 6531,10544,6/6/2014T21:4:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6531,10544,6/6/2014T21:4:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786564,6/6/2014T21:2:1 with length 22 -json.c: Preparing: 852106,6/6/2014T21:3:1 with length 22 -json.c: Preparing: 852106,6/6/2014T21:4:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 165 - -{"observations":[{"value":"786564","timestamp":"6/6/2014T21:2:1"},{"value":"852106","timestamp":"6/6/2014T21:3:1"},{"value":"852106","timestamp":"6/6/2014T21:4:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39199,29054,6/6/2014T21:2:1 with length 27 -json.c: Preparing: 39198,29052,6/6/2014T21:3:1 with length 27 -json.c: Preparing: 39201,29054,6/6/2014T21:4:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"39199,29054","timestamp":"6/6/2014T21:2:1"},{"value":"39198,29052","timestamp":"6/6/2014T21:3:1"},{"value":"39201,29054","timestamp":"6/6/2014T21:4:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6531,10516,6/6/2014T21:2:1 with length 26 -json.c: Preparing: 6530,10504,6/6/2014T21:3:1 with length 26 -json.c: Preparing: 6531,10544,6/6/2014T21:4:1 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 177 - -{"observations":[{"value":"6531,10516","timestamp":"6/6/2014T21:2:1"},{"value":"6530,10504","timestamp":"6/6/2014T21:3:1"},{"value":"6531,10544","timestamp":"6/6/2014T21:4:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:4:1 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:4:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611070256 -main.c: Updating new time to 3611070256 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611070256 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 31184 B -buffer.c: Used memory: 3520 B -main.c: Time (absolute): 3611070256 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611070300 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070300 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611070300 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T21:5:0 -ntp.c: Writing timestamp... -main.c: Data is: 39200,29054,6/6/2014T21:5:0 -ntp.c: Writing timestamp... -main.c: Data is: 6531,10551,6/6/2014T21:5:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T21:5:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T21:5:0 -main.c: Memory freed - main.c: Putting data: 39200,29054,6/6/2014T21:5:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39200,29054,6/6/2014T21:5:0 -main.c: Memory freed - main.c: Putting data: 6531,10551,6/6/2014T21:5:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6531,10551,6/6/2014T21:5:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 31040 B -buffer.c: Used memory: 3664 B -main.c: Time (absolute): 3611070301 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611070360 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070360 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611070360 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T21:6:0 -ntp.c: Writing timestamp... -main.c: Data is: 39204,29050,6/6/2014T21:6:0 -ntp.c: Writing timestamp... -main.c: Data is: 6533,10492,6/6/2014T21:6:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T21:6:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T21:6:0 -main.c: Memory freed - main.c: Putting data: 39204,29050,6/6/2014T21:6:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39204,29050,6/6/2014T21:6:0 -main.c: Memory freed - main.c: Putting data: 6533,10492,6/6/2014T21:6:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6533,10492,6/6/2014T21:6:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30896 B -buffer.c: Used memory: 3808 B -main.c: Time (absolute): 3611070360 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611070420 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070421 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611070421 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T21:7:1 -ntp.c: Writing timestamp... -main.c: Data is: 39200,29053,6/6/2014T21:7:1 -ntp.c: Writing timestamp... -main.c: Data is: 6530,10516,6/6/2014T21:7:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T21:7:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T21:7:1 -main.c: Memory freed - main.c: Putting data: 39200,29053,6/6/2014T21:7:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39200,29053,6/6/2014T21:7:1 -main.c: Memory freed - main.c: Putting data: 6530,10516,6/6/2014T21:7:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6530,10516,6/6/2014T21:7:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852105,6/6/2014T21:5:0 with length 22 -json.c: Preparing: 852105,6/6/2014T21:6:0 with length 22 -json.c: Preparing: 852105,6/6/2014T21:7:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 165 - -{"observations":[{"value":"852105","timestamp":"6/6/2014T21:5:0"},{"value":"852105","timestamp":"6/6/2014T21:6:0"},{"value":"852105","timestamp":"6/6/2014T21:7:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39200,29054,6/6/2014T21:5:0 with length 27 -json.c: Preparing: 39204,29050,6/6/2014T21:6:0 with length 27 -json.c: Preparing: 39200,29053,6/6/2014T21:7:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"39200,29054","timestamp":"6/6/2014T21:5:0"},{"value":"39204,29050","timestamp":"6/6/2014T21:6:0"},{"value":"39200,29053","timestamp":"6/6/2014T21:7:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6531,10551,6/6/2014T21:5:0 with length 26 -json.c: Preparing: 6533,10492,6/6/2014T21:6:0 with length 26 -json.c: Preparing: 6530,10516,6/6/2014T21:7:1 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 177 - -{"observations":[{"value":"6531,10551","timestamp":"6/6/2014T21:5:0"},{"value":"6533,10492","timestamp":"6/6/2014T21:6:0"},{"value":"6530,10516","timestamp":"6/6/2014T21:7:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:7:1 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:7:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611070437 -main.c: Updating new time to 3611070437 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611070437 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 31104 B -buffer.c: Used memory: 3600 B -main.c: Time (absolute): 3611070438 -Time LONG_PERIOD: 54 -Time SHORT_PERIOD: 18 -timer-loop.c: Time to sleep! for 42 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611070451 -Time LONG_PERIOD: 93 -Time SHORT_PERIOD: 31 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070451 -Time LONG_PERIOD: 93 -Time SHORT_PERIOD: 31 -main.c: Timestamp (absolute): 3611070451 -Timestamp LONG_PERIOD: 93 -Timestamp SHORT_PERIOD: 31 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T21:7:31 -ntp.c: Writing timestamp... -main.c: Data is: 39200,29054,6/6/2014T21:7:31 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10544,6/6/2014T21:7:31 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T21:7:31 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T21:7:31 -main.c: Memory freed - main.c: Putting data: 39200,29054,6/6/2014T21:7:31 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39200,29054,6/6/2014T21:7:31 -main.c: Memory freed - main.c: Putting data: 6534,10544,6/6/2014T21:7:31 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10544,6/6/2014T21:7:31 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30968 B -buffer.c: Used memory: 3736 B -main.c: Time (absolute): 3611070451 -Time LONG_PERIOD: 93 -Time SHORT_PERIOD: 31 -timer-loop.c: Time to sleep! for 29 seconds -main.c: Time (absolute): 3611070480 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070481 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611070481 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T21:8:1 -ntp.c: Writing timestamp... -main.c: Data is: 39198,29055,6/6/2014T21:8:1 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10524,6/6/2014T21:8:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T21:8:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T21:8:1 -main.c: Memory freed - main.c: Putting data: 39198,29055,6/6/2014T21:8:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39198,29055,6/6/2014T21:8:1 -main.c: Memory freed - main.c: Putting data: 6534,10524,6/6/2014T21:8:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10524,6/6/2014T21:8:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30832 B -buffer.c: Used memory: 3872 B -main.c: Time (absolute): 3611070481 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611070540 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070541 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611070541 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T21:9:1 -ntp.c: Writing timestamp... -main.c: Data is: 39199,29054,6/6/2014T21:9:1 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10540,6/6/2014T21:9:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T21:9:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T21:9:1 -main.c: Memory freed - main.c: Putting data: 39199,29054,6/6/2014T21:9:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39199,29054,6/6/2014T21:9:1 -main.c: Memory freed - main.c: Putting data: 6534,10540,6/6/2014T21:9:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10540,6/6/2014T21:9:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852105,6/6/2014T21:7:31 with length 23 -json.c: Preparing: 852105,6/6/2014T21:8:1 with length 22 -json.c: Preparing: 852105,6/6/2014T21:9:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 166 - -{"observations":[{"value":"852105","timestamp":"6/6/2014T21:7:31"},{"value":"852105","timestamp":"6/6/2014T21:8:1"},{"value":"852105","timestamp":"6/6/2014T21:9:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39200,29054,6/6/2014T21:7:31 with length 28 -json.c: Preparing: 39198,29055,6/6/2014T21:8:1 with length 27 -json.c: Preparing: 39199,29054,6/6/2014T21:9:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 181 - -{"observations":[{"value":"39200,29054","timestamp":"6/6/2014T21:7:31"},{"value":"39198,29055","timestamp":"6/6/2014T21:8:1"},{"value":"39199,29054","timestamp":"6/6/2014T21:9:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6534,10544,6/6/2014T21:7:31 with length 27 -json.c: Preparing: 6534,10524,6/6/2014T21:8:1 with length 26 -json.c: Preparing: 6534,10540,6/6/2014T21:9:1 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 178 - -{"observations":[{"value":"6534,10544","timestamp":"6/6/2014T21:7:31"},{"value":"6534,10524","timestamp":"6/6/2014T21:8:1"},{"value":"6534,10540","timestamp":"6/6/2014T21:9:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:9:1 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:9:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611070583 -main.c: Updating new time to 3611070583 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611070583 -Time LONG_PERIOD: 129 -Time SHORT_PERIOD: 43 -buffer.c: Checking available memory... -buffer.c: Available memory: 31040 B -buffer.c: Used memory: 3664 B -main.c: Time (absolute): 3611070583 -Time LONG_PERIOD: 129 -Time SHORT_PERIOD: 43 -timer-loop.c: Time to sleep! for 17 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611070600 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070601 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611070601 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T21:10:1 -ntp.c: Writing timestamp... -main.c: Data is: 39204,29052,6/6/2014T21:10:1 -ntp.c: Writing timestamp... -main.c: Data is: 6531,10524,6/6/2014T21:10:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T21:10:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T21:10:1 -main.c: Memory freed - main.c: Putting data: 39204,29052,6/6/2014T21:10:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39204,29052,6/6/2014T21:10:1 -main.c: Memory freed - main.c: Putting data: 6531,10524,6/6/2014T21:10:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6531,10524,6/6/2014T21:10:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30896 B -buffer.c: Used memory: 3808 B -main.c: Time (absolute): 3611070601 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611070660 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070661 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611070661 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T21:11:1 -ntp.c: Writing timestamp... -main.c: Data is: 39208,29050,6/6/2014T21:11:1 -ntp.c: Writing timestamp... -main.c: Data is: 6533,10551,6/6/2014T21:11:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T21:11:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T21:11:1 -main.c: Memory freed - main.c: Putting data: 39208,29050,6/6/2014T21:11:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39208,29050,6/6/2014T21:11:1 -main.c: Memory freed - main.c: Putting data: 6533,10551,6/6/2014T21:11:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6533,10551,6/6/2014T21:11:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30760 B -buffer.c: Used memory: 3944 B -main.c: Time (absolute): 3611070661 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611070720 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070721 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611070721 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T21:12:1 -ntp.c: Writing timestamp... -main.c: Data is: 39208,29048,6/6/2014T21:12:1 -ntp.c: Writing timestamp... -main.c: Data is: 6528,10559,6/6/2014T21:12:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T21:12:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T21:12:1 -main.c: Memory freed - main.c: Putting data: 39208,29048,6/6/2014T21:12:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39208,29048,6/6/2014T21:12:1 -main.c: Memory freed - main.c: Putting data: 6528,10559,6/6/2014T21:12:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6528,10559,6/6/2014T21:12:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852105,6/6/2014T21:10:1 with length 23 -json.c: Preparing: 852105,6/6/2014T21:11:1 with length 23 -json.c: Preparing: 852105,6/6/2014T21:12:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"852105","timestamp":"6/6/2014T21:10:1"},{"value":"852105","timestamp":"6/6/2014T21:11:1"},{"value":"852105","timestamp":"6/6/2014T21:12:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39204,29052,6/6/2014T21:10:1 with length 28 -json.c: Preparing: 39208,29050,6/6/2014T21:11:1 with length 28 -json.c: Preparing: 39208,29048,6/6/2014T21:12:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39204,29052","timestamp":"6/6/2014T21:10:1"},{"value":"39208,29050","timestamp":"6/6/2014T21:11:1"},{"value":"39208,29048","timestamp":"6/6/2014T21:12:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6531,10524,6/6/2014T21:10:1 with length 27 -json.c: Preparing: 6533,10551,6/6/2014T21:11:1 with length 27 -json.c: Preparing: 6528,10559,6/6/2014T21:12:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6531,10524","timestamp":"6/6/2014T21:10:1"},{"value":"6533,10551","timestamp":"6/6/2014T21:11:1"},{"value":"6528,10559","timestamp":"6/6/2014T21:12:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:12:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:12:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611070735 -main.c: Updating new time to 3611070735 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611070735 -Time LONG_PERIOD: 45 -Time SHORT_PERIOD: 15 -buffer.c: Checking available memory... -buffer.c: Available memory: 30968 B -buffer.c: Used memory: 3736 B -main.c: Time (absolute): 3611070735 -Time LONG_PERIOD: 45 -Time SHORT_PERIOD: 15 -timer-loop.c: Time to sleep! for 45 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611070780 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070781 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611070781 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T21:13:1 -ntp.c: Writing timestamp... -main.c: Data is: 39203,29051,6/6/2014T21:13:1 -ntp.c: Writing timestamp... -main.c: Data is: 6528,10508,6/6/2014T21:13:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T21:13:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T21:13:1 -main.c: Memory freed - main.c: Putting data: 39203,29051,6/6/2014T21:13:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39203,29051,6/6/2014T21:13:1 -main.c: Memory freed - main.c: Putting data: 6528,10508,6/6/2014T21:13:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6528,10508,6/6/2014T21:13:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30824 B -buffer.c: Used memory: 3880 B -main.c: Time (absolute): 3611070781 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611070840 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070841 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611070841 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T21:14:1 -ntp.c: Writing timestamp... -main.c: Data is: 39204,29051,6/6/2014T21:14:1 -ntp.c: Writing timestamp... -main.c: Data is: 6527,10485,6/6/2014T21:14:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T21:14:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T21:14:1 -main.c: Memory freed - main.c: Putting data: 39204,29051,6/6/2014T21:14:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39204,29051,6/6/2014T21:14:1 -main.c: Memory freed - main.c: Putting data: 6527,10485,6/6/2014T21:14:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6527,10485,6/6/2014T21:14:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30680 B -buffer.c: Used memory: 4024 B -main.c: Time (absolute): 3611070841 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611070900 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070901 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611070901 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786569,6/6/2014T21:15:1 -ntp.c: Writing timestamp... -main.c: Data is: 39209,29048,6/6/2014T21:15:1 -ntp.c: Writing timestamp... -main.c: Data is: 6530,10516,6/6/2014T21:15:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786569,6/6/2014T21:15:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786569,6/6/2014T21:15:1 -main.c: Memory freed - main.c: Putting data: 39209,29048,6/6/2014T21:15:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39209,29048,6/6/2014T21:15:1 -main.c: Memory freed - main.c: Putting data: 6530,10516,6/6/2014T21:15:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6530,10516,6/6/2014T21:15:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852105,6/6/2014T21:13:1 with length 23 -json.c: Preparing: 852105,6/6/2014T21:14:1 with length 23 -json.c: Preparing: 786569,6/6/2014T21:15:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"852105","timestamp":"6/6/2014T21:13:1"},{"value":"852105","timestamp":"6/6/2014T21:14:1"},{"value":"786569","timestamp":"6/6/2014T21:15:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39203,29051,6/6/2014T21:13:1 with length 28 -json.c: Preparing: 39204,29051,6/6/2014T21:14:1 with length 28 -json.c: Preparing: 39209,29048,6/6/2014T21:15:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39203,29051","timestamp":"6/6/2014T21:13:1"},{"value":"39204,29051","timestamp":"6/6/2014T21:14:1"},{"value":"39209,29048","timestamp":"6/6/2014T21:15:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6528,10508,6/6/2014T21:13:1 with length 27 -json.c: Preparing: 6527,10485,6/6/2014T21:14:1 with length 27 -json.c: Preparing: 6530,10516,6/6/2014T21:15:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6528,10508","timestamp":"6/6/2014T21:13:1"},{"value":"6527,10485","timestamp":"6/6/2014T21:14:1"},{"value":"6530,10516","timestamp":"6/6/2014T21:15:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:15:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:15:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611070917 -main.c: Updating new time to 3611070917 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611070917 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 30888 B -buffer.c: Used memory: 3816 B -main.c: Time (absolute): 3611070917 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611070960 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 87 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611070961 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611070961 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786567,6/6/2014T21:16:1 -ntp.c: Writing timestamp... -main.c: Data is: 39212,29052,6/6/2014T21:16:1 -ntp.c: Writing timestamp... -main.c: Data is: 6528,10504,6/6/2014T21:16:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786567,6/6/2014T21:16:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786567,6/6/2014T21:16:1 -main.c: Memory freed - main.c: Putting data: 39212,29052,6/6/2014T21:16:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39212,29052,6/6/2014T21:16:1 -main.c: Memory freed - main.c: Putting data: 6528,10504,6/6/2014T21:16:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6528,10504,6/6/2014T21:16:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30736 B -buffer.c: Used memory: 3968 B -main.c: Time (absolute): 3611070961 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611071020 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071021 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611071021 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786569,6/6/2014T21:17:1 -ntp.c: Writing timestamp... -main.c: Data is: 39208,29048,6/6/2014T21:17:1 -ntp.c: Writing timestamp... -main.c: Data is: 6531,10520,6/6/2014T21:17:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786569,6/6/2014T21:17:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786569,6/6/2014T21:17:1 -main.c: Memory freed - main.c: Putting data: 39208,29048,6/6/2014T21:17:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39208,29048,6/6/2014T21:17:1 -main.c: Memory freed - main.c: Putting data: 6531,10520,6/6/2014T21:17:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6531,10520,6/6/2014T21:17:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30600 B -buffer.c: Used memory: 4104 B -main.c: Time (absolute): 3611071021 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611071080 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071081 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611071081 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786569,6/6/2014T21:18:1 -ntp.c: Writing timestamp... -main.c: Data is: 39206,29051,6/6/2014T21:18:1 -ntp.c: Writing timestamp... -main.c: Data is: 6531,10496,6/6/2014T21:18:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786569,6/6/2014T21:18:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786569,6/6/2014T21:18:1 -main.c: Memory freed - main.c: Putting data: 39206,29051,6/6/2014T21:18:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39206,29051,6/6/2014T21:18:1 -main.c: Memory freed - main.c: Putting data: 6531,10496,6/6/2014T21:18:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6531,10496,6/6/2014T21:18:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786567,6/6/2014T21:16:1 with length 23 -json.c: Preparing: 786569,6/6/2014T21:17:1 with length 23 -json.c: Preparing: 786569,6/6/2014T21:18:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786567","timestamp":"6/6/2014T21:16:1"},{"value":"786569","timestamp":"6/6/2014T21:17:1"},{"value":"786569","timestamp":"6/6/2014T21:18:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39212,29052,6/6/2014T21:16:1 with length 28 -json.c: Preparing: 39208,29048,6/6/2014T21:17:1 with length 28 -json.c: Preparing: 39206,29051,6/6/2014T21:18:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39212,29052","timestamp":"6/6/2014T21:16:1"},{"value":"39208,29048","timestamp":"6/6/2014T21:17:1"},{"value":"39206,29051","timestamp":"6/6/2014T21:18:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6528,10504,6/6/2014T21:16:1 with length 27 -json.c: Preparing: 6531,10520,6/6/2014T21:17:1 with length 27 -json.c: Preparing: 6531,10496,6/6/2014T21:18:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6528,10504","timestamp":"6/6/2014T21:16:1"},{"value":"6531,10520","timestamp":"6/6/2014T21:17:1"},{"value":"6531,10496","timestamp":"6/6/2014T21:18:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:18:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:18:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611071096 -main.c: Updating new time to 3611071096 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611071096 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 30800 B -buffer.c: Used memory: 3904 B -main.c: Time (absolute): 3611071096 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611071140 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 86 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071140 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611071140 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786566,6/6/2014T21:19:0 -ntp.c: Writing timestamp... -main.c: Data is: 39205,29050,6/6/2014T21:19:0 -ntp.c: Writing timestamp... -main.c: Data is: 6528,10567,6/6/2014T21:19:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786566,6/6/2014T21:19:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786566,6/6/2014T21:19:0 -main.c: Memory freed - main.c: Putting data: 39205,29050,6/6/2014T21:19:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39205,29050,6/6/2014T21:19:0 -main.c: Memory freed - main.c: Putting data: 6528,10567,6/6/2014T21:19:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6528,10567,6/6/2014T21:19:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30640 B -buffer.c: Used memory: 4064 B -main.c: Time (absolute): 3611071140 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611071200 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 85 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071201 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611071201 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786565,6/6/2014T21:20:1 -ntp.c: Writing timestamp... -main.c: Data is: 39200,29054,6/6/2014T21:20:1 -ntp.c: Writing timestamp... -main.c: Data is: 6531,10524,6/6/2014T21:20:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786565,6/6/2014T21:20:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786565,6/6/2014T21:20:1 -main.c: Memory freed - main.c: Putting data: 39200,29054,6/6/2014T21:20:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39200,29054,6/6/2014T21:20:1 -main.c: Memory freed - main.c: Putting data: 6531,10524,6/6/2014T21:20:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6531,10524,6/6/2014T21:20:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30504 B -buffer.c: Used memory: 4200 B -main.c: Time (absolute): 3611071201 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611071260 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071261 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611071261 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786569,6/6/2014T21:21:1 -ntp.c: Writing timestamp... -main.c: Data is: 39204,29049,6/6/2014T21:21:1 -ntp.c: Writing timestamp... -main.c: Data is: 6533,10512,6/6/2014T21:21:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786569,6/6/2014T21:21:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786569,6/6/2014T21:21:1 -main.c: Memory freed - main.c: Putting data: 39204,29049,6/6/2014T21:21:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39204,29049,6/6/2014T21:21:1 -main.c: Memory freed - main.c: Putting data: 6533,10512,6/6/2014T21:21:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6533,10512,6/6/2014T21:21:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786566,6/6/2014T21:19:0 with length 23 -json.c: Preparing: 786565,6/6/2014T21:20:1 with length 23 -json.c: Preparing: 786569,6/6/2014T21:21:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786566","timestamp":"6/6/2014T21:19:0"},{"value":"786565","timestamp":"6/6/2014T21:20:1"},{"value":"786569","timestamp":"6/6/2014T21:21:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39205,29050,6/6/2014T21:19:0 with length 28 -json.c: Preparing: 39200,29054,6/6/2014T21:20:1 with length 28 -json.c: Preparing: 39204,29049,6/6/2014T21:21:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39205,29050","timestamp":"6/6/2014T21:19:0"},{"value":"39200,29054","timestamp":"6/6/2014T21:20:1"},{"value":"39204,29049","timestamp":"6/6/2014T21:21:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6528,10567,6/6/2014T21:19:0 with length 27 -json.c: Preparing: 6531,10524,6/6/2014T21:20:1 with length 27 -json.c: Preparing: 6533,10512,6/6/2014T21:21:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6528,10567","timestamp":"6/6/2014T21:19:0"},{"value":"6531,10524","timestamp":"6/6/2014T21:20:1"},{"value":"6533,10512","timestamp":"6/6/2014T21:21:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:21:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:21:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611071277 -main.c: Updating new time to 3611071277 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611071277 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 30712 B -buffer.c: Used memory: 3992 B -main.c: Time (absolute): 3611071277 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611071320 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071320 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611071320 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786569,6/6/2014T21:22:0 -ntp.c: Writing timestamp... -main.c: Data is: 39207,29050,6/6/2014T21:22:0 -ntp.c: Writing timestamp... -main.c: Data is: 6528,10575,6/6/2014T21:22:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786569,6/6/2014T21:22:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786569,6/6/2014T21:22:0 -main.c: Memory freed - main.c: Putting data: 39207,29050,6/6/2014T21:22:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39207,29050,6/6/2014T21:22:0 -main.c: Memory freed - main.c: Putting data: 6528,10575,6/6/2014T21:22:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6528,10575,6/6/2014T21:22:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30568 B -buffer.c: Used memory: 4136 B -main.c: Time (absolute): 3611071320 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611071380 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071381 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611071381 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786568,6/6/2014T21:23:1 -ntp.c: Writing timestamp... -main.c: Data is: 39200,29048,6/6/2014T21:23:1 -ntp.c: Writing timestamp... -main.c: Data is: 6527,10551,6/6/2014T21:23:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786568,6/6/2014T21:23:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786568,6/6/2014T21:23:1 -main.c: Memory freed - main.c: Putting data: 39200,29048,6/6/2014T21:23:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39200,29048,6/6/2014T21:23:1 -main.c: Memory freed - main.c: Putting data: 6527,10551,6/6/2014T21:23:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6527,10551,6/6/2014T21:23:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30432 B -buffer.c: Used memory: 4272 B -main.c: Time (absolute): 3611071381 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611071440 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 82 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071441 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611071441 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786562,6/6/2014T21:24:1 -ntp.c: Writing timestamp... -main.c: Data is: 39200,29050,6/6/2014T21:24:1 -ntp.c: Writing timestamp... -main.c: Data is: 6527,10544,6/6/2014T21:24:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786562,6/6/2014T21:24:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786562,6/6/2014T21:24:1 -main.c: Memory freed - main.c: Putting data: 39200,29050,6/6/2014T21:24:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39200,29050,6/6/2014T21:24:1 -main.c: Memory freed - main.c: Putting data: 6527,10544,6/6/2014T21:24:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6527,10544,6/6/2014T21:24:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786569,6/6/2014T21:22:0 with length 23 -json.c: Preparing: 786568,6/6/2014T21:23:1 with length 23 -json.c: Preparing: 786562,6/6/2014T21:24:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786569","timestamp":"6/6/2014T21:22:0"},{"value":"786568","timestamp":"6/6/2014T21:23:1"},{"value":"786562","timestamp":"6/6/2014T21:24:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39207,29050,6/6/2014T21:22:0 with length 28 -json.c: Preparing: 39200,29048,6/6/2014T21:23:1 with length 28 -json.c: Preparing: 39200,29050,6/6/2014T21:24:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39207,29050","timestamp":"6/6/2014T21:22:0"},{"value":"39200,29048","timestamp":"6/6/2014T21:23:1"},{"value":"39200,29050","timestamp":"6/6/2014T21:24:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6528,10575,6/6/2014T21:22:0 with length 27 -json.c: Preparing: 6527,10551,6/6/2014T21:23:1 with length 27 -json.c: Preparing: 6527,10544,6/6/2014T21:24:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6528,10575","timestamp":"6/6/2014T21:22:0"},{"value":"6527,10551","timestamp":"6/6/2014T21:23:1"},{"value":"6527,10544","timestamp":"6/6/2014T21:24:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:24:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:24:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611071457 -main.c: Updating new time to 3611071457 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611071457 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 30640 B -buffer.c: Used memory: 4064 B -main.c: Time (absolute): 3611071457 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611071500 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071501 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611071501 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786568,6/6/2014T21:25:1 -ntp.c: Writing timestamp... -main.c: Data is: 39201,29050,6/6/2014T21:25:1 -ntp.c: Writing timestamp... -main.c: Data is: 6528,10516,6/6/2014T21:25:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786568,6/6/2014T21:25:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786568,6/6/2014T21:25:1 -main.c: Memory freed - main.c: Putting data: 39201,29050,6/6/2014T21:25:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39201,29050,6/6/2014T21:25:1 -main.c: Memory freed - main.c: Putting data: 6528,10516,6/6/2014T21:25:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6528,10516,6/6/2014T21:25:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30488 B -buffer.c: Used memory: 4216 B -main.c: Time (absolute): 3611071501 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611071560 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 87 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071561 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611071561 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786567,6/6/2014T21:26:1 -ntp.c: Writing timestamp... -main.c: Data is: 39204,29047,6/6/2014T21:26:1 -ntp.c: Writing timestamp... -main.c: Data is: 6528,10528,6/6/2014T21:26:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786567,6/6/2014T21:26:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786567,6/6/2014T21:26:1 -main.c: Memory freed - main.c: Putting data: 39204,29047,6/6/2014T21:26:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39204,29047,6/6/2014T21:26:1 -main.c: Memory freed - main.c: Putting data: 6528,10528,6/6/2014T21:26:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6528,10528,6/6/2014T21:26:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30336 B -buffer.c: Used memory: 4368 B -main.c: Time (absolute): 3611071561 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611071620 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071621 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611071621 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786568,6/6/2014T21:27:1 -ntp.c: Writing timestamp... -main.c: Data is: 39204,29048,6/6/2014T21:27:1 -ntp.c: Writing timestamp... -main.c: Data is: 6528,10528,6/6/2014T21:27:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786568,6/6/2014T21:27:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786568,6/6/2014T21:27:1 -main.c: Memory freed - main.c: Putting data: 39204,29048,6/6/2014T21:27:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39204,29048,6/6/2014T21:27:1 -main.c: Memory freed - main.c: Putting data: 6528,10528,6/6/2014T21:27:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6528,10528,6/6/2014T21:27:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786568,6/6/2014T21:25:1 with length 23 -json.c: Preparing: 786567,6/6/2014T21:26:1 with length 23 -json.c: Preparing: 786568,6/6/2014T21:27:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786568","timestamp":"6/6/2014T21:25:1"},{"value":"786567","timestamp":"6/6/2014T21:26:1"},{"value":"786568","timestamp":"6/6/2014T21:27:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39201,29050,6/6/2014T21:25:1 with length 28 -json.c: Preparing: 39204,29047,6/6/2014T21:26:1 with length 28 -json.c: Preparing: 39204,29048,6/6/2014T21:27:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39201,29050","timestamp":"6/6/2014T21:25:1"},{"value":"39204,29047","timestamp":"6/6/2014T21:26:1"},{"value":"39204,29048","timestamp":"6/6/2014T21:27:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6528,10516,6/6/2014T21:25:1 with length 27 -json.c: Preparing: 6528,10528,6/6/2014T21:26:1 with length 27 -json.c: Preparing: 6528,10528,6/6/2014T21:27:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6528,10516","timestamp":"6/6/2014T21:25:1"},{"value":"6528,10528","timestamp":"6/6/2014T21:26:1"},{"value":"6528,10528","timestamp":"6/6/2014T21:27:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:27:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:27:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611071636 -main.c: Updating new time to 3611071636 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611071636 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 30552 B -buffer.c: Used memory: 4152 B -main.c: Time (absolute): 3611071636 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611071680 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071681 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611071681 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786569,6/6/2014T21:28:1 -ntp.c: Writing timestamp... -main.c: Data is: 39205,29048,6/6/2014T21:28:1 -ntp.c: Writing timestamp... -main.c: Data is: 6528,10489,6/6/2014T21:28:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786569,6/6/2014T21:28:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786569,6/6/2014T21:28:1 -main.c: Memory freed - main.c: Putting data: 39205,29048,6/6/2014T21:28:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39205,29048,6/6/2014T21:28:1 -main.c: Memory freed - main.c: Putting data: 6528,10489,6/6/2014T21:28:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6528,10489,6/6/2014T21:28:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30408 B -buffer.c: Used memory: 4296 B -main.c: Time (absolute): 3611071681 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611071740 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071741 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611071741 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786568,6/6/2014T21:29:1 -ntp.c: Writing timestamp... -main.c: Data is: 39201,29048,6/6/2014T21:29:1 -ntp.c: Writing timestamp... -main.c: Data is: 6528,10544,6/6/2014T21:29:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786568,6/6/2014T21:29:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786568,6/6/2014T21:29:1 -main.c: Memory freed - main.c: Putting data: 39201,29048,6/6/2014T21:29:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39201,29048,6/6/2014T21:29:1 -main.c: Memory freed - main.c: Putting data: 6528,10544,6/6/2014T21:29:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6528,10544,6/6/2014T21:29:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30264 B -buffer.c: Used memory: 4440 B -main.c: Time (absolute): 3611071741 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611071800 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071801 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611071801 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786569,6/6/2014T21:30:1 -ntp.c: Writing timestamp... -main.c: Data is: 39208,29046,6/6/2014T21:30:1 -ntp.c: Writing timestamp... -main.c: Data is: 6526,10524,6/6/2014T21:30:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786569,6/6/2014T21:30:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786569,6/6/2014T21:30:1 -main.c: Memory freed - main.c: Putting data: 39208,29046,6/6/2014T21:30:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39208,29046,6/6/2014T21:30:1 -main.c: Memory freed - main.c: Putting data: 6526,10524,6/6/2014T21:30:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6526,10524,6/6/2014T21:30:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786569,6/6/2014T21:28:1 with length 23 -json.c: Preparing: 786568,6/6/2014T21:29:1 with length 23 -json.c: Preparing: 786569,6/6/2014T21:30:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786569","timestamp":"6/6/2014T21:28:1"},{"value":"786568","timestamp":"6/6/2014T21:29:1"},{"value":"786569","timestamp":"6/6/2014T21:30:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39205,29048,6/6/2014T21:28:1 with length 28 -json.c: Preparing: 39201,29048,6/6/2014T21:29:1 with length 28 -json.c: Preparing: 39208,29046,6/6/2014T21:30:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39205,29048","timestamp":"6/6/2014T21:28:1"},{"value":"39201,29048","timestamp":"6/6/2014T21:29:1"},{"value":"39208,29046","timestamp":"6/6/2014T21:30:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6528,10489,6/6/2014T21:28:1 with length 27 -json.c: Preparing: 6528,10544,6/6/2014T21:29:1 with length 27 -json.c: Preparing: 6526,10524,6/6/2014T21:30:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6528,10489","timestamp":"6/6/2014T21:28:1"},{"value":"6528,10544","timestamp":"6/6/2014T21:29:1"},{"value":"6526,10524","timestamp":"6/6/2014T21:30:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:30:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:30:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611071816 -main.c: Updating new time to 3611071816 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611071816 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 30472 B -buffer.c: Used memory: 4232 B -main.c: Time (absolute): 3611071816 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611071860 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071861 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611071861 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786569,6/6/2014T21:31:1 -ntp.c: Writing timestamp... -main.c: Data is: 39205,29045,6/6/2014T21:31:1 -ntp.c: Writing timestamp... -main.c: Data is: 6527,10579,6/6/2014T21:31:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786569,6/6/2014T21:31:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786569,6/6/2014T21:31:1 -main.c: Memory freed - main.c: Putting data: 39205,29045,6/6/2014T21:31:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39205,29045,6/6/2014T21:31:1 -main.c: Memory freed - main.c: Putting data: 6527,10579,6/6/2014T21:31:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6527,10579,6/6/2014T21:31:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30328 B -buffer.c: Used memory: 4376 B -main.c: Time (absolute): 3611071861 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611071920 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071920 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611071920 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786569,6/6/2014T21:32:0 -ntp.c: Writing timestamp... -main.c: Data is: 39207,29046,6/6/2014T21:32:0 -ntp.c: Writing timestamp... -main.c: Data is: 6527,10528,6/6/2014T21:32:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786569,6/6/2014T21:32:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786569,6/6/2014T21:32:0 -main.c: Memory freed - main.c: Putting data: 39207,29046,6/6/2014T21:32:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39207,29046,6/6/2014T21:32:0 -main.c: Memory freed - main.c: Putting data: 6527,10528,6/6/2014T21:32:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6527,10528,6/6/2014T21:32:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30192 B -buffer.c: Used memory: 4512 B -main.c: Time (absolute): 3611071921 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611071980 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611071980 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611071980 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786569,6/6/2014T21:33:0 -ntp.c: Writing timestamp... -main.c: Data is: 39214,29048,6/6/2014T21:33:0 -ntp.c: Writing timestamp... -main.c: Data is: 6528,10489,6/6/2014T21:33:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786569,6/6/2014T21:33:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786569,6/6/2014T21:33:0 -main.c: Memory freed - main.c: Putting data: 39214,29048,6/6/2014T21:33:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39214,29048,6/6/2014T21:33:0 -main.c: Memory freed - main.c: Putting data: 6528,10489,6/6/2014T21:33:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6528,10489,6/6/2014T21:33:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786569,6/6/2014T21:31:1 with length 23 -json.c: Preparing: 786569,6/6/2014T21:32:0 with length 23 -json.c: Preparing: 786569,6/6/2014T21:33:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786569","timestamp":"6/6/2014T21:31:1"},{"value":"786569","timestamp":"6/6/2014T21:32:0"},{"value":"786569","timestamp":"6/6/2014T21:33:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39205,29045,6/6/2014T21:31:1 with length 28 -json.c: Preparing: 39207,29046,6/6/2014T21:32:0 with length 28 -json.c: Preparing: 39214,29048,6/6/2014T21:33:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39205,29045","timestamp":"6/6/2014T21:31:1"},{"value":"39207,29046","timestamp":"6/6/2014T21:32:0"},{"value":"39214,29048","timestamp":"6/6/2014T21:33:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6527,10579,6/6/2014T21:31:1 with length 27 -json.c: Preparing: 6527,10528,6/6/2014T21:32:0 with length 27 -json.c: Preparing: 6528,10489,6/6/2014T21:33:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6527,10579","timestamp":"6/6/2014T21:31:1"},{"value":"6527,10528","timestamp":"6/6/2014T21:32:0"},{"value":"6528,10489","timestamp":"6/6/2014T21:33:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:33:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:33:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611071996 -main.c: Updating new time to 3611071996 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611071996 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 30400 B -buffer.c: Used memory: 4304 B -main.c: Time (absolute): 3611071996 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611072040 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072041 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072041 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786568,6/6/2014T21:34:1 -ntp.c: Writing timestamp... -main.c: Data is: 39206,29048,6/6/2014T21:34:1 -ntp.c: Writing timestamp... -main.c: Data is: 6527,10524,6/6/2014T21:34:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786568,6/6/2014T21:34:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786568,6/6/2014T21:34:1 -main.c: Memory freed - main.c: Putting data: 39206,29048,6/6/2014T21:34:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39206,29048,6/6/2014T21:34:1 -main.c: Memory freed - main.c: Putting data: 6527,10524,6/6/2014T21:34:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6527,10524,6/6/2014T21:34:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30248 B -buffer.c: Used memory: 4456 B -main.c: Time (absolute): 3611072041 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611072100 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0B -sensors.c: [LIGHT] CH0 = 77 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072101 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072101 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 721015,6/6/2014T21:35:1 -ntp.c: Writing timestamp... -main.c: Data is: 39211,29051,6/6/2014T21:35:1 -ntp.c: Writing timestamp... -main.c: Data is: 6527,10536,6/6/2014T21:35:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 721015,6/6/2014T21:35:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 721015,6/6/2014T21:35:1 -main.c: Memory freed - main.c: Putting data: 39211,29051,6/6/2014T21:35:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39211,29051,6/6/2014T21:35:1 -main.c: Memory freed - main.c: Putting data: 6527,10536,6/6/2014T21:35:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6527,10536,6/6/2014T21:35:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30096 B -buffer.c: Used memory: 4608 B -main.c: Time (absolute): 3611072101 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611072160 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 85 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072161 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072161 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786565,6/6/2014T21:36:1 -ntp.c: Writing timestamp... -main.c: Data is: 39208,29050,6/6/2014T21:36:1 -ntp.c: Writing timestamp... -main.c: Data is: 6533,10583,6/6/2014T21:36:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786565,6/6/2014T21:36:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786565,6/6/2014T21:36:1 -main.c: Memory freed - main.c: Putting data: 39208,29050,6/6/2014T21:36:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39208,29050,6/6/2014T21:36:1 -main.c: Memory freed - main.c: Putting data: 6533,10583,6/6/2014T21:36:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6533,10583,6/6/2014T21:36:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786568,6/6/2014T21:34:1 with length 23 -json.c: Preparing: 721015,6/6/2014T21:35:1 with length 23 -json.c: Preparing: 786565,6/6/2014T21:36:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786568","timestamp":"6/6/2014T21:34:1"},{"value":"721015","timestamp":"6/6/2014T21:35:1"},{"value":"786565","timestamp":"6/6/2014T21:36:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39206,29048,6/6/2014T21:34:1 with length 28 -json.c: Preparing: 39211,29051,6/6/2014T21:35:1 with length 28 -json.c: Preparing: 39208,29050,6/6/2014T21:36:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39206,29048","timestamp":"6/6/2014T21:34:1"},{"value":"39211,29051","timestamp":"6/6/2014T21:35:1"},{"value":"39208,29050","timestamp":"6/6/2014T21:36:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6527,10524,6/6/2014T21:34:1 with length 27 -json.c: Preparing: 6527,10536,6/6/2014T21:35:1 with length 27 -json.c: Preparing: 6533,10583,6/6/2014T21:36:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6527,10524","timestamp":"6/6/2014T21:34:1"},{"value":"6527,10536","timestamp":"6/6/2014T21:35:1"},{"value":"6533,10583","timestamp":"6/6/2014T21:36:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:36:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:36:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611072176 -main.c: Updating new time to 3611072176 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611072176 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 30312 B -buffer.c: Used memory: 4392 B -main.c: Time (absolute): 3611072176 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611072220 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 80 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072221 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072221 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786560,6/6/2014T21:37:1 -ntp.c: Writing timestamp... -main.c: Data is: 39208,29055,6/6/2014T21:37:1 -ntp.c: Writing timestamp... -main.c: Data is: 6537,10536,6/6/2014T21:37:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786560,6/6/2014T21:37:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786560,6/6/2014T21:37:1 -main.c: Memory freed - main.c: Putting data: 39208,29055,6/6/2014T21:37:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39208,29055,6/6/2014T21:37:1 -main.c: Memory freed - main.c: Putting data: 6537,10536,6/6/2014T21:37:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6537,10536,6/6/2014T21:37:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30152 B -buffer.c: Used memory: 4552 B -main.c: Time (absolute): 3611072221 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611072280 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 80 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072281 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072281 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786560,6/6/2014T21:38:1 -ntp.c: Writing timestamp... -main.c: Data is: 39210,29054,6/6/2014T21:38:1 -ntp.c: Writing timestamp... -main.c: Data is: 6535,10516,6/6/2014T21:38:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786560,6/6/2014T21:38:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786560,6/6/2014T21:38:1 -main.c: Memory freed - main.c: Putting data: 39210,29054,6/6/2014T21:38:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39210,29054,6/6/2014T21:38:1 -main.c: Memory freed - main.c: Putting data: 6535,10516,6/6/2014T21:38:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6535,10516,6/6/2014T21:38:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30008 B -buffer.c: Used memory: 4696 B -main.c: Time (absolute): 3611072281 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611072340 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 80 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072340 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611072340 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786560,6/6/2014T21:39:0 -ntp.c: Writing timestamp... -main.c: Data is: 39209,29056,6/6/2014T21:39:0 -ntp.c: Writing timestamp... -main.c: Data is: 6537,10528,6/6/2014T21:39:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786560,6/6/2014T21:39:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786560,6/6/2014T21:39:0 -main.c: Memory freed - main.c: Putting data: 39209,29056,6/6/2014T21:39:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39209,29056,6/6/2014T21:39:0 -main.c: Memory freed - main.c: Putting data: 6537,10528,6/6/2014T21:39:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6537,10528,6/6/2014T21:39:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786560,6/6/2014T21:37:1 with length 23 -json.c: Preparing: 786560,6/6/2014T21:38:1 with length 23 -json.c: Preparing: 786560,6/6/2014T21:39:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786560","timestamp":"6/6/2014T21:37:1"},{"value":"786560","timestamp":"6/6/2014T21:38:1"},{"value":"786560","timestamp":"6/6/2014T21:39:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39208,29055,6/6/2014T21:37:1 with length 28 -json.c: Preparing: 39210,29054,6/6/2014T21:38:1 with length 28 -json.c: Preparing: 39209,29056,6/6/2014T21:39:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39208,29055","timestamp":"6/6/2014T21:37:1"},{"value":"39210,29054","timestamp":"6/6/2014T21:38:1"},{"value":"39209,29056","timestamp":"6/6/2014T21:39:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6537,10536,6/6/2014T21:37:1 with length 27 -json.c: Preparing: 6535,10516,6/6/2014T21:38:1 with length 27 -json.c: Preparing: 6537,10528,6/6/2014T21:39:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6537,10536","timestamp":"6/6/2014T21:37:1"},{"value":"6535,10516","timestamp":"6/6/2014T21:38:1"},{"value":"6537,10528","timestamp":"6/6/2014T21:39:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:39:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:39:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611072356 -main.c: Updating new time to 3611072356 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611072356 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 30232 B -buffer.c: Used memory: 4472 B -main.c: Time (absolute): 3611072356 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611072400 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0B -sensors.c: [LIGHT] CH0 = 7C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072401 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072401 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 721020,6/6/2014T21:40:1 -ntp.c: Writing timestamp... -main.c: Data is: 39216,29056,6/6/2014T21:40:1 -ntp.c: Writing timestamp... -main.c: Data is: 6537,10563,6/6/2014T21:40:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 721020,6/6/2014T21:40:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 721020,6/6/2014T21:40:1 -main.c: Memory freed - main.c: Putting data: 39216,29056,6/6/2014T21:40:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39216,29056,6/6/2014T21:40:1 -main.c: Memory freed - main.c: Putting data: 6537,10563,6/6/2014T21:40:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6537,10563,6/6/2014T21:40:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30080 B -buffer.c: Used memory: 4624 B -main.c: Time (absolute): 3611072401 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611072460 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 84 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072461 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072461 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786564,6/6/2014T21:41:1 -ntp.c: Writing timestamp... -main.c: Data is: 39215,29058,6/6/2014T21:41:1 -ntp.c: Writing timestamp... -main.c: Data is: 6538,10485,6/6/2014T21:41:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786564,6/6/2014T21:41:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786564,6/6/2014T21:41:1 -main.c: Memory freed - main.c: Putting data: 39215,29058,6/6/2014T21:41:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39215,29058,6/6/2014T21:41:1 -main.c: Memory freed - main.c: Putting data: 6538,10485,6/6/2014T21:41:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6538,10485,6/6/2014T21:41:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29944 B -buffer.c: Used memory: 4760 B -main.c: Time (absolute): 3611072461 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611072520 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 7E -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072521 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072521 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786558,6/6/2014T21:42:1 -ntp.c: Writing timestamp... -main.c: Data is: 39216,29058,6/6/2014T21:42:1 -ntp.c: Writing timestamp... -main.c: Data is: 6535,10449,6/6/2014T21:42:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786558,6/6/2014T21:42:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786558,6/6/2014T21:42:1 -main.c: Memory freed - main.c: Putting data: 39216,29058,6/6/2014T21:42:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39216,29058,6/6/2014T21:42:1 -main.c: Memory freed - main.c: Putting data: 6535,10449,6/6/2014T21:42:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6535,10449,6/6/2014T21:42:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 721020,6/6/2014T21:40:1 with length 23 -json.c: Preparing: 786564,6/6/2014T21:41:1 with length 23 -json.c: Preparing: 786558,6/6/2014T21:42:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"721020","timestamp":"6/6/2014T21:40:1"},{"value":"786564","timestamp":"6/6/2014T21:41:1"},{"value":"786558","timestamp":"6/6/2014T21:42:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39216,29056,6/6/2014T21:40:1 with length 28 -json.c: Preparing: 39215,29058,6/6/2014T21:41:1 with length 28 -json.c: Preparing: 39216,29058,6/6/2014T21:42:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39216,29056","timestamp":"6/6/2014T21:40:1"},{"value":"39215,29058","timestamp":"6/6/2014T21:41:1"},{"value":"39216,29058","timestamp":"6/6/2014T21:42:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6537,10563,6/6/2014T21:40:1 with length 27 -json.c: Preparing: 6538,10485,6/6/2014T21:41:1 with length 27 -json.c: Preparing: 6535,10449,6/6/2014T21:42:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6537,10563","timestamp":"6/6/2014T21:40:1"},{"value":"6538,10485","timestamp":"6/6/2014T21:41:1"},{"value":"6535,10449","timestamp":"6/6/2014T21:42:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:42:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:42:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611072547 -main.c: Updating new time to 3611072547 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611072547 -Time LONG_PERIOD: 81 -Time SHORT_PERIOD: 27 -buffer.c: Checking available memory... -buffer.c: Available memory: 30152 B -buffer.c: Used memory: 4552 B -main.c: Time (absolute): 3611072547 -Time LONG_PERIOD: 81 -Time SHORT_PERIOD: 27 -timer-loop.c: Time to sleep! for 33 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611072580 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 84 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072581 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072581 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786564,6/6/2014T21:43:1 -ntp.c: Writing timestamp... -main.c: Data is: 39218,29059,6/6/2014T21:43:1 -ntp.c: Writing timestamp... -main.c: Data is: 6541,10426,6/6/2014T21:43:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786564,6/6/2014T21:43:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786564,6/6/2014T21:43:1 -main.c: Memory freed - main.c: Putting data: 39218,29059,6/6/2014T21:43:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39218,29059,6/6/2014T21:43:1 -main.c: Memory freed - main.c: Putting data: 6541,10426,6/6/2014T21:43:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6541,10426,6/6/2014T21:43:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 30000 B -buffer.c: Used memory: 4704 B -main.c: Time (absolute): 3611072581 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611072640 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 87 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072641 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072641 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786567,6/6/2014T21:44:1 -ntp.c: Writing timestamp... -main.c: Data is: 39224,29058,6/6/2014T21:44:1 -ntp.c: Writing timestamp... -main.c: Data is: 6539,10528,6/6/2014T21:44:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786567,6/6/2014T21:44:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786567,6/6/2014T21:44:1 -main.c: Memory freed - main.c: Putting data: 39224,29058,6/6/2014T21:44:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39224,29058,6/6/2014T21:44:1 -main.c: Memory freed - main.c: Putting data: 6539,10528,6/6/2014T21:44:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6539,10528,6/6/2014T21:44:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29872 B -buffer.c: Used memory: 4832 B -main.c: Time (absolute): 3611072641 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611072700 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0B -sensors.c: [LIGHT] CH0 = 73 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072701 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072701 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 721011,6/6/2014T21:45:1 -ntp.c: Writing timestamp... -main.c: Data is: 39224,29059,6/6/2014T21:45:1 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10559,6/6/2014T21:45:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 721011,6/6/2014T21:45:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 721011,6/6/2014T21:45:1 -main.c: Memory freed - main.c: Putting data: 39224,29059,6/6/2014T21:45:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39224,29059,6/6/2014T21:45:1 -main.c: Memory freed - main.c: Putting data: 6534,10559,6/6/2014T21:45:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10559,6/6/2014T21:45:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786564,6/6/2014T21:43:1 with length 23 -json.c: Preparing: 786567,6/6/2014T21:44:1 with length 23 -json.c: Preparing: 721011,6/6/2014T21:45:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786564","timestamp":"6/6/2014T21:43:1"},{"value":"786567","timestamp":"6/6/2014T21:44:1"},{"value":"721011","timestamp":"6/6/2014T21:45:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39218,29059,6/6/2014T21:43:1 with length 28 -json.c: Preparing: 39224,29058,6/6/2014T21:44:1 with length 28 -json.c: Preparing: 39224,29059,6/6/2014T21:45:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39218,29059","timestamp":"6/6/2014T21:43:1"},{"value":"39224,29058","timestamp":"6/6/2014T21:44:1"},{"value":"39224,29059","timestamp":"6/6/2014T21:45:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6541,10426,6/6/2014T21:43:1 with length 27 -json.c: Preparing: 6539,10528,6/6/2014T21:44:1 with length 27 -json.c: Preparing: 6534,10559,6/6/2014T21:45:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6541,10426","timestamp":"6/6/2014T21:43:1"},{"value":"6539,10528","timestamp":"6/6/2014T21:44:1"},{"value":"6534,10559","timestamp":"6/6/2014T21:45:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:45:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:45:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611072716 -main.c: Updating new time to 3611072716 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611072716 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 30080 B -buffer.c: Used memory: 4624 B -main.c: Time (absolute): 3611072716 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611072760 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 86 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072761 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072761 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852102,6/6/2014T21:46:1 -ntp.c: Writing timestamp... -main.c: Data is: 39223,29060,6/6/2014T21:46:1 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10532,6/6/2014T21:46:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852102,6/6/2014T21:46:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852102,6/6/2014T21:46:1 -main.c: Memory freed - main.c: Putting data: 39223,29060,6/6/2014T21:46:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39223,29060,6/6/2014T21:46:1 -main.c: Memory freed - main.c: Putting data: 6534,10532,6/6/2014T21:46:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10532,6/6/2014T21:46:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29912 B -buffer.c: Used memory: 4792 B -main.c: Time (absolute): 3611072761 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611072820 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 85 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072821 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072821 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786565,6/6/2014T21:47:1 -ntp.c: Writing timestamp... -main.c: Data is: 39223,29058,6/6/2014T21:47:1 -ntp.c: Writing timestamp... -main.c: Data is: 6534,10469,6/6/2014T21:47:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786565,6/6/2014T21:47:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786565,6/6/2014T21:47:1 -main.c: Memory freed - main.c: Putting data: 39223,29058,6/6/2014T21:47:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39223,29058,6/6/2014T21:47:1 -main.c: Memory freed - main.c: Putting data: 6534,10469,6/6/2014T21:47:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6534,10469,6/6/2014T21:47:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29792 B -buffer.c: Used memory: 4912 B -main.c: Time (absolute): 3611072821 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611072880 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072881 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072881 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852108,6/6/2014T21:48:1 -ntp.c: Writing timestamp... -main.c: Data is: 39227,29059,6/6/2014T21:48:1 -ntp.c: Writing timestamp... -main.c: Data is: 6527,10551,6/6/2014T21:48:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852108,6/6/2014T21:48:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852108,6/6/2014T21:48:1 -main.c: Memory freed - main.c: Putting data: 39227,29059,6/6/2014T21:48:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39227,29059,6/6/2014T21:48:1 -main.c: Memory freed - main.c: Putting data: 6527,10551,6/6/2014T21:48:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6527,10551,6/6/2014T21:48:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852102,6/6/2014T21:46:1 with length 23 -json.c: Preparing: 786565,6/6/2014T21:47:1 with length 23 -json.c: Preparing: 852108,6/6/2014T21:48:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"852102","timestamp":"6/6/2014T21:46:1"},{"value":"786565","timestamp":"6/6/2014T21:47:1"},{"value":"852108","timestamp":"6/6/2014T21:48:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39223,29060,6/6/2014T21:46:1 with length 28 -json.c: Preparing: 39223,29058,6/6/2014T21:47:1 with length 28 -json.c: Preparing: 39227,29059,6/6/2014T21:48:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39223,29060","timestamp":"6/6/2014T21:46:1"},{"value":"39223,29058","timestamp":"6/6/2014T21:47:1"},{"value":"39227,29059","timestamp":"6/6/2014T21:48:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6534,10532,6/6/2014T21:46:1 with length 27 -json.c: Preparing: 6534,10469,6/6/2014T21:47:1 with length 27 -json.c: Preparing: 6527,10551,6/6/2014T21:48:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6534,10532","timestamp":"6/6/2014T21:46:1"},{"value":"6534,10469","timestamp":"6/6/2014T21:47:1"},{"value":"6527,10551","timestamp":"6/6/2014T21:48:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:48:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:48:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611072895 -main.c: Updating new time to 3611072895 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611072895 -Time LONG_PERIOD: 45 -Time SHORT_PERIOD: 15 -buffer.c: Checking available memory... -buffer.c: Available memory: 30000 B -buffer.c: Used memory: 4704 B -main.c: Time (absolute): 3611072895 -Time LONG_PERIOD: 45 -Time SHORT_PERIOD: 15 -timer-loop.c: Time to sleep! for 45 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611072940 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611072941 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611072941 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852108,6/6/2014T21:49:1 -ntp.c: Writing timestamp... -main.c: Data is: 39229,29056,6/6/2014T21:49:1 -ntp.c: Writing timestamp... -main.c: Data is: 6535,10426,6/6/2014T21:49:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852108,6/6/2014T21:49:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852108,6/6/2014T21:49:1 -main.c: Memory freed - main.c: Putting data: 39229,29056,6/6/2014T21:49:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39229,29056,6/6/2014T21:49:1 -main.c: Memory freed - main.c: Putting data: 6535,10426,6/6/2014T21:49:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6535,10426,6/6/2014T21:49:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29840 B -buffer.c: Used memory: 4864 B -main.c: Time (absolute): 3611072941 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611073000 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073001 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611073001 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852109,6/6/2014T21:50:1 -ntp.c: Writing timestamp... -main.c: Data is: 39228,29054,6/6/2014T21:50:1 -ntp.c: Writing timestamp... -main.c: Data is: 6537,10437,6/6/2014T21:50:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852109,6/6/2014T21:50:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852109,6/6/2014T21:50:1 -main.c: Memory freed - main.c: Putting data: 39228,29054,6/6/2014T21:50:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39228,29054,6/6/2014T21:50:1 -main.c: Memory freed - main.c: Putting data: 6537,10437,6/6/2014T21:50:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6537,10437,6/6/2014T21:50:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29728 B -buffer.c: Used memory: 4976 B -main.c: Time (absolute): 3611073001 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611073060 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073061 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611073061 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852109,6/6/2014T21:51:1 -ntp.c: Writing timestamp... -main.c: Data is: 39225,29052,6/6/2014T21:51:1 -ntp.c: Writing timestamp... -main.c: Data is: 6528,10414,6/6/2014T21:51:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852109,6/6/2014T21:51:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852109,6/6/2014T21:51:1 -main.c: Memory freed - main.c: Putting data: 39225,29052,6/6/2014T21:51:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39225,29052,6/6/2014T21:51:1 -main.c: Memory freed - main.c: Putting data: 6528,10414,6/6/2014T21:51:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6528,10414,6/6/2014T21:51:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852108,6/6/2014T21:49:1 with length 23 -json.c: Preparing: 852109,6/6/2014T21:50:1 with length 23 -json.c: Preparing: 852109,6/6/2014T21:51:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"852108","timestamp":"6/6/2014T21:49:1"},{"value":"852109","timestamp":"6/6/2014T21:50:1"},{"value":"852109","timestamp":"6/6/2014T21:51:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39229,29056,6/6/2014T21:49:1 with length 28 -json.c: Preparing: 39228,29054,6/6/2014T21:50:1 with length 28 -json.c: Preparing: 39225,29052,6/6/2014T21:51:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39229,29056","timestamp":"6/6/2014T21:49:1"},{"value":"39228,29054","timestamp":"6/6/2014T21:50:1"},{"value":"39225,29052","timestamp":"6/6/2014T21:51:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6535,10426,6/6/2014T21:49:1 with length 27 -json.c: Preparing: 6537,10437,6/6/2014T21:50:1 with length 27 -json.c: Preparing: 6528,10414,6/6/2014T21:51:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6535,10426","timestamp":"6/6/2014T21:49:1"},{"value":"6537,10437","timestamp":"6/6/2014T21:50:1"},{"value":"6528,10414","timestamp":"6/6/2014T21:51:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:51:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:51:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611073076 -main.c: Updating new time to 3611073076 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611073076 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 29928 B -buffer.c: Used memory: 4776 B -main.c: Time (absolute): 3611073076 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611073120 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073121 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611073121 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852109,6/6/2014T21:52:1 -ntp.c: Writing timestamp... -main.c: Data is: 39228,29048,6/6/2014T21:52:1 -ntp.c: Writing timestamp... -main.c: Data is: 6528,10496,6/6/2014T21:52:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852109,6/6/2014T21:52:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852109,6/6/2014T21:52:1 -main.c: Memory freed - main.c: Putting data: 39228,29048,6/6/2014T21:52:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39228,29048,6/6/2014T21:52:1 -main.c: Memory freed - main.c: Putting data: 6528,10496,6/6/2014T21:52:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6528,10496,6/6/2014T21:52:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29768 B -buffer.c: Used memory: 4936 B -main.c: Time (absolute): 3611073121 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611073180 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073180 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611073180 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852109,6/6/2014T21:53:0 -ntp.c: Writing timestamp... -main.c: Data is: 39223,29045,6/6/2014T21:53:0 -ntp.c: Writing timestamp... -main.c: Data is: 6526,10524,6/6/2014T21:53:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852109,6/6/2014T21:53:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852109,6/6/2014T21:53:0 -main.c: Memory freed - main.c: Putting data: 39223,29045,6/6/2014T21:53:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39223,29045,6/6/2014T21:53:0 -main.c: Memory freed - main.c: Putting data: 6526,10524,6/6/2014T21:53:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6526,10524,6/6/2014T21:53:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29640 B -buffer.c: Used memory: 5064 B -main.c: Time (absolute): 3611073181 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611073240 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073240 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611073240 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852109,6/6/2014T21:54:0 -ntp.c: Writing timestamp... -main.c: Data is: 39232,29044,6/6/2014T21:54:0 -ntp.c: Writing timestamp... -main.c: Data is: 6521,10508,6/6/2014T21:54:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852109,6/6/2014T21:54:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852109,6/6/2014T21:54:0 -main.c: Memory freed - main.c: Putting data: 39232,29044,6/6/2014T21:54:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39232,29044,6/6/2014T21:54:0 -main.c: Memory freed - main.c: Putting data: 6521,10508,6/6/2014T21:54:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6521,10508,6/6/2014T21:54:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852109,6/6/2014T21:52:1 with length 23 -json.c: Preparing: 852109,6/6/2014T21:53:0 with length 23 -json.c: Preparing: 852109,6/6/2014T21:54:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"852109","timestamp":"6/6/2014T21:52:1"},{"value":"852109","timestamp":"6/6/2014T21:53:0"},{"value":"852109","timestamp":"6/6/2014T21:54:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39228,29048,6/6/2014T21:52:1 with length 28 -json.c: Preparing: 39223,29045,6/6/2014T21:53:0 with length 28 -json.c: Preparing: 39232,29044,6/6/2014T21:54:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39228,29048","timestamp":"6/6/2014T21:52:1"},{"value":"39223,29045","timestamp":"6/6/2014T21:53:0"},{"value":"39232,29044","timestamp":"6/6/2014T21:54:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6528,10496,6/6/2014T21:52:1 with length 27 -json.c: Preparing: 6526,10524,6/6/2014T21:53:0 with length 27 -json.c: Preparing: 6521,10508,6/6/2014T21:54:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6528,10496","timestamp":"6/6/2014T21:52:1"},{"value":"6526,10524","timestamp":"6/6/2014T21:53:0"},{"value":"6521,10508","timestamp":"6/6/2014T21:54:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:54:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:54:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611073256 -main.c: Updating new time to 3611073256 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611073256 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 29848 B -buffer.c: Used memory: 4856 B -main.c: Time (absolute): 3611073256 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611073300 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073300 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611073300 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852109,6/6/2014T21:55:0 -ntp.c: Writing timestamp... -main.c: Data is: 39230,29042,6/6/2014T21:55:0 -ntp.c: Writing timestamp... -main.c: Data is: 6516,10520,6/6/2014T21:55:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852109,6/6/2014T21:55:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852109,6/6/2014T21:55:0 -main.c: Memory freed - main.c: Putting data: 39230,29042,6/6/2014T21:55:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39230,29042,6/6/2014T21:55:0 -main.c: Memory freed - main.c: Putting data: 6516,10520,6/6/2014T21:55:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6516,10520,6/6/2014T21:55:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29688 B -buffer.c: Used memory: 5016 B -main.c: Time (absolute): 3611073300 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611073360 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073361 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611073361 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852108,6/6/2014T21:56:1 -ntp.c: Writing timestamp... -main.c: Data is: 39229,29038,6/6/2014T21:56:1 -ntp.c: Writing timestamp... -main.c: Data is: 6514,10551,6/6/2014T21:56:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852108,6/6/2014T21:56:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852108,6/6/2014T21:56:1 -main.c: Memory freed - main.c: Putting data: 39229,29038,6/6/2014T21:56:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39229,29038,6/6/2014T21:56:1 -main.c: Memory freed - main.c: Putting data: 6514,10551,6/6/2014T21:56:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6514,10551,6/6/2014T21:56:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29560 B -buffer.c: Used memory: 5144 B -main.c: Time (absolute): 3611073361 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611073420 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073421 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611073421 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852109,6/6/2014T21:57:1 -ntp.c: Writing timestamp... -main.c: Data is: 39227,29038,6/6/2014T21:57:1 -ntp.c: Writing timestamp... -main.c: Data is: 6513,10485,6/6/2014T21:57:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852109,6/6/2014T21:57:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852109,6/6/2014T21:57:1 -main.c: Memory freed - main.c: Putting data: 39227,29038,6/6/2014T21:57:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39227,29038,6/6/2014T21:57:1 -main.c: Memory freed - main.c: Putting data: 6513,10485,6/6/2014T21:57:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6513,10485,6/6/2014T21:57:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852109,6/6/2014T21:55:0 with length 23 -json.c: Preparing: 852108,6/6/2014T21:56:1 with length 23 -json.c: Preparing: 852109,6/6/2014T21:57:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"852109","timestamp":"6/6/2014T21:55:0"},{"value":"852108","timestamp":"6/6/2014T21:56:1"},{"value":"852109","timestamp":"6/6/2014T21:57:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39230,29042,6/6/2014T21:55:0 with length 28 -json.c: Preparing: 39229,29038,6/6/2014T21:56:1 with length 28 -json.c: Preparing: 39227,29038,6/6/2014T21:57:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39230,29042","timestamp":"6/6/2014T21:55:0"},{"value":"39229,29038","timestamp":"6/6/2014T21:56:1"},{"value":"39227,29038","timestamp":"6/6/2014T21:57:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6516,10520,6/6/2014T21:55:0 with length 27 -json.c: Preparing: 6514,10551,6/6/2014T21:56:1 with length 27 -json.c: Preparing: 6513,10485,6/6/2014T21:57:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6516,10520","timestamp":"6/6/2014T21:55:0"},{"value":"6514,10551","timestamp":"6/6/2014T21:56:1"},{"value":"6513,10485","timestamp":"6/6/2014T21:57:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T21:57:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T21:57:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611073437 -main.c: Updating new time to 3611073437 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611073437 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 29768 B -buffer.c: Used memory: 4936 B -main.c: Time (absolute): 3611073437 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611073480 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073481 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611073481 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852108,6/6/2014T21:58:1 -ntp.c: Writing timestamp... -main.c: Data is: 39238,29033,6/6/2014T21:58:1 -ntp.c: Writing timestamp... -main.c: Data is: 6514,10477,6/6/2014T21:58:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852108,6/6/2014T21:58:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852108,6/6/2014T21:58:1 -main.c: Memory freed - main.c: Putting data: 39238,29033,6/6/2014T21:58:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39238,29033,6/6/2014T21:58:1 -main.c: Memory freed - main.c: Putting data: 6514,10477,6/6/2014T21:58:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6514,10477,6/6/2014T21:58:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29616 B -buffer.c: Used memory: 5088 B -main.c: Time (absolute): 3611073481 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611073540 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073541 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611073541 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852108,6/6/2014T21:59:1 -ntp.c: Writing timestamp... -main.c: Data is: 39232,29032,6/6/2014T21:59:1 -ntp.c: Writing timestamp... -main.c: Data is: 6513,10449,6/6/2014T21:59:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852108,6/6/2014T21:59:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852108,6/6/2014T21:59:1 -main.c: Memory freed - main.c: Putting data: 39232,29032,6/6/2014T21:59:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39232,29032,6/6/2014T21:59:1 -main.c: Memory freed - main.c: Putting data: 6513,10449,6/6/2014T21:59:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6513,10449,6/6/2014T21:59:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29488 B -buffer.c: Used memory: 5216 B -main.c: Time (absolute): 3611073541 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611073600 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 85 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073601 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611073601 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852101,6/6/2014T22:0:1 -ntp.c: Writing timestamp... -main.c: Data is: 39234,29031,6/6/2014T22:0:1 -ntp.c: Writing timestamp... -main.c: Data is: 6514,10492,6/6/2014T22:0:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852101,6/6/2014T22:0:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852101,6/6/2014T22:0:1 -main.c: Memory freed - main.c: Putting data: 39234,29031,6/6/2014T22:0:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39234,29031,6/6/2014T22:0:1 -main.c: Memory freed - main.c: Putting data: 6514,10492,6/6/2014T22:0:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6514,10492,6/6/2014T22:0:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852108,6/6/2014T21:58:1 with length 23 -json.c: Preparing: 852108,6/6/2014T21:59:1 with length 23 -json.c: Preparing: 852101,6/6/2014T22:0:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 167 - -{"observations":[{"value":"852108","timestamp":"6/6/2014T21:58:1"},{"value":"852108","timestamp":"6/6/2014T21:59:1"},{"value":"852101","timestamp":"6/6/2014T22:0:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39238,29033,6/6/2014T21:58:1 with length 28 -json.c: Preparing: 39232,29032,6/6/2014T21:59:1 with length 28 -json.c: Preparing: 39234,29031,6/6/2014T22:0:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 182 - -{"observations":[{"value":"39238,29033","timestamp":"6/6/2014T21:58:1"},{"value":"39232,29032","timestamp":"6/6/2014T21:59:1"},{"value":"39234,29031","timestamp":"6/6/2014T22:0:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6514,10477,6/6/2014T21:58:1 with length 27 -json.c: Preparing: 6513,10449,6/6/2014T21:59:1 with length 27 -json.c: Preparing: 6514,10492,6/6/2014T22:0:1 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 179 - -{"observations":[{"value":"6514,10477","timestamp":"6/6/2014T21:58:1"},{"value":"6513,10449","timestamp":"6/6/2014T21:59:1"},{"value":"6514,10492","timestamp":"6/6/2014T22:0:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:0:1 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:0:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611073616 -main.c: Updating new time to 3611073616 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611073616 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 29688 B -buffer.c: Used memory: 5016 B -main.c: Time (absolute): 3611073616 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611073660 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073660 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611073660 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852104,6/6/2014T22:1:0 -ntp.c: Writing timestamp... -main.c: Data is: 39240,29032,6/6/2014T22:1:0 -ntp.c: Writing timestamp... -main.c: Data is: 6516,10422,6/6/2014T22:1:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852104,6/6/2014T22:1:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852104,6/6/2014T22:1:0 -main.c: Memory freed - main.c: Putting data: 39240,29032,6/6/2014T22:1:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39240,29032,6/6/2014T22:1:0 -main.c: Memory freed - main.c: Putting data: 6516,10422,6/6/2014T22:1:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6516,10422,6/6/2014T22:1:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29528 B -buffer.c: Used memory: 5176 B -main.c: Time (absolute): 3611073661 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611073720 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073720 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611073720 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852104,6/6/2014T22:2:0 -ntp.c: Writing timestamp... -main.c: Data is: 39240,29031,6/6/2014T22:2:0 -ntp.c: Writing timestamp... -main.c: Data is: 6516,10453,6/6/2014T22:2:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852104,6/6/2014T22:2:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852104,6/6/2014T22:2:0 -main.c: Memory freed - main.c: Putting data: 39240,29031,6/6/2014T22:2:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39240,29031,6/6/2014T22:2:0 -main.c: Memory freed - main.c: Putting data: 6516,10453,6/6/2014T22:2:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6516,10453,6/6/2014T22:2:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29400 B -buffer.c: Used memory: 5304 B -main.c: Time (absolute): 3611073720 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611073780 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073781 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611073781 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T22:3:1 -ntp.c: Writing timestamp... -main.c: Data is: 39234,29030,6/6/2014T22:3:1 -ntp.c: Writing timestamp... -main.c: Data is: 6512,10390,6/6/2014T22:3:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T22:3:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T22:3:1 -main.c: Memory freed - main.c: Putting data: 39234,29030,6/6/2014T22:3:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39234,29030,6/6/2014T22:3:1 -main.c: Memory freed - main.c: Putting data: 6512,10390,6/6/2014T22:3:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6512,10390,6/6/2014T22:3:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852104,6/6/2014T22:1:0 with length 22 -json.c: Preparing: 852104,6/6/2014T22:2:0 with length 22 -json.c: Preparing: 852105,6/6/2014T22:3:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 165 - -{"observations":[{"value":"852104","timestamp":"6/6/2014T22:1:0"},{"value":"852104","timestamp":"6/6/2014T22:2:0"},{"value":"852105","timestamp":"6/6/2014T22:3:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39240,29032,6/6/2014T22:1:0 with length 27 -json.c: Preparing: 39240,29031,6/6/2014T22:2:0 with length 27 -json.c: Preparing: 39234,29030,6/6/2014T22:3:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"39240,29032","timestamp":"6/6/2014T22:1:0"},{"value":"39240,29031","timestamp":"6/6/2014T22:2:0"},{"value":"39234,29030","timestamp":"6/6/2014T22:3:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6516,10422,6/6/2014T22:1:0 with length 26 -json.c: Preparing: 6516,10453,6/6/2014T22:2:0 with length 26 -json.c: Preparing: 6512,10390,6/6/2014T22:3:1 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 177 - -{"observations":[{"value":"6516,10422","timestamp":"6/6/2014T22:1:0"},{"value":"6516,10453","timestamp":"6/6/2014T22:2:0"},{"value":"6512,10390","timestamp":"6/6/2014T22:3:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:3:1 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:3:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611073797 -main.c: Updating new time to 3611073797 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611073797 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 29608 B -buffer.c: Used memory: 5096 B -main.c: Time (absolute): 3611073797 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611073840 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073841 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611073841 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T22:4:1 -ntp.c: Writing timestamp... -main.c: Data is: 39238,29030,6/6/2014T22:4:1 -ntp.c: Writing timestamp... -main.c: Data is: 6516,10402,6/6/2014T22:4:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T22:4:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T22:4:1 -main.c: Memory freed - main.c: Putting data: 39238,29030,6/6/2014T22:4:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39238,29030,6/6/2014T22:4:1 -main.c: Memory freed - main.c: Putting data: 6516,10402,6/6/2014T22:4:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6516,10402,6/6/2014T22:4:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29456 B -buffer.c: Used memory: 5248 B -main.c: Time (absolute): 3611073841 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611073900 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073901 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611073901 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T22:5:1 -ntp.c: Writing timestamp... -main.c: Data is: 39232,29033,6/6/2014T22:5:1 -ntp.c: Writing timestamp... -main.c: Data is: 6516,10394,6/6/2014T22:5:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T22:5:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T22:5:1 -main.c: Memory freed - main.c: Putting data: 39232,29033,6/6/2014T22:5:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39232,29033,6/6/2014T22:5:1 -main.c: Memory freed - main.c: Putting data: 6516,10394,6/6/2014T22:5:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6516,10394,6/6/2014T22:5:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29328 B -buffer.c: Used memory: 5376 B -main.c: Time (absolute): 3611073901 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611073960 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611073961 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611073961 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T22:6:1 -ntp.c: Writing timestamp... -main.c: Data is: 39238,29035,6/6/2014T22:6:1 -ntp.c: Writing timestamp... -main.c: Data is: 6514,10433,6/6/2014T22:6:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T22:6:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T22:6:1 -main.c: Memory freed - main.c: Putting data: 39238,29035,6/6/2014T22:6:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39238,29035,6/6/2014T22:6:1 -main.c: Memory freed - main.c: Putting data: 6514,10433,6/6/2014T22:6:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6514,10433,6/6/2014T22:6:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852105,6/6/2014T22:4:1 with length 22 -json.c: Preparing: 852105,6/6/2014T22:5:1 with length 22 -json.c: Preparing: 852105,6/6/2014T22:6:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 165 - -{"observations":[{"value":"852105","timestamp":"6/6/2014T22:4:1"},{"value":"852105","timestamp":"6/6/2014T22:5:1"},{"value":"852105","timestamp":"6/6/2014T22:6:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39238,29030,6/6/2014T22:4:1 with length 27 -json.c: Preparing: 39232,29033,6/6/2014T22:5:1 with length 27 -json.c: Preparing: 39238,29035,6/6/2014T22:6:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"39238,29030","timestamp":"6/6/2014T22:4:1"},{"value":"39232,29033","timestamp":"6/6/2014T22:5:1"},{"value":"39238,29035","timestamp":"6/6/2014T22:6:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6516,10402,6/6/2014T22:4:1 with length 26 -json.c: Preparing: 6516,10394,6/6/2014T22:5:1 with length 26 -json.c: Preparing: 6514,10433,6/6/2014T22:6:1 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 177 - -{"observations":[{"value":"6516,10402","timestamp":"6/6/2014T22:4:1"},{"value":"6516,10394","timestamp":"6/6/2014T22:5:1"},{"value":"6514,10433","timestamp":"6/6/2014T22:6:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:6:1 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:6:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611073976 -main.c: Updating new time to 3611073976 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611073976 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 29528 B -buffer.c: Used memory: 5176 B -main.c: Time (absolute): 3611073976 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611074020 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074021 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611074021 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T22:7:1 -ntp.c: Writing timestamp... -main.c: Data is: 39233,29034,6/6/2014T22:7:1 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10426,6/6/2014T22:7:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T22:7:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T22:7:1 -main.c: Memory freed - main.c: Putting data: 39233,29034,6/6/2014T22:7:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39233,29034,6/6/2014T22:7:1 -main.c: Memory freed - main.c: Putting data: 6517,10426,6/6/2014T22:7:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10426,6/6/2014T22:7:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29376 B -buffer.c: Used memory: 5328 B -main.c: Time (absolute): 3611074021 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611074080 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074081 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611074081 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T22:8:1 -ntp.c: Writing timestamp... -main.c: Data is: 39231,29031,6/6/2014T22:8:1 -ntp.c: Writing timestamp... -main.c: Data is: 6520,10418,6/6/2014T22:8:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T22:8:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T22:8:1 -main.c: Memory freed - main.c: Putting data: 39231,29031,6/6/2014T22:8:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39231,29031,6/6/2014T22:8:1 -main.c: Memory freed - main.c: Putting data: 6520,10418,6/6/2014T22:8:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6520,10418,6/6/2014T22:8:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29232 B -buffer.c: Used memory: 5472 B -main.c: Time (absolute): 3611074081 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611074140 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 81 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074140 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611074140 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786561,6/6/2014T22:9:0 -ntp.c: Writing timestamp... -main.c: Data is: 39237,29034,6/6/2014T22:9:0 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10457,6/6/2014T22:9:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786561,6/6/2014T22:9:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786561,6/6/2014T22:9:0 -main.c: Memory freed - main.c: Putting data: 39237,29034,6/6/2014T22:9:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39237,29034,6/6/2014T22:9:0 -main.c: Memory freed - main.c: Putting data: 6517,10457,6/6/2014T22:9:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10457,6/6/2014T22:9:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852105,6/6/2014T22:7:1 with length 22 -json.c: Preparing: 852105,6/6/2014T22:8:1 with length 22 -json.c: Preparing: 786561,6/6/2014T22:9:0 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 165 - -{"observations":[{"value":"852105","timestamp":"6/6/2014T22:7:1"},{"value":"852105","timestamp":"6/6/2014T22:8:1"},{"value":"786561","timestamp":"6/6/2014T22:9:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39233,29034,6/6/2014T22:7:1 with length 27 -json.c: Preparing: 39231,29031,6/6/2014T22:8:1 with length 27 -json.c: Preparing: 39237,29034,6/6/2014T22:9:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"39233,29034","timestamp":"6/6/2014T22:7:1"},{"value":"39231,29031","timestamp":"6/6/2014T22:8:1"},{"value":"39237,29034","timestamp":"6/6/2014T22:9:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6517,10426,6/6/2014T22:7:1 with length 26 -json.c: Preparing: 6520,10418,6/6/2014T22:8:1 with length 26 -json.c: Preparing: 6517,10457,6/6/2014T22:9:0 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 177 - -{"observations":[{"value":"6517,10426","timestamp":"6/6/2014T22:7:1"},{"value":"6520,10418","timestamp":"6/6/2014T22:8:1"},{"value":"6517,10457","timestamp":"6/6/2014T22:9:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:9:0 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:9:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611074156 -main.c: Updating new time to 3611074156 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611074156 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 29440 B -buffer.c: Used memory: 5264 B -main.c: Time (absolute): 3611074156 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611074200 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 81 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074201 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611074201 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786561,6/6/2014T22:10:1 -ntp.c: Writing timestamp... -main.c: Data is: 39233,29034,6/6/2014T22:10:1 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10449,6/6/2014T22:10:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786561,6/6/2014T22:10:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786561,6/6/2014T22:10:1 -main.c: Memory freed - main.c: Putting data: 39233,29034,6/6/2014T22:10:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39233,29034,6/6/2014T22:10:1 -main.c: Memory freed - main.c: Putting data: 6517,10449,6/6/2014T22:10:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10449,6/6/2014T22:10:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29288 B -buffer.c: Used memory: 5416 B -main.c: Time (absolute): 3611074201 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611074260 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 80 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074260 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611074260 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786560,6/6/2014T22:11:0 -ntp.c: Writing timestamp... -main.c: Data is: 39229,29035,6/6/2014T22:11:0 -ntp.c: Writing timestamp... -main.c: Data is: 6520,10414,6/6/2014T22:11:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786560,6/6/2014T22:11:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786560,6/6/2014T22:11:0 -main.c: Memory freed - main.c: Putting data: 39229,29035,6/6/2014T22:11:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39229,29035,6/6/2014T22:11:0 -main.c: Memory freed - main.c: Putting data: 6520,10414,6/6/2014T22:11:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6520,10414,6/6/2014T22:11:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29144 B -buffer.c: Used memory: 5560 B -main.c: Time (absolute): 3611074261 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611074320 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 81 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074320 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611074320 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786561,6/6/2014T22:12:0 -ntp.c: Writing timestamp... -main.c: Data is: 39234,29034,6/6/2014T22:12:0 -ntp.c: Writing timestamp... -main.c: Data is: 6520,10390,6/6/2014T22:12:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786561,6/6/2014T22:12:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786561,6/6/2014T22:12:0 -main.c: Memory freed - main.c: Putting data: 39234,29034,6/6/2014T22:12:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39234,29034,6/6/2014T22:12:0 -main.c: Memory freed - main.c: Putting data: 6520,10390,6/6/2014T22:12:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6520,10390,6/6/2014T22:12:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786561,6/6/2014T22:10:1 with length 23 -json.c: Preparing: 786560,6/6/2014T22:11:0 with length 23 -json.c: Preparing: 786561,6/6/2014T22:12:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786561","timestamp":"6/6/2014T22:10:1"},{"value":"786560","timestamp":"6/6/2014T22:11:0"},{"value":"786561","timestamp":"6/6/2014T22:12:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39233,29034,6/6/2014T22:10:1 with length 28 -json.c: Preparing: 39229,29035,6/6/2014T22:11:0 with length 28 -json.c: Preparing: 39234,29034,6/6/2014T22:12:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39233,29034","timestamp":"6/6/2014T22:10:1"},{"value":"39229,29035","timestamp":"6/6/2014T22:11:0"},{"value":"39234,29034","timestamp":"6/6/2014T22:12:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6517,10449,6/6/2014T22:10:1 with length 27 -json.c: Preparing: 6520,10414,6/6/2014T22:11:0 with length 27 -json.c: Preparing: 6520,10390,6/6/2014T22:12:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6517,10449","timestamp":"6/6/2014T22:10:1"},{"value":"6520,10414","timestamp":"6/6/2014T22:11:0"},{"value":"6520,10390","timestamp":"6/6/2014T22:12:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:12:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:12:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: [ERROR] Netconn receive failed with -3 -main.c: [ERROR] NTP query FAILED -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611074320 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -buffer.c: Checking available memory... -buffer.c: Available memory: 29360 B -buffer.c: Used memory: 5344 B -main.c: Time (absolute): 3611074320 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611074380 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 81 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074381 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611074381 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786561,6/6/2014T22:13:1 -ntp.c: Writing timestamp... -main.c: Data is: 39232,29034,6/6/2014T22:13:1 -ntp.c: Writing timestamp... -main.c: Data is: 6520,10315,6/6/2014T22:13:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786561,6/6/2014T22:13:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786561,6/6/2014T22:13:1 -main.c: Memory freed - main.c: Putting data: 39232,29034,6/6/2014T22:13:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39232,29034,6/6/2014T22:13:1 -main.c: Memory freed - main.c: Putting data: 6520,10315,6/6/2014T22:13:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6520,10315,6/6/2014T22:13:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29216 B -buffer.c: Used memory: 5488 B -main.c: Time (absolute): 3611074381 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611074440 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 86 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074441 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611074441 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852102,6/6/2014T22:14:1 -ntp.c: Writing timestamp... -main.c: Data is: 39230,29034,6/6/2014T22:14:1 -ntp.c: Writing timestamp... -main.c: Data is: 6523,10371,6/6/2014T22:14:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852102,6/6/2014T22:14:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852102,6/6/2014T22:14:1 -main.c: Memory freed - main.c: Putting data: 39230,29034,6/6/2014T22:14:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39230,29034,6/6/2014T22:14:1 -main.c: Memory freed - main.c: Putting data: 6523,10371,6/6/2014T22:14:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6523,10371,6/6/2014T22:14:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29080 B -buffer.c: Used memory: 5624 B -main.c: Time (absolute): 3611074441 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611074500 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 85 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074501 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611074501 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786565,6/6/2014T22:15:1 -ntp.c: Writing timestamp... -main.c: Data is: 39237,29036,6/6/2014T22:15:1 -ntp.c: Writing timestamp... -main.c: Data is: 6520,10296,6/6/2014T22:15:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786565,6/6/2014T22:15:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786565,6/6/2014T22:15:1 -main.c: Memory freed - main.c: Putting data: 39237,29036,6/6/2014T22:15:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39237,29036,6/6/2014T22:15:1 -main.c: Memory freed - main.c: Putting data: 6520,10296,6/6/2014T22:15:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6520,10296,6/6/2014T22:15:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786561,6/6/2014T22:13:1 with length 23 -json.c: Preparing: 852102,6/6/2014T22:14:1 with length 23 -json.c: Preparing: 786565,6/6/2014T22:15:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786561","timestamp":"6/6/2014T22:13:1"},{"value":"852102","timestamp":"6/6/2014T22:14:1"},{"value":"786565","timestamp":"6/6/2014T22:15:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39232,29034,6/6/2014T22:13:1 with length 28 -json.c: Preparing: 39230,29034,6/6/2014T22:14:1 with length 28 -json.c: Preparing: 39237,29036,6/6/2014T22:15:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39232,29034","timestamp":"6/6/2014T22:13:1"},{"value":"39230,29034","timestamp":"6/6/2014T22:14:1"},{"value":"39237,29036","timestamp":"6/6/2014T22:15:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6520,10315,6/6/2014T22:13:1 with length 27 -json.c: Preparing: 6523,10371,6/6/2014T22:14:1 with length 27 -json.c: Preparing: 6520,10296,6/6/2014T22:15:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6520,10315","timestamp":"6/6/2014T22:13:1"},{"value":"6523,10371","timestamp":"6/6/2014T22:14:1"},{"value":"6520,10296","timestamp":"6/6/2014T22:15:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:15:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:15:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611074535 -main.c: Updating new time to 3611074535 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611074535 -Time LONG_PERIOD: 105 -Time SHORT_PERIOD: 35 -buffer.c: Checking available memory... -buffer.c: Available memory: 29280 B -buffer.c: Used memory: 5424 B -main.c: Time (absolute): 3611074535 -Time LONG_PERIOD: 105 -Time SHORT_PERIOD: 35 -timer-loop.c: Time to sleep! for 25 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611074560 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 85 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074561 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611074561 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786565,6/6/2014T22:16:1 -ntp.c: Writing timestamp... -main.c: Data is: 39238,29032,6/6/2014T22:16:1 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10308,6/6/2014T22:16:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786565,6/6/2014T22:16:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786565,6/6/2014T22:16:1 -main.c: Memory freed - main.c: Putting data: 39238,29032,6/6/2014T22:16:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39238,29032,6/6/2014T22:16:1 -main.c: Memory freed - main.c: Putting data: 6519,10308,6/6/2014T22:16:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10308,6/6/2014T22:16:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29136 B -buffer.c: Used memory: 5568 B -main.c: Time (absolute): 3611074561 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611074620 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074621 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611074621 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852104,6/6/2014T22:17:1 -ntp.c: Writing timestamp... -main.c: Data is: 39233,29036,6/6/2014T22:17:1 -ntp.c: Writing timestamp... -main.c: Data is: 6521,10312,6/6/2014T22:17:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852104,6/6/2014T22:17:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852104,6/6/2014T22:17:1 -main.c: Memory freed - main.c: Putting data: 39233,29036,6/6/2014T22:17:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39233,29036,6/6/2014T22:17:1 -main.c: Memory freed - main.c: Putting data: 6521,10312,6/6/2014T22:17:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6521,10312,6/6/2014T22:17:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29008 B -buffer.c: Used memory: 5696 B -main.c: Time (absolute): 3611074621 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611074680 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074681 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611074681 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852104,6/6/2014T22:18:1 -ntp.c: Writing timestamp... -main.c: Data is: 39237,29037,6/6/2014T22:18:1 -ntp.c: Writing timestamp... -main.c: Data is: 6524,10280,6/6/2014T22:18:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852104,6/6/2014T22:18:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852104,6/6/2014T22:18:1 -main.c: Memory freed - main.c: Putting data: 39237,29037,6/6/2014T22:18:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39237,29037,6/6/2014T22:18:1 -main.c: Memory freed - main.c: Putting data: 6524,10280,6/6/2014T22:18:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6524,10280,6/6/2014T22:18:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786565,6/6/2014T22:16:1 with length 23 -json.c: Preparing: 852104,6/6/2014T22:17:1 with length 23 -json.c: Preparing: 852104,6/6/2014T22:18:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786565","timestamp":"6/6/2014T22:16:1"},{"value":"852104","timestamp":"6/6/2014T22:17:1"},{"value":"852104","timestamp":"6/6/2014T22:18:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39238,29032,6/6/2014T22:16:1 with length 28 -json.c: Preparing: 39233,29036,6/6/2014T22:17:1 with length 28 -json.c: Preparing: 39237,29037,6/6/2014T22:18:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39238,29032","timestamp":"6/6/2014T22:16:1"},{"value":"39233,29036","timestamp":"6/6/2014T22:17:1"},{"value":"39237,29037","timestamp":"6/6/2014T22:18:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6519,10308,6/6/2014T22:16:1 with length 27 -json.c: Preparing: 6521,10312,6/6/2014T22:17:1 with length 27 -json.c: Preparing: 6524,10280,6/6/2014T22:18:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6519,10308","timestamp":"6/6/2014T22:16:1"},{"value":"6521,10312","timestamp":"6/6/2014T22:17:1"},{"value":"6524,10280","timestamp":"6/6/2014T22:18:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:18:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:18:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611074706 -main.c: Updating new time to 3611074706 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611074706 -Time LONG_PERIOD: 78 -Time SHORT_PERIOD: 26 -buffer.c: Checking available memory... -buffer.c: Available memory: 29208 B -buffer.c: Used memory: 5496 B -main.c: Time (absolute): 3611074707 -Time LONG_PERIOD: 81 -Time SHORT_PERIOD: 27 -timer-loop.c: Time to sleep! for 33 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611074740 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 83 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074740 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611074740 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786563,6/6/2014T22:19:0 -ntp.c: Writing timestamp... -main.c: Data is: 39229,29036,6/6/2014T22:19:0 -ntp.c: Writing timestamp... -main.c: Data is: 6523,10312,6/6/2014T22:19:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786563,6/6/2014T22:19:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786563,6/6/2014T22:19:0 -main.c: Memory freed - main.c: Putting data: 39229,29036,6/6/2014T22:19:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39229,29036,6/6/2014T22:19:0 -main.c: Memory freed - main.c: Putting data: 6523,10312,6/6/2014T22:19:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6523,10312,6/6/2014T22:19:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 29048 B -buffer.c: Used memory: 5656 B -main.c: Time (absolute): 3611074740 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611074800 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 81 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074801 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611074801 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786561,6/6/2014T22:20:1 -ntp.c: Writing timestamp... -main.c: Data is: 39236,29038,6/6/2014T22:20:1 -ntp.c: Writing timestamp... -main.c: Data is: 6520,10394,6/6/2014T22:20:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786561,6/6/2014T22:20:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786561,6/6/2014T22:20:1 -main.c: Memory freed - main.c: Putting data: 39236,29038,6/6/2014T22:20:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39236,29038,6/6/2014T22:20:1 -main.c: Memory freed - main.c: Putting data: 6520,10394,6/6/2014T22:20:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6520,10394,6/6/2014T22:20:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28928 B -buffer.c: Used memory: 5776 B -main.c: Time (absolute): 3611074801 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611074860 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8A -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074861 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611074861 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852106,6/6/2014T22:21:1 -ntp.c: Writing timestamp... -main.c: Data is: 39233,29032,6/6/2014T22:21:1 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10398,6/6/2014T22:21:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852106,6/6/2014T22:21:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852106,6/6/2014T22:21:1 -main.c: Memory freed - main.c: Putting data: 39233,29032,6/6/2014T22:21:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39233,29032,6/6/2014T22:21:1 -main.c: Memory freed - main.c: Putting data: 6519,10398,6/6/2014T22:21:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10398,6/6/2014T22:21:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786563,6/6/2014T22:19:0 with length 23 -json.c: Preparing: 786561,6/6/2014T22:20:1 with length 23 -json.c: Preparing: 852106,6/6/2014T22:21:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786563","timestamp":"6/6/2014T22:19:0"},{"value":"786561","timestamp":"6/6/2014T22:20:1"},{"value":"852106","timestamp":"6/6/2014T22:21:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39229,29036,6/6/2014T22:19:0 with length 28 -json.c: Preparing: 39236,29038,6/6/2014T22:20:1 with length 28 -json.c: Preparing: 39233,29032,6/6/2014T22:21:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39229,29036","timestamp":"6/6/2014T22:19:0"},{"value":"39236,29038","timestamp":"6/6/2014T22:20:1"},{"value":"39233,29032","timestamp":"6/6/2014T22:21:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6523,10312,6/6/2014T22:19:0 with length 27 -json.c: Preparing: 6520,10394,6/6/2014T22:20:1 with length 27 -json.c: Preparing: 6519,10398,6/6/2014T22:21:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6523,10312","timestamp":"6/6/2014T22:19:0"},{"value":"6520,10394","timestamp":"6/6/2014T22:20:1"},{"value":"6519,10398","timestamp":"6/6/2014T22:21:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:21:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:21:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611074875 -main.c: Updating new time to 3611074875 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611074875 -Time LONG_PERIOD: 45 -Time SHORT_PERIOD: 15 -buffer.c: Checking available memory... -buffer.c: Available memory: 29128 B -buffer.c: Used memory: 5576 B -main.c: Time (absolute): 3611074875 -Time LONG_PERIOD: 45 -Time SHORT_PERIOD: 15 -timer-loop.c: Time to sleep! for 45 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611074920 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074921 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611074921 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852108,6/6/2014T22:22:1 -ntp.c: Writing timestamp... -main.c: Data is: 39236,29034,6/6/2014T22:22:1 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10371,6/6/2014T22:22:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852108,6/6/2014T22:22:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852108,6/6/2014T22:22:1 -main.c: Memory freed - main.c: Putting data: 39236,29034,6/6/2014T22:22:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39236,29034,6/6/2014T22:22:1 -main.c:[1;00m Memory freed - main.c: Putting data: 6517,10371,6/6/2014T22:22:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10371,6/6/2014T22:22:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28976 B -buffer.c: Used memory: 5728 B -main.c: Time (absolute): 3611074921 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611074937 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074938 -Time LONG_PERIOD: 54 -Time SHORT_PERIOD: 18 -main.c: Timestamp (absolute): 3611074938 -Timestamp LONG_PERIOD: 54 -Timestamp SHORT_PERIOD: 18 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852108,6/6/2014T22:22:18 -ntp.c: Writing timestamp... -main.c: Data is: 39231,29034,6/6/2014T22:22:18 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10410,6/6/2014T22:22:18 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852108,6/6/2014T22:22:18 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852108,6/6/2014T22:22:18 -main.c: Memory freed - main.c: Putting data: 39231,29034,6/6/2014T22:22:18 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39231,29034,6/6/2014T22:22:18 -main.c: Memory freed - main.c: Putting data: 6517,10410,6/6/2014T22:22:18 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10410,6/6/2014T22:22:18 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28856 B -buffer.c: Used memory: 5848 B -main.c: Time (absolute): 3611074938 -Time LONG_PERIOD: 54 -Time SHORT_PERIOD: 18 -timer-loop.c: Time to sleep! for 42 seconds -main.c: Time (absolute): 3611074980 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611074981 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611074981 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852109,6/6/2014T22:23:1 -ntp.c: Writing timestamp... -main.c: Data is: 39232,29034,6/6/2014T22:23:1 -ntp.c: Writing timestamp... -main.c: Data is: 6516,10433,6/6/2014T22:23:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852109,6/6/2014T22:23:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852109,6/6/2014T22:23:1 -main.c: Memory freed - main.c: Putting data: 39232,29034,6/6/2014T22:23:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39232,29034,6/6/2014T22:23:1 -main.c: Memory freed - main.c: Putting data: 6516,10433,6/6/2014T22:23:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6516,10433,6/6/2014T22:23:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852108,6/6/2014T22:22:1 with length 23 -json.c: Preparing: 852108,6/6/2014T22:22:18 with length 24 -json.c: Preparing: 852109,6/6/2014T22:23:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 169 - -{"observations":[{"value":"852108","timestamp":"6/6/2014T22:22:1"},{"value":"852108","timestamp":"6/6/2014T22:22:18"},{"value":"852109","timestamp":"6/6/2014T22:23:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39236,29034,6/6/2014T22:22:1 with length 28 -json.c: Preparing: 39231,29034,6/6/2014T22:22:18 with length 29 -json.c: Preparing: 39232,29034,6/6/2014T22:23:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 184 - -{"observations":[{"value":"39236,29034","timestamp":"6/6/2014T22:22:1"},{"value":"39231,29034","timestamp":"6/6/2014T22:22:18"},{"value":"39232,29034","timestamp":"6/6/2014T22:23:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6517,10371,6/6/2014T22:22:1 with length 27 -json.c: Preparing: 6517,10410,6/6/2014T22:22:18 with length 28 -json.c: Preparing: 6516,10433,6/6/2014T22:23:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 181 - -{"observations":[{"value":"6517,10371","timestamp":"6/6/2014T22:22:1"},{"value":"6517,10410","timestamp":"6/6/2014T22:22:18"},{"value":"6516,10433","timestamp":"6/6/2014T22:23:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:23:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:23:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611075038 -main.c: Updating new time to 3611075038 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611075038 -Time LONG_PERIOD: 174 -Time SHORT_PERIOD: 58 -buffer.c: Checking available memory... -buffer.c: Available memory: 29056 B -buffer.c: Used memory: 5648 B -main.c: Time (absolute): 3611075038 -Time LONG_PERIOD: 174 -Time SHORT_PERIOD: 58 -timer-loop.c: Time to sleep! for 2 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611075040 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075041 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611075041 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852108,6/6/2014T22:24:1 -ntp.c: Writing timestamp... -main.c: Data is: 39232,29035,6/6/2014T22:24:1 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10426,6/6/2014T22:24:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852108,6/6/2014T22:24:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852108,6/6/2014T22:24:1 -main.c: Memory freed - main.c: Putting data: 39232,29035,6/6/2014T22:24:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39232,29035,6/6/2014T22:24:1 -main.c: Memory freed - main.c: Putting data: 6519,10426,6/6/2014T22:24:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10426,6/6/2014T22:24:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28896 B -buffer.c: Used memory: 5808 B -main.c: Time (absolute): 3611075041 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611075100 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8A -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075101 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611075101 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852106,6/6/2014T22:25:1 -ntp.c: Writing timestamp... -main.c: Data is: 39231,29035,6/6/2014T22:25:1 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10418,6/6/2014T22:25:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852106,6/6/2014T22:25:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852106,6/6/2014T22:25:1 -main.c: Memory freed - main.c: Putting data: 39231,29035,6/6/2014T22:25:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39231,29035,6/6/2014T22:25:1 -main.c: Memory freed - main.c: Putting data: 6517,10418,6/6/2014T22:25:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10418,6/6/2014T22:25:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28776 B -buffer.c: Used memory: 5928 B -main.c: Time (absolute): 3611075101 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611075160 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075160 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611075160 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T22:26:0 -ntp.c: Writing timestamp... -main.c: Data is: 39232,29034,6/6/2014T22:26:0 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10433,6/6/2014T22:26:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T22:26:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T22:26:0 -main.c: Memory freed - main.c: Putting data: 39232,29034,6/6/2014T22:26:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39232,29034,6/6/2014T22:26:0 -main.c: Memory freed - main.c: Putting data: 6517,10433,6/6/2014T22:26:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10433,6/6/2014T22:26:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852108,6/6/2014T22:24:1 with length 23 -json.c: Preparing: 852106,6/6/2014T22:25:1 with length 23 -json.c: Preparing: 852105,6/6/2014T22:26:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"852108","timestamp":"6/6/2014T22:24:1"},{"value":"852106","timestamp":"6/6/2014T22:25:1"},{"value":"852105","timestamp":"6/6/2014T22:26:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39232,29035,6/6/2014T22:24:1 with length 28 -json.c: Preparing: 39231,29035,6/6/2014T22:25:1 with length 28 -json.c: Preparing: 39232,29034,6/6/2014T22:26:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39232,29035","timestamp":"6/6/2014T22:24:1"},{"value":"39231,29035","timestamp":"6/6/2014T22:25:1"},{"value":"39232,29034","timestamp":"6/6/2014T22:26:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6519,10426,6/6/2014T22:24:1 with length 27 -json.c: Preparing: 6517,10418,6/6/2014T22:25:1 with length 27 -json.c: Preparing: 6517,10433,6/6/2014T22:26:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6519,10426","timestamp":"6/6/2014T22:24:1"},{"value":"6517,10418","timestamp":"6/6/2014T22:25:1"},{"value":"6517,10433","timestamp":"6/6/2014T22:26:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:26:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:26:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611075174 -main.c: Updating new time to 3611075174 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611075174 -Time LONG_PERIOD: 42 -Time SHORT_PERIOD: 14 -buffer.c: Checking available memory... -buffer.c: Available memory: 28976 B -buffer.c: Used memory: 5728 B -main.c: Time (absolute): 3611075174 -Time LONG_PERIOD: 42 -Time SHORT_PERIOD: 14 -timer-loop.c: Time to sleep! for 46 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611075220 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075220 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611075220 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T22:27:0 -ntp.c: Writing timestamp... -main.c: Data is: 39232,29034,6/6/2014T22:27:0 -ntp.c: Writing timestamp... -main.c: Data is: 6514,10449,6/6/2014T22:27:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T22:27:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T22:27:0 -main.c: Memory freed - main.c: Putting data: 39232,29034,6/6/2014T22:27:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39232,29034,6/6/2014T22:27:0 -main.c: Memory freed - main.c: Putting data: 6514,10449,6/6/2014T22:27:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6514,10449,6/6/2014T22:27:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28824 B -buffer.c: Used memory: 5880 B -main.c: Time (absolute): 3611075220 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611075280 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8B -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075280 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611075280 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852107,6/6/2014T22:28:0 -ntp.c: Writing timestamp... -main.c: Data is: 39230,29036,6/6/2014T22:28:0 -ntp.c: Writing timestamp... -main.c: Data is: 6514,10433,6/6/2014T22:28:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852107,6/6/2014T22:28:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852107,6/6/2014T22:28:0 -main.c: Memory freed - main.c: Putting data: 39230,29036,6/6/2014T22:28:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39230,29036,6/6/2014T22:28:0 -main.c: Memory freed - main.c: Putting data: 6514,10433,6/6/2014T22:28:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6514,10433,6/6/2014T22:28:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28704 B -buffer.c: Used memory: 6000 B -main.c: Time (absolute): 3611075280 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611075340 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8A -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075340 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611075340 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852106,6/6/2014T22:29:0 -ntp.c: Writing timestamp... -main.c: Data is: 39224,29033,6/6/2014T22:29:0 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10524,6/6/2014T22:29:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852106,6/6/2014T22:29:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852106,6/6/2014T22:29:0 -main.c: Memory freed - main.c: Putting data: 39224,29033,6/6/2014T22:29:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39224,29033,6/6/2014T22:29:0 -main.c: Memory freed - main.c: Putting data: 6517,10524,6/6/2014T22:29:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10524,6/6/2014T22:29:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852105,6/6/2014T22:27:0 with length 23 -json.c: Preparing: 852107,6/6/2014T22:28:0 with length 23 -json.c: Preparing: 852106,6/6/2014T22:29:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"852105","timestamp":"6/6/2014T22:27:0"},{"value":"852107","timestamp":"6/6/2014T22:28:0"},{"value":"852106","timestamp":"6/6/2014T22:29:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39232,29034,6/6/2014T22:27:0 with length 28 -json.c: Preparing: 39230,29036,6/6/2014T22:28:0 with length 28 -json.c: Preparing: 39224,29033,6/6/2014T22:29:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39232,29034","timestamp":"6/6/2014T22:27:0"},{"value":"39230,29036","timestamp":"6/6/2014T22:28:0"},{"value":"39224,29033","timestamp":"6/6/2014T22:29:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6514,10449,6/6/2014T22:27:0 with length 27 -json.c: Preparing: 6514,10433,6/6/2014T22:28:0 with length 27 -json.c: Preparing: 6517,10524,6/6/2014T22:29:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6514,10449","timestamp":"6/6/2014T22:27:0"},{"value":"6514,10433","timestamp":"6/6/2014T22:28:0"},{"value":"6517,10524","timestamp":"6/6/2014T22:29:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:29:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:29:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611075358 -main.c: Updating new time to 3611075358 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611075358 -Time LONG_PERIOD: 54 -Time SHORT_PERIOD: 18 -buffer.c: Checking available memory... -buffer.c: Available memory: 28904 B -buffer.c: Used memory: 5800 B -main.c: Time (absolute): 3611075358 -Time LONG_PERIOD: 54 -Time SHORT_PERIOD: 18 -timer-loop.c: Time to sleep! for 42 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611075400 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0B -sensors.c: [LIGHT] CH0 = 74 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075401 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611075401 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 721012,6/6/2014T22:30:1 -ntp.c: Writing timestamp... -main.c: Data is: 39231,29035,6/6/2014T22:30:1 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10390,6/6/2014T22:30:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 721012,6/6/2014T22:30:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 721012,6/6/2014T22:30:1 -main.c: Memory freed - main.c: Putting data: 39231,29035,6/6/2014T22:30:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39231,29035,6/6/2014T22:30:1 -main.c: Memory freed - main.c: Putting data: 6517,10390,6/6/2014T22:30:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10390,6/6/2014T22:30:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28744 B -buffer.c: Used memory: 5960 B -main.c: Time (absolute): 3611075401 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611075460 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 7D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075461 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611075461 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786557,6/6/2014T22:31:1 -ntp.c: Writing timestamp... -main.c: Data is: 39233,29037,6/6/2014T22:31:1 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10386,6/6/2014T22:31:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786557,6/6/2014T22:31:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786557,6/6/2014T22:31:1 -main.c: Memory freed - main.c: Putting data: 39233,29037,6/6/2014T22:31:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39233,29037,6/6/2014T22:31:1 -main.c: Memory freed - main.c: Putting data: 6519,10386,6/6/2014T22:31:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10386,6/6/2014T22:31:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28624 B -buffer.c: Used memory: 6080 B -main.c: Time (absolute): 3611075461 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611075520 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 7F -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075521 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611075521 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786559,6/6/2014T22:32:1 -ntp.c: Writing timestamp... -main.c: Data is: 39231,29039,6/6/2014T22:32:1 -ntp.c: Writing timestamp... -main.c: Data is: 6521,10398,6/6/2014T22:32:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786559,6/6/2014T22:32:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786559,6/6/2014T22:32:1 -main.c: Memory freed - main.c: Putting data: 39231,29039,6/6/2014T22:32:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39231,29039,6/6/2014T22:32:1 -main.c: Memory freed - main.c: Putting data: 6521,10398,6/6/2014T22:32:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6521,10398,6/6/2014T22:32:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 721012,6/6/2014T22:30:1 with length 23 -json.c: Preparing: 786557,6/6/2014T22:31:1 with length 23 -json.c: Preparing: 786559,6/6/2014T22:32:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"721012","timestamp":"6/6/2014T22:30:1"},{"value":"786557","timestamp":"6/6/2014T22:31:1"},{"value":"786559","timestamp":"6/6/2014T22:32:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39231,29035,6/6/2014T22:30:1 with length 28 -json.c: Preparing: 39233,29037,6/6/2014T22:31:1 with length 28 -json.c: Preparing: 39231,29039,6/6/2014T22:32:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39231,29035","timestamp":"6/6/2014T22:30:1"},{"value":"39233,29037","timestamp":"6/6/2014T22:31:1"},{"value":"39231,29039","timestamp":"6/6/2014T22:32:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6517,10390,6/6/2014T22:30:1 with length 27 -json.c: Preparing: 6519,10386,6/6/2014T22:31:1 with length 27 -json.c: Preparing: 6521,10398,6/6/2014T22:32:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6517,10390","timestamp":"6/6/2014T22:30:1"},{"value":"6519,10386","timestamp":"6/6/2014T22:31:1"},{"value":"6521,10398","timestamp":"6/6/2014T22:32:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:32:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:32:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611075536 -main.c: Updating new time to 3611075536 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611075536 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 28824 B -buffer.c: Used memory: 5880 B -main.c: Time (absolute): 3611075536 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611075580 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 7F -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075581 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611075581 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786559,6/6/2014T22:33:1 -ntp.c: Writing timestamp... -main.c: Data is: 39227,29037,6/6/2014T22:33:1 -ntp.c: Writing timestamp... -main.c: Data is: 6520,10418,6/6/2014T22:33:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786559,6/6/2014T22:33:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786559,6/6/2014T22:33:1 -main.c: Memory freed - main.c: Putting data: 39227,29037,6/6/2014T22:33:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39227,29037,6/6/2014T22:33:1 -main.c: Memory freed - main.c: Putting data: 6520,10418,6/6/2014T22:33:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6520,10418,6/6/2014T22:33:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28672 B -buffer.c: Used memory: 6032 B -main.c: Time (absolute): 3611075581 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611075640 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 83 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075641 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611075641 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786563,6/6/2014T22:34:1 -ntp.c: Writing timestamp... -main.c: Data is: 39225,29036,6/6/2014T22:34:1 -ntp.c: Writing timestamp... -main.c: Data is: 6520,10422,6/6/2014T22:34:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786563,6/6/2014T22:34:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786563,6/6/2014T22:34:1 -main.c: Memory freed - main.c: Putting data: 39225,29036,6/6/2014T22:34:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39225,29036,6/6/2014T22:34:1 -main.c: Memory freed - main.c: Putting data: 6520,10422,6/6/2014T22:34:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6520,10422,6/6/2014T22:34:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28552 B -buffer.c: Used memory: 6152 B -main.c: Time (absolute): 3611075641 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611075700 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0B -sensors.c: [LIGHT] CH0 = 79 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075700 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611075700 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 721017,6/6/2014T22:35:0 -ntp.c: Writing timestamp... -main.c: Data is: 39229,29035,6/6/2014T22:35:0 -ntp.c: Writing timestamp... -main.c: Data is: 6521,10430,6/6/2014T22:35:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 721017,6/6/2014T22:35:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 721017,6/6/2014T22:35:0 -main.c: Memory freed - main.c: Putting data: 39229,29035,6/6/2014T22:35:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39229,29035,6/6/2014T22:35:0 -main.c: Memory freed - main.c: Putting data: 6521,10430,6/6/2014T22:35:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6521,10430,6/6/2014T22:35:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786559,6/6/2014T22:33:1 with length 23 -json.c: Preparing: 786563,6/6/2014T22:34:1 with length 23 -json.c: Preparing: 721017,6/6/2014T22:35:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786559","timestamp":"6/6/2014T22:33:1"},{"value":"786563","timestamp":"6/6/2014T22:34:1"},{"value":"721017","timestamp":"6/6/2014T22:35:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39227,29037,6/6/2014T22:33:1 with length 28 -json.c: Preparing: 39225,29036,6/6/2014T22:34:1 with length 28 -json.c: Preparing: 39229,29035,6/6/2014T22:35:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39227,29037","timestamp":"6/6/2014T22:33:1"},{"value":"39225,29036","timestamp":"6/6/2014T22:34:1"},{"value":"39229,29035","timestamp":"6/6/2014T22:35:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6520,10418,6/6/2014T22:33:1 with length 27 -json.c: Preparing: 6520,10422,6/6/2014T22:34:1 with length 27 -json.c: Preparing: 6521,10430,6/6/2014T22:35:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6520,10418","timestamp":"6/6/2014T22:33:1"},{"value":"6520,10422","timestamp":"6/6/2014T22:34:1"},{"value":"6521,10430","timestamp":"6/6/2014T22:35:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:35:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:35:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611075716 -main.c: Updating new time to 3611075716 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611075716 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 28744 B -buffer.c: Used memory: 5960 B -main.c: Time (absolute): 3611075716 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611075760 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 83 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075761 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611075761 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786563,6/6/2014T22:36:1 -ntp.c: Writing timestamp... -main.c: Data is: 39225,29038,6/6/2014T22:36:1 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10430,6/6/2014T22:36:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786563,6/6/2014T22:36:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786563,6/6/2014T22:36:1 -main.c: Memory freed - main.c: Putting data: 39225,29038,6/6/2014T22:36:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39225,29038,6/6/2014T22:36:1 -main.c: Memory freed - main.c: Putting data: 6519,10430,6/6/2014T22:36:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10430,6/6/2014T22:36:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28592 B -buffer.c: Used memory: 6112 B -main.c: Time (absolute): 3611075761 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611075820 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 87 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075821 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611075821 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786567,6/6/2014T22:37:1 -ntp.c: Writing timestamp... -main.c: Data is: 39220,29036,6/6/2014T22:37:1 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10433,6/6/2014T22:37:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786567,6/6/2014T22:37:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786567,6/6/2014T22:37:1 -main.c: Memory freed - main.c: Putting data: 39220,29036,6/6/2014T22:37:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39220,29036,6/6/2014T22:37:1 -main.c: Memory freed - main.c: Putting data: 6519,10433,6/6/2014T22:37:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10433,6/6/2014T22:37:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28456 B -buffer.c: Used memory: 6248 B -main.c: Time (absolute): 3611075821 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611075880 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075880 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611075880 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786568,6/6/2014T22:38:0 -ntp.c: Writing timestamp... -main.c: Data is: 39222,29036,6/6/2014T22:38:0 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10433,6/6/2014T22:38:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786568,6/6/2014T22:38:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786568,6/6/2014T22:38:0 -main.c: Memory freed - main.c: Putting data: 39222,29036,6/6/2014T22:38:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39222,29036,6/6/2014T22:38:0 -main.c: Memory freed - main.c: Putting data: 6519,10433,6/6/2014T22:38:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10433,6/6/2014T22:38:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786563,6/6/2014T22:36:1 with length 23 -json.c: Preparing: 786567,6/6/2014T22:37:1 with length 23 -json.c: Preparing: 786568,6/6/2014T22:38:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786563","timestamp":"6/6/2014T22:36:1"},{"value":"786567","timestamp":"6/6/2014T22:37:1"},{"value":"786568","timestamp":"6/6/2014T22:38:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39225,29038,6/6/2014T22:36:1 with length 28 -json.c: Preparing: 39220,29036,6/6/2014T22:37:1 with length 28 -json.c: Preparing: 39222,29036,6/6/2014T22:38:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39225,29038","timestamp":"6/6/2014T22:36:1"},{"value":"39220,29036","timestamp":"6/6/2014T22:37:1"},{"value":"39222,29036","timestamp":"6/6/2014T22:38:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6519,10430,6/6/2014T22:36:1 with length 27 -json.c: Preparing: 6519,10433,6/6/2014T22:37:1 with length 27 -json.c: Preparing: 6519,10433,6/6/2014T22:38:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6519,10430","timestamp":"6/6/2014T22:36:1"},{"value":"6519,10433","timestamp":"6/6/2014T22:37:1"},{"value":"6519,10433","timestamp":"6/6/2014T22:38:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:38:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:38:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611075896 -main.c: Updating new time to 3611075896 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611075896 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 28664 B -buffer.c: Used memory: 6040 B -main.c: Time (absolute): 3611075896 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611075940 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611075941 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611075941 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786568,6/6/2014T22:39:1 -ntp.c: Writing timestamp... -main.c: Data is: 39229,29037,6/6/2014T22:39:1 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10426,6/6/2014T22:39:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786568,6/6/2014T22:39:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786568,6/6/2014T22:39:1 -main.c: Memory freed - main.c: Putting data: 39229,29037,6/6/2014T22:39:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39229,29037,6/6/2014T22:39:1 -main.c: Memory freed - main.c: Putting data: 6519,10426,6/6/2014T22:39:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10426,6/6/2014T22:39:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28512 B -buffer.c: Used memory: 6192 B -main.c: Time (absolute): 3611075941 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611076000 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076000 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611076000 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852104,6/6/2014T22:40:0 -ntp.c: Writing timestamp... -main.c: Data is: 39227,29032,6/6/2014T22:40:0 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10430,6/6/2014T22:40:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852104,6/6/2014T22:40:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852104,6/6/2014T22:40:0 -main.c: Memory freed - main.c: Putting data: 39227,29032,6/6/2014T22:40:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39227,29032,6/6/2014T22:40:0 -main.c: Memory freed - main.c: Putting data: 6519,10430,6/6/2014T22:40:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10430,6/6/2014T22:40:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28384 B -buffer.c: Used memory: 6320 B -main.c: Time (absolute): 3611076001 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611076060 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 88 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076060 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611076060 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852104,6/6/2014T22:41:0 -ntp.c: Writing timestamp... -main.c: Data is: 39224,29034,6/6/2014T22:41:0 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10445,6/6/2014T22:41:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852104,6/6/2014T22:41:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852104,6/6/2014T22:41:0 -main.c: Memory freed - main.c: Putting data: 39224,29034,6/6/2014T22:41:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39224,29034,6/6/2014T22:41:0 -main.c: Memory freed - main.c: Putting data: 6517,10445,6/6/2014T22:41:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10445,6/6/2014T22:41:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786568,6/6/2014T22:39:1 with length 23 -json.c: Preparing: 852104,6/6/2014T22:40:0 with length 23 -json.c: Preparing: 852104,6/6/2014T22:41:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786568","timestamp":"6/6/2014T22:39:1"},{"value":"852104","timestamp":"6/6/2014T22:40:0"},{"value":"852104","timestamp":"6/6/2014T22:41:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39229,29037,6/6/2014T22:39:1 with length 28 -json.c: Preparing: 39227,29032,6/6/2014T22:40:0 with length 28 -json.c: Preparing: 39224,29034,6/6/2014T22:41:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39229,29037","timestamp":"6/6/2014T22:39:1"},{"value":"39227,29032","timestamp":"6/6/2014T22:40:0"},{"value":"39224,29034","timestamp":"6/6/2014T22:41:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6519,10426,6/6/2014T22:39:1 with length 27 -json.c: Preparing: 6519,10430,6/6/2014T22:40:0 with length 27 -json.c: Preparing: 6517,10445,6/6/2014T22:41:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6519,10426","timestamp":"6/6/2014T22:39:1"},{"value":"6519,10430","timestamp":"6/6/2014T22:40:0"},{"value":"6517,10445","timestamp":"6/6/2014T22:41:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:41:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:41:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611076076 -main.c: Updating new time to 3611076076 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611076076 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 28488 B -buffer.c: Used memory: 6216 B -main.c: Time (absolute): 3611076076 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611076120 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076121 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611076121 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T22:42:1 -ntp.c: Writing timestamp... -main.c: Data is: 39226,29032,6/6/2014T22:42:1 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10437,6/6/2014T22:42:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T22:42:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T22:42:1 -main.c: Memory freed - main.c: Putting data: 39226,29032,6/6/2014T22:42:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39226,29032,6/6/2014T22:42:1 -main.c: Memory freed - main.c: Putting data: 6517,10437,6/6/2014T22:42:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10437,6/6/2014T22:42:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28328 B -buffer.c: Used memory: 6376 B -main.c: Time (absolute): 3611076121 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611076180 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0B -sensors.c: [LIGHT] CH0 = 74 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076181 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611076181 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 721012,6/6/2014T22:43:1 -ntp.c: Writing timestamp... -main.c: Data is: 39227,29032,6/6/2014T22:43:1 -ntp.c: Writing timestamp... -main.c: Data is: 6516,10406,6/6/2014T22:43:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 721012,6/6/2014T22:43:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 721012,6/6/2014T22:43:1 -main.c: Memory freed - main.c: Putting data: 39227,29032,6/6/2014T22:43:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39227,29032,6/6/2014T22:43:1 -main.c: Memory freed - main.c: Putting data: 6516,10406,6/6/2014T22:43:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6516,10406,6/6/2014T22:43:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28192 B -buffer.c: Used memory: 6512 B -main.c: Time (absolute): 3611076181 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611076240 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0B -sensors.c: [LIGHT] CH0 = 7B -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076241 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611076241 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 721019,6/6/2014T22:44:1 -ntp.c: Writing timestamp... -main.c: Data is: 39229,29034,6/6/2014T22:44:1 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10414,6/6/2014T22:44:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 721019,6/6/2014T22:44:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 721019,6/6/2014T22:44:1 -main.c: Memory freed - main.c: Putting data: 39229,29034,6/6/2014T22:44:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39229,29034,6/6/2014T22:44:1 -main.c: Memory freed - main.c: Putting data: 6517,10414,6/6/2014T22:44:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10414,6/6/2014T22:44:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852105,6/6/2014T22:42:1 with length 23 -json.c: Preparing: 721012,6/6/2014T22:43:1 with length 23 -json.c: Preparing: 721019,6/6/2014T22:44:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"852105","timestamp":"6/6/2014T22:42:1"},{"value":"721012","timestamp":"6/6/2014T22:43:1"},{"value":"721019","timestamp":"6/6/2014T22:44:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39226,29032,6/6/2014T22:42:1 with length 28 -json.c: Preparing: 39227,29032,6/6/2014T22:43:1 with length 28 -json.c: Preparing: 39229,29034,6/6/2014T22:44:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39226,29032","timestamp":"6/6/2014T22:42:1"},{"value":"39227,29032","timestamp":"6/6/2014T22:43:1"},{"value":"39229,29034","timestamp":"6/6/2014T22:44:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6517,10437,6/6/2014T22:42:1 with length 27 -json.c: Preparing: 6516,10406,6/6/2014T22:43:1 with length 27 -json.c: Preparing: 6517,10414,6/6/2014T22:44:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6517,10437","timestamp":"6/6/2014T22:42:1"},{"value":"6516,10406","timestamp":"6/6/2014T22:43:1"},{"value":"6517,10414","timestamp":"6/6/2014T22:44:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:44:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:44:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611076256 -main.c: Updating new time to 3611076256 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611076256 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 28400 B -buffer.c: Used memory: 6304 B -main.c: Time (absolute): 3611076256 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611076300 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 7C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076301 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611076301 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786556,6/6/2014T22:45:1 -ntp.c: Writing timestamp... -main.c: Data is: 39224,29036,6/6/2014T22:45:1 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10406,6/6/2014T22:45:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786556,6/6/2014T22:45:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786556,6/6/2014T22:45:1 -main.c: Memory freed - main.c: Putting data: 39224,29036,6/6/2014T22:45:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39224,29036,6/6/2014T22:45:1 -main.c: Memory freed - main.c: Putting data: 6517,10406,6/6/2014T22:45:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10406,6/6/2014T22:45:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28256 B -buffer.c: Used memory: 6448 B -main.c: Time (absolute): 3611076301 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611076360 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 82 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076360 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611076360 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786562,6/6/2014T22:46:0 -ntp.c: Writing timestamp... -main.c: Data is: 39226,29038,6/6/2014T22:46:0 -ntp.c: Writing timestamp... -main.c: Data is: 6521,10406,6/6/2014T22:46:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786562,6/6/2014T22:46:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786562,6/6/2014T22:46:0 -main.c: Memory freed - main.c: Putting data: 39226,29038,6/6/2014T22:46:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39226,29038,6/6/2014T22:46:0 -main.c: Memory freed - main.c: Putting data: 6521,10406,6/6/2014T22:46:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6521,10406,6/6/2014T22:46:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28120 B -buffer.c: Used memory: 6584 B -main.c: Time (absolute): 3611076361 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611076420 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 81 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076420 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611076420 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786561,6/6/2014T22:47:0 -ntp.c: Writing timestamp... -main.c: Data is: 39227,29039,6/6/2014T22:47:0 -ntp.c: Writing timestamp... -main.c: Data is: 6521,10406,6/6/2014T22:47:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786561,6/6/2014T22:47:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786561,6/6/2014T22:47:0 -main.c: Memory freed - main.c: Putting data: 39227,29039,6/6/2014T22:47:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39227,29039,6/6/2014T22:47:0 -main.c: Memory freed - main.c: Putting data: 6521,10406,6/6/2014T22:47:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6521,10406,6/6/2014T22:47:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786556,6/6/2014T22:45:1 with length 23 -json.c: Preparing: 786562,6/6/2014T22:46:0 with length 23 -json.c: Preparing: 786561,6/6/2014T22:47:0 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786556","timestamp":"6/6/2014T22:45:1"},{"value":"786562","timestamp":"6/6/2014T22:46:0"},{"value":"786561","timestamp":"6/6/2014T22:47:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39224,29036,6/6/2014T22:45:1 with length 28 -json.c: Preparing: 39226,29038,6/6/2014T22:46:0 with length 28 -json.c: Preparing: 39227,29039,6/6/2014T22:47:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39224,29036","timestamp":"6/6/2014T22:45:1"},{"value":"39226,29038","timestamp":"6/6/2014T22:46:0"},{"value":"39227,29039","timestamp":"6/6/2014T22:47:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6517,10406,6/6/2014T22:45:1 with length 27 -json.c: Preparing: 6521,10406,6/6/2014T22:46:0 with length 27 -json.c: Preparing: 6521,10406,6/6/2014T22:47:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6517,10406","timestamp":"6/6/2014T22:45:1"},{"value":"6521,10406","timestamp":"6/6/2014T22:46:0"},{"value":"6521,10406","timestamp":"6/6/2014T22:47:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:47:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:47:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611076436 -main.c: Updating new time to 3611076436 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611076436 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 28328 B -buffer.c: Used memory: 6376 B -main.c: Time (absolute): 3611076436 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611076480 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0B -sensors.c: [LIGHT] CH0 = 77 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076480 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611076480 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 721015,6/6/2014T22:48:0 -ntp.c: Writing timestamp... -main.c: Data is: 39222,29038,6/6/2014T22:48:0 -ntp.c: Writing timestamp... -main.c: Data is: 6523,10410,6/6/2014T22:48:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 721015,6/6/2014T22:48:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 721015,6/6/2014T22:48:0 -main.c: Memory freed - main.c: Putting data: 39222,29038,6/6/2014T22:48:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39222,29038,6/6/2014T22:48:0 -main.c: Memory freed - main.c: Putting data: 6523,10410,6/6/2014T22:48:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6523,10410,6/6/2014T22:48:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28176 B -buffer.c: Used memory: 6528 B -main.c: Time (absolute): 3611076480 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611076541 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 89 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076541 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611076541 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852105,6/6/2014T22:49:1 -ntp.c: Writing timestamp... -main.c: Data is: 39220,29040,6/6/2014T22:49:1 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10433,6/6/2014T22:49:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852105,6/6/2014T22:49:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852105,6/6/2014T22:49:1 -main.c: Memory freed - main.c: Putting data: 39220,29040,6/6/2014T22:49:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39220,29040,6/6/2014T22:49:1 -main.c: Memory freed - main.c: Putting data: 6519,10433,6/6/2014T22:49:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10433,6/6/2014T22:49:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28024 B -buffer.c: Used memory: 6680 B -main.c: Time (absolute): 3611076541 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611076600 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 7D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076601 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611076601 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786557,6/6/2014T22:50:1 -ntp.c: Writing timestamp... -main.c: Data is: 39224,29039,6/6/2014T22:50:1 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10418,6/6/2014T22:50:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786557,6/6/2014T22:50:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786557,6/6/2014T22:50:1 -main.c: Memory freed - main.c: Putting data: 39224,29039,6/6/2014T22:50:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39224,29039,6/6/2014T22:50:1 -main.c: Memory freed - main.c: Putting data: 6519,10418,6/6/2014T22:50:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10418,6/6/2014T22:50:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 721015,6/6/2014T22:48:0 with length 23 -json.c: Preparing: 852105,6/6/2014T22:49:1 with length 23 -json.c: Preparing: 786557,6/6/2014T22:50:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"721015","timestamp":"6/6/2014T22:48:0"},{"value":"852105","timestamp":"6/6/2014T22:49:1"},{"value":"786557","timestamp":"6/6/2014T22:50:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39222,29038,6/6/2014T22:48:0 with length 28 -json.c: Preparing: 39220,29040,6/6/2014T22:49:1 with length 28 -json.c: Preparing: 39224,29039,6/6/2014T22:50:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39222,29038","timestamp":"6/6/2014T22:48:0"},{"value":"39220,29040","timestamp":"6/6/2014T22:49:1"},{"value":"39224,29039","timestamp":"6/6/2014T22:50:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6523,10410,6/6/2014T22:48:0 with length 27 -json.c: Preparing: 6519,10433,6/6/2014T22:49:1 with length 27 -json.c: Preparing: 6519,10418,6/6/2014T22:50:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6523,10410","timestamp":"6/6/2014T22:48:0"},{"value":"6519,10433","timestamp":"6/6/2014T22:49:1"},{"value":"6519,10418","timestamp":"6/6/2014T22:50:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:50:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:50:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611076617 -main.c: Updating new time to 3611076617 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611076617 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 28240 B -buffer.c: Used memory: 6464 B -main.c: Time (absolute): 3611076617 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611076660 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 87 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076661 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611076661 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786567,6/6/2014T22:51:1 -ntp.c: Writing timestamp... -main.c: Data is: 39222,29039,6/6/2014T22:51:1 -ntp.c: Writing timestamp... -main.c: Data is: 6520,10406,6/6/2014T22:51:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786567,6/6/2014T22:51:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786567,6/6/2014T22:51:1 -main.c: Memory freed - main.c: Putting data: 39222,29039,6/6/2014T22:51:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39222,29039,6/6/2014T22:51:1 -main.c: Memory freed - main.c: Putting data: 6520,10406,6/6/2014T22:51:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6520,10406,6/6/2014T22:51:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28096 B -buffer.c: Used memory: 6608 B -main.c: Time (absolute): 3611076661 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611076720 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 84 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076721 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611076721 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786564,6/6/2014T22:52:1 -ntp.c: Writing timestamp... -main.c: Data is: 39219,29040,6/6/2014T22:52:1 -ntp.c: Writing timestamp... -main.c: Data is: 6521,10394,6/6/2014T22:52:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786564,6/6/2014T22:52:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786564,6/6/2014T22:52:1 -main.c: Memory freed - main.c: Putting data: 39219,29040,6/6/2014T22:52:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39219,29040,6/6/2014T22:52:1 -main.c: Memory freed - main.c: Putting data: 6521,10394,6/6/2014T22:52:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6521,10394,6/6/2014T22:52:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27952 B -buffer.c: Used memory: 6752 B -main.c: Time (absolute): 3611076721 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611076780 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 7D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076781 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611076781 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786557,6/6/2014T22:53:1 -ntp.c: Writing timestamp... -main.c: Data is: 39219,29041,6/6/2014T22:53:1 -ntp.c: Writing timestamp... -main.c: Data is: 6521,10359,6/6/2014T22:53:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786557,6/6/2014T22:53:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786557,6/6/2014T22:53:1 -main.c: Memory freed - main.c: Putting data: 39219,29041,6/6/2014T22:53:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39219,29041,6/6/2014T22:53:1 -main.c: Memory freed - main.c: Putting data: 6521,10359,6/6/2014T22:53:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6521,10359,6/6/2014T22:53:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786567,6/6/2014T22:51:1 with length 23 -json.c: Preparing: 786564,6/6/2014T22:52:1 with length 23 -json.c: Preparing: 786557,6/6/2014T22:53:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786567","timestamp":"6/6/2014T22:51:1"},{"value":"786564","timestamp":"6/6/2014T22:52:1"},{"value":"786557","timestamp":"6/6/2014T22:53:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39222,29039,6/6/2014T22:51:1 with length 28 -json.c: Preparing: 39219,29040,6/6/2014T22:52:1 with length 28 -json.c: Preparing: 39219,29041,6/6/2014T22:53:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39222,29039","timestamp":"6/6/2014T22:51:1"},{"value":"39219,29040","timestamp":"6/6/2014T22:52:1"},{"value":"39219,29041","timestamp":"6/6/2014T22:53:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6520,10406,6/6/2014T22:51:1 with length 27 -json.c: Preparing: 6521,10394,6/6/2014T22:52:1 with length 27 -json.c: Preparing: 6521,10359,6/6/2014T22:53:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6520,10406","timestamp":"6/6/2014T22:51:1"},{"value":"6521,10394","timestamp":"6/6/2014T22:52:1"},{"value":"6521,10359","timestamp":"6/6/2014T22:53:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:53:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:53:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611076796 -main.c: Updating new time to 3611076796 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611076796 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 28160 B -buffer.c: Used memory: 6544 B -main.c: Time (absolute): 3611076796 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611076840 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0C -sensors.c: [LIGHT] CH0 = 81 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076841 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611076841 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 786561,6/6/2014T22:54:1 -ntp.c: Writing timestamp... -main.c: Data is: 39215,29042,6/6/2014T22:54:1 -ntp.c: Writing timestamp... -main.c: Data is: 6526,10394,6/6/2014T22:54:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 786561,6/6/2014T22:54:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 786561,6/6/2014T22:54:1 -main.c: Memory freed - main.c: Putting data: 39215,29042,6/6/2014T22:54:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39215,29042,6/6/2014T22:54:1 -main.c: Memory freed - main.c: Putting data: 6526,10394,6/6/2014T22:54:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6526,10394,6/6/2014T22:54:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 28016 B -buffer.c: Used memory: 6688 B -main.c: Time (absolute): 3611076841 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611076900 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0B -sensors.c: [LIGHT] CH0 = 70 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076901 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611076901 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 721008,6/6/2014T22:55:1 -ntp.c: Writing timestamp... -main.c: Data is: 39220,29040,6/6/2014T22:55:1 -ntp.c: Writing timestamp... -main.c: Data is: 6520,10414,6/6/2014T22:55:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 721008,6/6/2014T22:55:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 721008,6/6/2014T22:55:1 -main.c: Memory freed - main.c: Putting data: 39220,29040,6/6/2014T22:55:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39220,29040,6/6/2014T22:55:1 -main.c: Memory freed - main.c: Putting data: 6520,10414,6/6/2014T22:55:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6520,10414,6/6/2014T22:55:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27880 B -buffer.c: Used memory: 6824 B -main.c: Time (absolute): 3611076901 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611076960 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8D -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611076961 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611076961 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852109,6/6/2014T22:56:1 -ntp.c: Writing timestamp... -main.c: Data is: 39217,29039,6/6/2014T22:56:1 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10410,6/6/2014T22:56:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852109,6/6/2014T22:56:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852109,6/6/2014T22:56:1 -main.c: Memory freed - main.c: Putting data: 39217,29039,6/6/2014T22:56:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39217,29039,6/6/2014T22:56:1 -main.c: Memory freed - main.c: Putting data: 6519,10410,6/6/2014T22:56:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10410,6/6/2014T22:56:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 786561,6/6/2014T22:54:1 with length 23 -json.c: Preparing: 721008,6/6/2014T22:55:1 with length 23 -json.c: Preparing: 852109,6/6/2014T22:56:1 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 168 - -{"observations":[{"value":"786561","timestamp":"6/6/2014T22:54:1"},{"value":"721008","timestamp":"6/6/2014T22:55:1"},{"value":"852109","timestamp":"6/6/2014T22:56:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39215,29042,6/6/2014T22:54:1 with length 28 -json.c: Preparing: 39220,29040,6/6/2014T22:55:1 with length 28 -json.c: Preparing: 39217,29039,6/6/2014T22:56:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39215,29042","timestamp":"6/6/2014T22:54:1"},{"value":"39220,29040","timestamp":"6/6/2014T22:55:1"},{"value":"39217,29039","timestamp":"6/6/2014T22:56:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6526,10394,6/6/2014T22:54:1 with length 27 -json.c: Preparing: 6520,10414,6/6/2014T22:55:1 with length 27 -json.c: Preparing: 6519,10410,6/6/2014T22:56:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6526,10394","timestamp":"6/6/2014T22:54:1"},{"value":"6520,10414","timestamp":"6/6/2014T22:55:1"},{"value":"6519,10410","timestamp":"6/6/2014T22:56:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:56:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:56:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611076976 -main.c: Updating new time to 3611076976 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611076976 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 28088 B -buffer.c: Used memory: 6616 B -main.c: Time (absolute): 3611076976 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611077020 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8A -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077020 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611077020 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852106,6/6/2014T22:57:0 -ntp.c: Writing timestamp... -main.c: Data is: 39216,29039,6/6/2014T22:57:0 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10414,6/6/2014T22:57:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852106,6/6/2014T22:57:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852106,6/6/2014T22:57:0 -main.c: Memory freed - main.c: Putting data: 39216,29039,6/6/2014T22:57:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39216,29039,6/6/2014T22:57:0 -main.c: Memory freed - main.c: Putting data: 6519,10414,6/6/2014T22:57:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10414,6/6/2014T22:57:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27936 B -buffer.c: Used memory: 6768 B -main.c: Time (absolute): 3611077021 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611077080 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 0D -sensors.c: [LIGHT] CH0 = 8C -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077080 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611077080 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 852108,6/6/2014T22:58:0 -ntp.c: Writing timestamp... -main.c: Data is: 39214,29040,6/6/2014T22:58:0 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10398,6/6/2014T22:58:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 852108,6/6/2014T22:58:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 852108,6/6/2014T22:58:0 -main.c: Memory freed - main.c: Putting data: 39214,29040,6/6/2014T22:58:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39214,29040,6/6/2014T22:58:0 -main.c: Memory freed - main.c: Putting data: 6517,10398,6/6/2014T22:58:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10398,6/6/2014T22:58:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27784 B -buffer.c: Used memory: 6920 B -main.c: Time (absolute): 3611077080 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611077140 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077141 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077141 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T22:59:1 -ntp.c: Writing timestamp... -main.c: Data is: 39223,29035,6/6/2014T22:59:1 -ntp.c: Writing timestamp... -main.c: Data is: 6519,10304,6/6/2014T22:59:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T22:59:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T22:59:1 -main.c: Memory freed - main.c: Putting data: 39223,29035,6/6/2014T22:59:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39223,29035,6/6/2014T22:59:1 -main.c: Memory freed - main.c: Putting data: 6519,10304,6/6/2014T22:59:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6519,10304,6/6/2014T22:59:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 852106,6/6/2014T22:57:0 with length 23 -json.c: Preparing: 852108,6/6/2014T22:58:0 with length 23 -json.c: Preparing: 65542,6/6/2014T22:59:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 167 - -{"observations":[{"value":"852106","timestamp":"6/6/2014T22:57:0"},{"value":"852108","timestamp":"6/6/2014T22:58:0"},{"value":"65542","timestamp":"6/6/2014T22:59:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39216,29039,6/6/2014T22:57:0 with length 28 -json.c: Preparing: 39214,29040,6/6/2014T22:58:0 with length 28 -json.c: Preparing: 39223,29035,6/6/2014T22:59:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39216,29039","timestamp":"6/6/2014T22:57:0"},{"value":"39214,29040","timestamp":"6/6/2014T22:58:0"},{"value":"39223,29035","timestamp":"6/6/2014T22:59:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6519,10414,6/6/2014T22:57:0 with length 27 -json.c: Preparing: 6517,10398,6/6/2014T22:58:0 with length 27 -json.c: Preparing: 6519,10304,6/6/2014T22:59:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6519,10414","timestamp":"6/6/2014T22:57:0"},{"value":"6517,10398","timestamp":"6/6/2014T22:58:0"},{"value":"6519,10304","timestamp":"6/6/2014T22:59:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T22:59:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T22:59:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611077157 -main.c: Updating new time to 3611077157 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611077157 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 28000 B -buffer.c: Used memory: 6704 B -main.c: Time (absolute): 3611077158 -Time LONG_PERIOD: 54 -Time SHORT_PERIOD: 18 -timer-loop.c: Time to sleep! for 42 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611077200 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077200 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611077200 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:0:0 -ntp.c: Writing timestamp... -main.c: Data is: 39220,29031,6/6/2014T23:0:0 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10245,6/6/2014T23:0:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:0:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:0:0 -main.c: Memory freed - main.c: Putting data: 39220,29031,6/6/2014T23:0:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39220,29031,6/6/2014T23:0:0 -main.c: Memory freed - main.c: Putting data: 6517,10245,6/6/2014T23:0:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10245,6/6/2014T23:0:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27840 B -buffer.c: Used memory: 6864 B -main.c: Time (absolute): 3611077200 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611077260 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077261 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077261 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:1:1 -ntp.c: Writing timestamp... -main.c: Data is: 39219,29029,6/6/2014T23:1:1 -ntp.c: Writing timestamp... -main.c: Data is: 6512,10288,6/6/2014T23:1:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:1:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:1:1 -main.c: Memory freed - main.c: Putting data: 39219,29029,6/6/2014T23:1:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39219,29029,6/6/2014T23:1:1 -main.c: Memory freed - main.c: Putting data: 6512,10288,6/6/2014T23:1:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6512,10288,6/6/2014T23:1:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27696 B -buffer.c: Used memory: 7008 B -main.c: Time (absolute): 3611077261 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611077320 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077321 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077321 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:2:1 -ntp.c: Writing timestamp... -main.c: Data is: 39221,29028,6/6/2014T23:2:1 -ntp.c: Writing timestamp... -main.c: Data is: 6509,10292,6/6/2014T23:2:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:2:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:2:1 -main.c: Memory freed - main.c: Putting data: 39221,29028,6/6/2014T23:2:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39221,29028,6/6/2014T23:2:1 -main.c: Memory freed - main.c: Putting data: 6509,10292,6/6/2014T23:2:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6509,10292,6/6/2014T23:2:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:0:0 with length 21 -json.c: Preparing: 65542,6/6/2014T23:1:1 with length 21 -json.c: Preparing: 65542,6/6/2014T23:2:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 162 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:0:0"},{"value":"65542","timestamp":"6/6/2014T23:1:1"},{"value":"65542","timestamp":"6/6/2014T23:2:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39220,29031,6/6/2014T23:0:0 with length 27 -json.c: Preparing: 39219,29029,6/6/2014T23:1:1 with length 27 -json.c: Preparing: 39221,29028,6/6/2014T23:2:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"39220,29031","timestamp":"6/6/2014T23:0:0"},{"value":"39219,29029","timestamp":"6/6/2014T23:1:1"},{"value":"39221,29028","timestamp":"6/6/2014T23:2:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6517,10245,6/6/2014T23:0:0 with length 26 -json.c: Preparing: 6512,10288,6/6/2014T23:1:1 with length 26 -json.c: Preparing: 6509,10292,6/6/2014T23:2:1 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 177 - -{"observations":[{"value":"6517,10245","timestamp":"6/6/2014T23:0:0"},{"value":"6512,10288","timestamp":"6/6/2014T23:1:1"},{"value":"6509,10292","timestamp":"6/6/2014T23:2:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:2:1 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:2:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611077336 -main.c: Updating new time to 3611077336 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611077336 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 28040 B -buffer.c: Used memory: 6664 B -main.c: Time (absolute): 3611077336 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611077380 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077381 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077381 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:3:1 -ntp.c: Writing timestamp... -main.c: Data is: 39224,29024,6/6/2014T23:3:1 -ntp.c: Writing timestamp... -main.c: Data is: 6505,10323,6/6/2014T23:3:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:3:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:3:1 -main.c: Memory freed - main.c: Putting data: 39224,29024,6/6/2014T23:3:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39224,29024,6/6/2014T23:3:1 -main.c: Memory freed - main.c: Putting data: 6505,10323,6/6/2014T23:3:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6505,10323,6/6/2014T23:3:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27872 B -buffer.c: Used memory: 6832 B -main.c: Time (absolute): 3611077381 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611077440 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077441 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077441 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:4:1 -ntp.c: Writing timestamp... -main.c: Data is: 39222,29022,6/6/2014T23:4:1 -ntp.c: Writing timestamp... -main.c: Data is: 6503,10308,6/6/2014T23:4:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:4:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:4:1 -main.c: Memory freed - main.c: Putting data: 39222,29022,6/6/2014T23:4:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39222,29022,6/6/2014T23:4:1 -main.c: Memory freed - main.c: Putting data: 6503,10308,6/6/2014T23:4:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6503,10308,6/6/2014T23:4:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27744 B -buffer.c: Used memory: 6960 B -main.c: Time (absolute): 3611077441 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611077500 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077501 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077501 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:5:1 -ntp.c: Writing timestamp... -main.c: Data is: 39225,29019,6/6/2014T23:5:1 -ntp.c: Writing timestamp... -main.c: Data is: 6505,10304,6/6/2014T23:5:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:5:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:5:1 -main.c: Memory freed - main.c: Putting data: 39225,29019,6/6/2014T23:5:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39225,29019,6/6/2014T23:5:1 -main.c: Memory freed - main.c: Putting data: 6505,10304,6/6/2014T23:5:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6505,10304,6/6/2014T23:5:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:3:1 with length 21 -json.c: Preparing: 65542,6/6/2014T23:4:1 with length 21 -json.c: Preparing: 65542,6/6/2014T23:5:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 162 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:3:1"},{"value":"65542","timestamp":"6/6/2014T23:4:1"},{"value":"65542","timestamp":"6/6/2014T23:5:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39224,29024,6/6/2014T23:3:1 with length 27 -json.c: Preparing: 39222,29022,6/6/2014T23:4:1 with length 27 -json.c: Preparing: 39225,29019,6/6/2014T23:5:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"39224,29024","timestamp":"6/6/2014T23:3:1"},{"value":"39222,29022","timestamp":"6/6/2014T23:4:1"},{"value":"39225,29019","timestamp":"6/6/2014T23:5:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6505,10323,6/6/2014T23:3:1 with length 26 -json.c: Preparing: 6503,10308,6/6/2014T23:4:1 with length 26 -json.c: Preparing: 6505,10304,6/6/2014T23:5:1 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 177 - -{"observations":[{"value":"6505,10323","timestamp":"6/6/2014T23:3:1"},{"value":"6503,10308","timestamp":"6/6/2014T23:4:1"},{"value":"6505,10304","timestamp":"6/6/2014T23:5:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:5:1 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:5:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611077516 -main.c: Updating new time to 3611077516 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611077516 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 27728 B -buffer.c: Used memory: 6976 B -main.c: Time (absolute): 3611077516 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611077560 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077561 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077561 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:6:1 -ntp.c: Writing timestamp... -main.c: Data is: 39231,29016,6/6/2014T23:6:1 -ntp.c: Writing timestamp... -main.c: Data is: 6505,10300,6/6/2014T23:6:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:6:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:6:1 -main.c: Memory freed - main.c: Putting data: 39231,29016,6/6/2014T23:6:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39231,29016,6/6/2014T23:6:1 -main.c: Memory freed - main.c: Putting data: 6505,10300,6/6/2014T23:6:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6505,10300,6/6/2014T23:6:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27560 B -buffer.c: Used memory: 7144 B -main.c: Time (absolute): 3611077561 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611077620 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077621 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077621 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:7:1 -ntp.c: Writing timestamp... -main.c: Data is: 39230,29016,6/6/2014T23:7:1 -ntp.c: Writing timestamp... -main.c: Data is: 6505,10249,6/6/2014T23:7:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:7:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:7:1 -main.c: Memory freed - main.c: Putting data: 39230,29016,6/6/2014T23:7:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39230,29016,6/6/2014T23:7:1 -main.c: Memory freed - main.c: Putting data: 6505,10249,6/6/2014T23:7:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6505,10249,6/6/2014T23:7:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27416 B -buffer.c: Used memory: 7288 B -main.c: Time (absolute): 3611077621 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611077680 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077681 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077681 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:8:1 -ntp.c: Writing timestamp... -main.c: Data is: 39234,29014,6/6/2014T23:8:1 -ntp.c: Writing timestamp... -main.c: Data is: 6505,10276,6/6/2014T23:8:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:8:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:8:1 -main.c: Memory freed - main.c: Putting data: 39234,29014,6/6/2014T23:8:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39234,29014,6/6/2014T23:8:1 -main.c: Memory freed - main.c: Putting data: 6505,10276,6/6/2014T23:8:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6505,10276,6/6/2014T23:8:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:6:1 with length 21 -json.c: Preparing: 65542,6/6/2014T23:7:1 with length 21 -json.c: Preparing: 65542,6/6/2014T23:8:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 162 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:6:1"},{"value":"65542","timestamp":"6/6/2014T23:7:1"},{"value":"65542","timestamp":"6/6/2014T23:8:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39231,29016,6/6/2014T23:6:1 with length 27 -json.c: Preparing: 39230,29016,6/6/2014T23:7:1 with length 27 -json.c: Preparing: 39234,29014,6/6/2014T23:8:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"39231,29016","timestamp":"6/6/2014T23:6:1"},{"value":"39230,29016","timestamp":"6/6/2014T23:7:1"},{"value":"39234,29014","timestamp":"6/6/2014T23:8:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6505,10300,6/6/2014T23:6:1 with length 26 -json.c: Preparing: 6505,10249,6/6/2014T23:7:1 with length 26 -json.c: Preparing: 6505,10276,6/6/2014T23:8:1 with length 26 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 177 - -{"observations":[{"value":"6505,10300","timestamp":"6/6/2014T23:6:1"},{"value":"6505,10249","timestamp":"6/6/2014T23:7:1"},{"value":"6505,10276","timestamp":"6/6/2014T23:8:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:8:1 with length 20 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 65 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:8:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611077696 -main.c: Updating new time to 3611077696 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611077696 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 27560 B -buffer.c: Used memory: 7144 B -main.c: Time (absolute): 3611077696 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611077740 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077741 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077741 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:9:1 -ntp.c: Writing timestamp... -main.c: Data is: 39236,29016,6/6/2014T23:9:1 -ntp.c: Writing timestamp... -main.c: Data is: 6503,10233,6/6/2014T23:9:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:9:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:9:1 -main.c: Memory freed - main.c: Putting data: 39236,29016,6/6/2014T23:9:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39236,29016,6/6/2014T23:9:1 -main.c: Memory freed - main.c: Putting data: 6503,10233,6/6/2014T23:9:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6503,10233,6/6/2014T23:9:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27392 B -buffer.c: Used memory: 7312 B -main.c: Time (absolute): 3611077741 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611077800 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077801 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077801 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:10:1 -ntp.c: Writing timestamp... -main.c: Data is: 39232,29010,6/6/2014T23:10:1 -ntp.c: Writing timestamp... -main.c: Data is: 6503,10272,6/6/2014T23:10:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:10:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:10:1 -main.c: Memory freed - main.c: Putting data: 39232,29010,6/6/2014T23:10:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39232,29010,6/6/2014T23:10:1 -main.c: Memory freed - main.c: Putting data: 6503,10272,6/6/2014T23:10:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6503,10272,6/6/2014T23:10:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27256 B -buffer.c: Used memory: 7448 B -main.c: Time (absolute): 3611077801 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611077860 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion commđsensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077861 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077861 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:11:1 -ntp.c: Writing timestamp... -main.c: Data is: 39232,29010,6/6/2014T23:11:1 -ntp.c: Writing timestamp... -main.c: Data is: 6498,10280,6/6/2014T23:11:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:11:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:11:1 -main.c: Memory freed - main.c: Putting data: 39232,29010,6/6/2014T23:11:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39232,29010,6/6/2014T23:11:1 -main.c: Memory freed - main.c: Putting data: 6498,10280,6/6/2014T23:11:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6498,10280,6/6/2014T23:11:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:9:1 with length 21 -json.c: Preparing: 65542,6/6/2014T23:10:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:11:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 164 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:9:1"},{"value":"65542","timestamp":"6/6/2014T23:10:1"},{"value":"65542","timestamp":"6/6/2014T23:11:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39236,29016,6/6/2014T23:9:1 with length 27 -json.c: Preparing: 39232,29010,6/6/2014T23:10:1 with length 28 -json.c: Preparing: 39232,29010,6/6/2014T23:11:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 182 - -{"observations":[{"value":"39236,29016","timestamp":"6/6/2014T23:9:1"},{"value":"39232,29010","timestamp":"6/6/2014T23:10:1"},{"value":"39232,29010","timestamp":"6/6/2014T23:11:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6503,10233,6/6/2014T23:9:1 with length 26 -json.c: Preparing: 6503,10272,6/6/2014T23:10:1 with length 27 -json.c: Preparing: 6498,10280,6/6/2014T23:11:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 179 - -{"observations":[{"value":"6503,10233","timestamp":"6/6/2014T23:9:1"},{"value":"6503,10272","timestamp":"6/6/2014T23:10:1"},{"value":"6498,10280","timestamp":"6/6/2014T23:11:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:11:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:11:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611077876 -main.c: Updating new time to 3611077876 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611077876 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 27480 B -buffer.c: Used memory: 7224 B -main.c: Time (absolute): 3611077876 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611077920 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077921 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077921 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:12:1 -ntp.c: Writing timestamp... -main.c: Data is: 39240,29008,6/6/2014T23:12:1 -ntp.c: Writing timestamp... -main.c: Data is: 6499,10249,6/6/2014T23:12:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:12:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:12:1 -main.c: Memory freed - main.c: Putting data: 39240,29008,6/6/2014T23:12:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39240,29008,6/6/2014T23:12:1 -main.c: Memory freed - main.c: Putting data: 6499,10249,6/6/2014T23:12:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6499,10249,6/6/2014T23:12:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27312 B -buffer.c: Used memory: 7392 B -main.c: Time (absolute): 3611077921 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611077980 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611077981 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611077981 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:13:1 -ntp.c: Writing timestamp... -main.c: Data is: 39232,29007,6/6/2014T23:13:1 -ntp.c: Writing timestamp... -main.c: Data is: 6500,10241,6/6/2014T23:13:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:13:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:13:1 -main.c: Memory freed - main.c: Putting data: 39232,29007,6/6/2014T23:13:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39232,29007,6/6/2014T23:13:1 -main.c: Memory freed - main.c: Putting data: 6500,10241,6/6/2014T23:13:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6500,10241,6/6/2014T23:13:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27184 B -buffer.c: Used memory: 7520 B -main.c: Time (absolute): 3611077981 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611078040 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078041 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078041 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:14:1 -ntp.c: Writing timestamp... -main.c: Data is: 39239,29002,6/6/2014T23:14:1 -ntp.c: Writing timestamp... -main.c: Data is: 6500,10288,6/6/2014T23:14:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:14:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:14:1 -main.c: Memory freed - main.c: Putting data: 39239,29002,6/6/2014T23:14:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39239,29002,6/6/2014T23:14:1 -main.c: Memory freed - main.c: Putting data: 6500,10288,6/6/2014T23:14:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6500,10288,6/6/2014T23:14:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:12:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:13:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:14:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 165 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:12:1"},{"value":"65542","timestamp":"6/6/2014T23:13:1"},{"value":"65542","timestamp":"6/6/2014T23:14:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39240,29008,6/6/2014T23:12:1 with length 28 -json.c: Preparing: 39232,29007,6/6/2014T23:13:1 with length 28 -json.c: Preparing: 39239,29002,6/6/2014T23:14:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39240,29008","timestamp":"6/6/2014T23:12:1"},{"value":"39232,29007","timestamp":"6/6/2014T23:13:1"},{"value":"39239,29002","timestamp":"6/6/2014T23:14:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6499,10249,6/6/2014T23:12:1 with length 27 -json.c: Preparing: 6500,10241,6/6/2014T23:13:1 with length 27 -json.c: Preparing: 6500,10288,6/6/2014T23:14:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6499,10249","timestamp":"6/6/2014T23:12:1"},{"value":"6500,10241","timestamp":"6/6/2014T23:13:1"},{"value":"6500,10288","timestamp":"6/6/2014T23:14:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:14:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:14:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611078056 -main.c: Updating new time to 3611078056 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611078056 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 27416 B -buffer.c: Used memory: 7288 B -main.c: Time (absolute): 3611078056 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611078100 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078101 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078101 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:15:1 -ntp.c: Writing timestamp... -main.c: Data is: 39238,29000,6/6/2014T23:15:1 -ntp.c: Writing timestamp... -main.c: Data is: 6496,10182,6/6/2014T23:15:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:15:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:15:1 -main.c: Memory freed - main.c: Putting data: 39238,29000,6/6/2014T23:15:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39238,29000,6/6/2014T23:15:1 -main.c: Memory freed - main.c: Putting data: 6496,10182,6/6/2014T23:15:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6496,10182,6/6/2014T23:15:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27256 B -buffer.c: Used memory: 7448 B -main.c: Time (absolute): 3611078101 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611078160 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078161 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078161 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:16:1 -ntp.c: Writing timestamp... -main.c: Data is: 39238,29000,6/6/2014T23:16:1 -ntp.c: Writing timestamp... -main.c: Data is: 6494,10241,6/6/2014T23:16:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:16:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:16:1 -main.c: Memory freed - main.c: Putting data: 39238,29000,6/6/2014T23:16:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39238,29000,6/6/2014T23:16:1 -main.c: Memory freed - main.c: Putting data: 6494,10241,6/6/2014T23:16:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6494,10241,6/6/2014T23:16:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27112 B -buffer.c: Used memory: 7592 B -main.c: Time (absolute): 3611078161 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611078220 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078221 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078221 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:17:1 -ntp.c: Writing timestamp... -main.c: Data is: 39242,28996,6/6/2014T23:17:1 -ntp.c: Writing timestamp... -main.c: Data is: 6494,10241,6/6/2014T23:17:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:17:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:17:1 -main.c: Memory freed - main.c: Putting data: 39242,28996,6/6/2014T23:17:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39242,28996,6/6/2014T23:17:1 -main.c: Memory freed - main.c: Putting data: 6494,10241,6/6/2014T23:17:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6494,10241,6/6/2014T23:17:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:15:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:16:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:17:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 165 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:15:1"},{"value":"65542","timestamp":"6/6/2014T23:16:1"},{"value":"65542","timestamp":"6/6/2014T23:17:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39238,29000,6/6/2014T23:15:1 with length 28 -json.c: Preparing: 39238,29000,6/6/2014T23:16:1 with length 28 -json.c: Preparing: 39242,28996,6/6/2014T23:17:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39238,29000","timestamp":"6/6/2014T23:15:1"},{"value":"39238,29000","timestamp":"6/6/2014T23:16:1"},{"value":"39242,28996","timestamp":"6/6/2014T23:17:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6496,10182,6/6/2014T23:15:1 with length 27 -json.c: Preparing: 6494,10241,6/6/2014T23:16:1 with length 27 -json.c: Preparing: 6494,10241,6/6/2014T23:17:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6496,10182","timestamp":"6/6/2014T23:15:1"},{"value":"6494,10241","timestamp":"6/6/2014T23:16:1"},{"value":"6494,10241","timestamp":"6/6/2014T23:17:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:17:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:17:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611078236 -main.c: Updating new time to 3611078236 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611078236 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 27328 B -buffer.c: Used memory: 7376 B -main.c: Time (absolute): 3611078236 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611078280 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078281 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078281 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:18:1 -ntp.c: Writing timestamp... -main.c: Data is: 39240,29000,6/6/2014T23:18:1 -ntp.c: Writing timestamp... -main.c: Data is: 6492,10252,6/6/2014T23:18:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:18:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:18:1 -main.c: Memory freed - main.c: Putting data: 39240,29000,6/6/2014T23:18:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39240,29000,6/6/2014T23:18:1 -main.c: Memory freed - main.c: Putting data: 6492,10252,6/6/2014T23:18:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6492,10252,6/6/2014T23:18:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27168 B -buffer.c: Used memory: 7536 B -main.c: Time (absolute): 3611078281 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611078340 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078341 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078341 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:19:1 -ntp.c: Writing timestamp... -main.c: Data is: 39238,28996,6/6/2014T23:19:1 -ntp.c: Writing timestamp... -main.c: Data is: 6494,10205,6/6/2014T23:19:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:19:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:19:1 -main.c: Memory freed - main.c: Putting data: 39238,28996,6/6/2014T23:19:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39238,28996,6/6/2014T23:19:1 -main.c: Memory freed - main.c: Putting data: 6494,10205,6/6/2014T23:19:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6494,10205,6/6/2014T23:19:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 27024 B -buffer.c: Used memory: 7680 B -main.c: Time (absolute): 3611078341 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611078400 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078401 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078401 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:20:1 -ntp.c: Writing timestamp... -main.c: Data is: 39244,28992,6/6/2014T23:20:1 -ntp.c: Writing timestamp... -main.c: Data is: 6492,10241,6/6/2014T23:20:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:20:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:20:1 -main.c: Memory freed - main.c: Putting data: 39244,28992,6/6/2014T23:20:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39244,28992,6/6/2014T23:20:1 -main.c: Memory freed - main.c: Putting data: 6492,10241,6/6/2014T23:20:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6492,10241,6/6/2014T23:20:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:18:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:19:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:20:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 165 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:18:1"},{"value":"65542","timestamp":"6/6/2014T23:19:1"},{"value":"65542","timestamp":"6/6/2014T23:20:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39240,29000,6/6/2014T23:18:1 with length 28 -json.c: Preparing: 39238,28996,6/6/2014T23:19:1 with length 28 -json.c: Preparing: 39244,28992,6/6/2014T23:20:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39240,29000","timestamp":"6/6/2014T23:18:1"},{"value":"39238,28996","timestamp":"6/6/2014T23:19:1"},{"value":"39244,28992","timestamp":"6/6/2014T23:20:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6492,10252,6/6/2014T23:18:1 with length 27 -json.c: Preparing: 6494,10205,6/6/2014T23:19:1 with length 27 -json.c: Preparing: 6492,10241,6/6/2014T23:20:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6492,10252","timestamp":"6/6/2014T23:18:1"},{"value":"6494,10205","timestamp":"6/6/2014T23:19:1"},{"value":"6492,10241","timestamp":"6/6/2014T23:20:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:20:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:20:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611078416 -main.c: Updating new time to 3611078416 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611078416 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 27152 B -buffer.c: Used memory: 7552 B -main.c: Time (absolute): 3611078416 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611078460 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078461 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078461 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:21:1 -ntp.c: Writing timestamp... -main.c: Data is: 39242,28993,6/6/2014T23:21:1 -ntp.c: Writing timestamp... -main.c: Data is: 6492,10213,6/6/2014T23:21:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:21:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:21:1 -main.c: Memory freed - main.c: Putting data: 39242,28993,6/6/2014T23:21:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39242,28993,6/6/2014T23:21:1 -main.c: Memory freed - main.c: Putting data: 6492,10213,6/6/2014T23:21:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6492,10213,6/6/2014T23:21:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26992 B -buffer.c: Used memory: 7712 B -main.c: Time (absolute): 3611078461 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611078520 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078521 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078521 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:22:1 -ntp.c: Writing timestamp... -main.c: Data is: 39240,28992,6/6/2014T23:22:1 -ntp.c: Writing timestamp... -main.c: Data is: 6492,10221,6/6/2014T23:22:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:22:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:22:1 -main.c: Memory freed - main.c: Putting data: 39240,28992,6/6/2014T23:22:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39240,28992,6/6/2014T23:22:1 -main.c: Memory freed - main.c: Putting data: 6492,10221,6/6/2014T23:22:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6492,10221,6/6/2014T23:22:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26880 B -buffer.c: Used memory: 7824 B -main.c: Time (absolute): 3611078521 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611078580 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078581 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078581 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:23:1 -ntp.c: Writing timestamp... -main.c: Data is: 39243,28990,6/6/2014T23:23:1 -ntp.c: Writing timestamp... -main.c: Data is: 6491,10252,6/6/2014T23:23:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:23:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:23:1 -main.c: Memory freed - main.c: Putting data: 39243,28990,6/6/2014T23:23:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39243,28990,6/6/2014T23:23:1 -main.c: Memory freed - main.c: Putting data: 6491,10252,6/6/2014T23:23:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6491,10252,6/6/2014T23:23:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:21:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:22:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:23:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 165 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:21:1"},{"value":"65542","timestamp":"6/6/2014T23:22:1"},{"value":"65542","timestamp":"6/6/2014T23:23:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39242,28993,6/6/2014T23:21:1 with length 28 -json.c: Preparing: 39240,28992,6/6/2014T23:22:1 with length 28 -json.c: Preparing: 39243,28990,6/6/2014T23:23:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39242,28993","timestamp":"6/6/2014T23:21:1"},{"value":"39240,28992","timestamp":"6/6/2014T23:22:1"},{"value":"39243,28990","timestamp":"6/6/2014T23:23:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6492,10213,6/6/2014T23:21:1 with length 27 -json.c: Preparing: 6492,10221,6/6/2014T23:22:1 with length 27 -json.c: Preparing: 6491,10252,6/6/2014T23:23:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6492,10213","timestamp":"6/6/2014T23:21:1"},{"value":"6492,10221","timestamp":"6/6/2014T23:22:1"},{"value":"6491,10252","timestamp":"6/6/2014T23:23:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:23:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:23:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611078596 -main.c: Updating new time to 3611078596 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611078596 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 27088 B -buffer.c: Used memory: 7616 B -main.c: Time (absolute): 3611078596 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611078640 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078641 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078641 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:24:1 -ntp.c: Writing timestamp... -main.c: Data is: 39240,28988,6/6/2014T23:24:1 -ntp.c: Writing timestamp... -main.c: Data is: 6489,10280,6/6/2014T23:24:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:24:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:24:1 -main.c: Memory freed - main.c: Putting data: 39240,28988,6/6/2014T23:24:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39240,28988,6/6/2014T23:24:1 -main.c: Memory freed - main.c: Putting data: 6489,10280,6/6/2014T23:24:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6489,10280,6/6/2014T23:24:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26928 B -buffer.c: Used memory: 7776 B -main.c: Time (absolute): 3611078641 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611078700 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078701 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078701 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:25:1 -ntp.c: Writing timestamp... -main.c: Data is: 39242,28988,6/6/2014T23:25:1 -ntp.c: Writing timestamp... -main.c: Data is: 6488,10331,6/6/2014T23:25:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:25:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:25:1 -main.c: Memory freed - main.c: Putting data: 39242,28988,6/6/2014T23:25:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39242,28988,6/6/2014T23:25:1 -main.c: Memory freed - main.c: Putting data: 6488,10331,6/6/2014T23:25:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6488,10331,6/6/2014T23:25:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26792 B -buffer.c: Used memory: 7912 B -main.c: Time (absolute): 3611078701 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611078760 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078760 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611078760 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:26:0 -ntp.c: Writing timestamp... -main.c: Data is: 39240,28984,6/6/2014T23:26:0 -ntp.c: Writing timestamp... -main.c: Data is: 6487,10304,6/6/2014T23:26:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:26:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:26:0 -main.c: Memory freed - main.c: Putting data: 39240,28984,6/6/2014T23:26:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39240,28984,6/6/2014T23:26:0 -main.c: Memory freed - main.c: Putting data: 6487,10304,6/6/2014T23:26:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6487,10304,6/6/2014T23:26:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:24:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:25:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:26:0 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 165 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:24:1"},{"value":"65542","timestamp":"6/6/2014T23:25:1"},{"value":"65542","timestamp":"6/6/2014T23:26:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39240,28988,6/6/2014T23:24:1 with length 28 -json.c: Preparing: 39242,28988,6/6/2014T23:25:1 with length 28 -json.c: Preparing: 39240,28984,6/6/2014T23:26:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39240,28988","timestamp":"6/6/2014T23:24:1"},{"value":"39242,28988","timestamp":"6/6/2014T23:25:1"},{"value":"39240,28984","timestamp":"6/6/2014T23:26:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6489,10280,6/6/2014T23:24:1 with length 27 -json.c: Preparing: 6488,10331,6/6/2014T23:25:1 with length 27 -json.c: Preparing: 6487,10304,6/6/2014T23:26:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6489,10280","timestamp":"6/6/2014T23:24:1"},{"value":"6488,10331","timestamp":"6/6/2014T23:25:1"},{"value":"6487,10304","timestamp":"6/6/2014T23:26:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:26:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:26:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611078777 -main.c: Updating new time to 3611078777 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611078777 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -buffer.c: Checking available memory... -buffer.c: Available memory: 27000 B -buffer.c: Used memory: 7704 B -main.c: Time (absolute): 3611078777 -Time LONG_PERIOD: 51 -Time SHORT_PERIOD: 17 -timer-loop.c: Time to sleep! for 43 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611078820 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078821 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078821 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:27:1 -ntp.c: Writing timestamp... -main.c: Data is: 39242,28984,6/6/2014T23:27:1 -ntp.c: Writing timestamp... -main.c: Data is: 6484,10252,6/6/2014T23:27:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:27:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:27:1 -main.c: Memory freed - main.c: Putting data: 39242,28984,6/6/2014T23:27:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39242,28984,6/6/2014T23:27:1 -main.c: Memory freed - main.c: Putting data: 6484,10252,6/6/2014T23:27:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6484,10252,6/6/2014T23:27:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26848 B -buffer.c: Used memory: 7856 B -main.c: Time (absolute): 3611078821 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611078880 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078881 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611078881 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:28:1 -ntp.c: Writing timestamp... -main.c: Data is: 39242,28989,6/6/2014T23:28:1 -ntp.c: Writing timestamp... -main.c: Data is: 6485,10260,6/6/2014T23:28:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:28:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:28:1 -main.c: Memory freed - main.c: Putting data: 39242,28989,6/6/2014T23:28:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39242,28989,6/6/2014T23:28:1 -main.c: Memory freed - main.c: Putting data: 6485,10260,6/6/2014T23:28:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6485,10260,6/6/2014T23:28:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26720 B -buffer.c: Used memory: 7984 B -main.c: Time (absolute): 3611078881 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611078940 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611078940 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611078940 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:29:0 -ntp.c: Writing timestamp... -main.c: Data is: 39241,28990,6/6/2014T23:29:0 -ntp.c: Writing timestamp... -main.c: Data is: 6498,10315,6/6/2014T23:29:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:29:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:29:0 -main.c: Memory freed - main.c: Putting data: 39241,28990,6/6/2014T23:29:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39241,28990,6/6/2014T23:29:0 -main.c: Memory freed - main.c: Putting data: 6498,10315,6/6/2014T23:29:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6498,10315,6/6/2014T23:29:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:27:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:28:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:29:0 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 165 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:27:1"},{"value":"65542","timestamp":"6/6/2014T23:28:1"},{"value":"65542","timestamp":"6/6/2014T23:29:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39242,28984,6/6/2014T23:27:1 with length 28 -json.c: Preparing: 39242,28989,6/6/2014T23:28:1 with length 28 -json.c: Preparing: 39241,28990,6/6/2014T23:29:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39242,28984","timestamp":"6/6/2014T23:27:1"},{"value":"39242,28989","timestamp":"6/6/2014T23:28:1"},{"value":"39241,28990","timestamp":"6/6/2014T23:29:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6484,10252,6/6/2014T23:27:1 with length 27 -json.c: Preparing: 6485,10260,6/6/2014T23:28:1 with length 27 -json.c: Preparing: 6498,10315,6/6/2014T23:29:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6484,10252","timestamp":"6/6/2014T23:27:1"},{"value":"6485,10260","timestamp":"6/6/2014T23:28:1"},{"value":"6498,10315","timestamp":"6/6/2014T23:29:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:29:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:29:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: [ERROR] Netconn receive failed with -3 -main.c: [ERROR] NTP query FAILED -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611078940 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -buffer.c: Checking available memory... -buffer.c: Available memory: 26928 B -buffer.c: Used memory: 7776 B -main.c: Time (absolute): 3611078940 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611079000 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079000 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611079000 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:30:0 -ntp.c: Writing timestamp... -main.c: Data is: 39234,28988,6/6/2014T23:30:0 -ntp.c: Writing timestamp... -main.c: Data is: 6494,10292,6/6/2014T23:30:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:30:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:30:0 -main.c: Memory freed - main.c: Putting data: 39234,28988,6/6/2014T23:30:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39234,28988,6/6/2014T23:30:0 -main.c: Memory freed - main.c: Putting data: 6494,10292,6/6/2014T23:30:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6494,10292,6/6/2014T23:30:0 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26776 B -buffer.c: Used memory: 7928 B -main.c: Time (absolute): 3611079000 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -timer-loop.c: Time to sleep! for 60 seconds -main.c: Time (absolute): 3611079061 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 05 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079061 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079061 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65541,6/6/2014T23:31:1 -ntp.c: Writing timestamp... -main.c: Data is: 39238,28989,6/6/2014T23:31:1 -ntp.c: Writing timestamp... -main.c: Data is: 6492,10319,6/6/2014T23:31:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65541,6/6/2014T23:31:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65541,6/6/2014T23:31:1 -main.c: Memory freed - main.c: Putting data: 39238,28989,6/6/2014T23:31:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39238,28989,6/6/2014T23:31:1 -main.c: Memory freed - main.c: Putting data: 6492,10319,6/6/2014T23:31:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6492,10319,6/6/2014T23:31:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26664 B -buffer.c: Used memory: 8040 B -main.c: Time (absolute): 3611079061 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611079120 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079121 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079121 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:32:1 -ntp.c: Writing timestamp... -main.c: Data is: 39240,28992,6/6/2014T23:32:1 -ntp.c: Writing timestamp... -main.c: Data is: 6498,10300,6/6/2014T23:32:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:32:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:32:1 -main.c: Memory freed - main.c: Putting data: 39240,28992,6/6/2014T23:32:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39240,28992,6/6/2014T23:32:1 -main.c: Memory freed - main.c: Putting data: 6498,10300,6/6/2014T23:32:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6498,10300,6/6/2014T23:32:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:30:0 with length 22 -json.c: Preparing: 65541,6/6/2014T23:31:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:32:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 165 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:30:0"},{"value":"65541","timestamp":"6/6/2014T23:31:1"},{"value":"65542","timestamp":"6/6/2014T23:32:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39234,28988,6/6/2014T23:30:0 with length 28 -json.c: Preparing: 39238,28989,6/6/2014T23:31:1 with length 28 -json.c: Preparing: 39240,28992,6/6/2014T23:32:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39234,28988","timestamp":"6/6/2014T23:30:0"},{"value":"39238,28989","timestamp":"6/6/2014T23:31:1"},{"value":"39240,28992","timestamp":"6/6/2014T23:32:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6494,10292,6/6/2014T23:30:0 with length 27 -json.c: Preparing: 6492,10319,6/6/2014T23:31:1 with length 27 -json.c: Preparing: 6498,10300,6/6/2014T23:32:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6494,10292","timestamp":"6/6/2014T23:30:0"},{"value":"6492,10319","timestamp":"6/6/2014T23:31:1"},{"value":"6498,10300","timestamp":"6/6/2014T23:32:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:32:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:32:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611079157 -main.c: Updating new time to 3611079157 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611079157 -Time LONG_PERIOD: 111 -Time SHORT_PERIOD: 37 -buffer.c: Checking available memory... -buffer.c: Available memory: 26856 B -buffer.c: Used memory: 7848 B -main.c: Time (absolute): 3611079157 -Time LONG_PERIOD: 111 -Time SHORT_PERIOD: 37 -timer-loop.c: Time to sleep! for 23 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611079180 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079181 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079181 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:33:1 -ntp.c: Writing timestamp... -main.c: Data is: 39235,28994,6/6/2014T23:33:1 -ntp.c: Writing timestamp... -main.c: Data is: 6500,10308,6/6/2014T23:33:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:33:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:33:1 -main.c: Memory freed - main.c: Putting data: 39235,28994,6/6/2014T23:33:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39235,28994,6/6/2014T23:33:1 -main.c: Memory freed - main.c: Putting data: 6500,10308,6/6/2014T23:33:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6500,10308,6/6/2014T23:33:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26696 B -buffer.c: Used memory: 8008 B -main.c: Time (absolute): 3611079181 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611079240 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 07 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079241 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079241 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65543,6/6/2014T23:34:1 -ntp.c: Writing timestamp... -main.c: Data is: 39230,28994,6/6/2014T23:34:1 -ntp.c: Writing timestamp... -main.c: Data is: 6500,10300,6/6/2014T23:34:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65543,6/6/2014T23:34:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65543,6/6/2014T23:34:1 -main.c: Memory freed - main.c: Putting data: 39230,28994,6/6/2014T23:34:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39230,28994,6/6/2014T23:34:1 -main.c: Memory freed - main.c: Putting data: 6500,10300,6/6/2014T23:34:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6500,10300,6/6/2014T23:34:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26576 B -buffer.c: Used memory: 8128 B -main.c: Time (absolute): 3611079241 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611079300 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 07 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079301 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079301 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65543,6/6/2014T23:35:1 -ntp.c: Writing timestamp... -main.c: Data is: 39229,28997,6/6/2014T23:35:1 -ntp.c: Writing timestamp... -main.c: Data is: 6502,10300,6/6/2014T23:35:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65543,6/6/2014T23:35:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65543,6/6/2014T23:35:1 -main.c: Memory freed - main.c: Putting data: 39229,28997,6/6/2014T23:35:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39229,28997,6/6/2014T23:35:1 -main.c: Memory freed - main.c: Putting data: 6502,10300,6/6/2014T23:35:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6502,10300,6/6/2014T23:35:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:33:1 with length 22 -json.c: Preparing: 65543,6/6/2014T23:34:1 with length 22 -json.c: Preparing: 65543,6/6/2014T23:35:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 165 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:33:1"},{"value":"65543","timestamp":"6/6/2014T23:34:1"},{"value":"65543","timestamp":"6/6/2014T23:35:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 xô -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39235,28994,6/6/2014T23:33:1 with length 28 -json.c: Preparing: 39230,28994,6/6/2014T23:34:1 with length 28 -json.c: Preparing: 39229,28997,6/6/2014T23:35:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 183 - -{"observations":[{"value":"39235,28994","timestamp":"6/6/2014T23:33:1"},{"value":"39230,28994","timestamp":"6/6/2014T23:34:1"},{"value":"39229,28997","timestamp":"6/6/2014T23:35:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6500,10308,6/6/2014T23:33:1 with length 27 -json.c: Preparing: 6500,10300,6/6/2014T23:34:1 with length 27 -json.c: Preparing: 6502,10300,6/6/2014T23:35:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 180 - -{"observations":[{"value":"6500,10308","timestamp":"6/6/2014T23:33:1"},{"value":"6500,10300","timestamp":"6/6/2014T23:34:1"},{"value":"6502,10300","timestamp":"6/6/2014T23:35:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:35:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:35:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611079315 -main.c: Updating new time to 3611079315 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611079315 -Time LONG_PERIOD: 45 -Time SHORT_PERIOD: 15 -buffer.c: Checking available memory... -buffer.c: Available memory: 26776 B -buffer.c: Used memory: 7928 B -main.c: Time (absolute): 3611079315 -Time LONG_PERIOD: 45 -Time SHORT_PERIOD: 15 -timer-loop.c: Time to sleep! for 45 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611079360 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079361 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079361 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:36:1 -ntp.c: Writing timestamp... -main.c: Data is: 39230,29000,6/6/2014T23:36:1 -ntp.c: Writing timestamp... -main.c: Data is: 6503,10312,6/6/2014T23:36:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:36:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:36:1 -main.c: Memory freed - main.c: Putting data: 39230,29000,6/6/2014T23:36:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39230,29000,6/6/2014T23:36:1 -main.c: Memory freed - main.c: Putting data: 6503,10312,6/6/2014T23:36:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6503,10312,6/6/2014T23:36:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26616 B -buffer.c: Used memory: 8088 B -main.c: Time (absolute): 3611079361 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611079420 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 04 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079421 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079421 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65540,6/6/2014T23:37:1 -ntp.c: Writing timestamp... -main.c: Data is: 39225,29000,6/6/2014T23:37:1 -ntp.c: Writing timestamp... -main.c: Data is: 6507,10367,6/6/2014T23:37:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65540,6/6/2014T23:37:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65540,6/6/2014T23:37:1 -main.c: Memory freed - main.c: Putting data: 39225,29000,6/6/2014T23:37:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39225,29000,6/6/2014T23:37:1 -main.c: Memory freed - main.c: Putting data: 6507,10367,6/6/2014T23:37:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6507,10367,6/6/2014T23:37:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26496 B -buffer.c: Used memory: 8208 B -buffer.c: [WARNING] Soft limit reached -main.c: --------------SOFT LIMIT------------- -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:36:1 with length 22 -json.c: Preparing: 65540,6/6/2014T23:37:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 116 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:36:1"},{"value":"65540","timestamp":"6/6/2014T23:37:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39230,29000,6/6/2014T23:36:1 with length 28 -json.c: Preparing: 39225,29000,6/6/2014T23:37:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 128 - -{"observations":[{"value":"39230,29000","timestamp":"6/6/2014T23:36:1"},{"value":"39225,29000","timestamp":"6/6/2014T23:37:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6503,10312,6/6/2014T23:36:1 with length 27 -json.c: Preparing: 6507,10367,6/6/2014T23:37:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 126 - -{"observations":[{"value":"6503,10312","timestamp":"6/6/2014T23:36:1"},{"value":"6507,10367","timestamp":"6/6/2014T23:37:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:37:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:37:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: Time (absolute): 3611079428 -Time LONG_PERIOD: 24 -Time SHORT_PERIOD: 8 -timer-loop.c: Time to sleep! for 52 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611079447 -Time LONG_PERIOD: 81 -Time SHORT_PERIOD: 27 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079448 -Time LONG_PERIOD: 84 -Time SHORT_PERIOD: 28 -main.c: Timestamp (absolute): 3611079448 -Timestamp LONG_PERIOD: 84 -Timestamp SHORT_PERIOD: 28 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:37:28 -ntp.c: Writing timestamp... -main.c: Data is: 39223,29002,6/6/2014T23:37:28 -ntp.c: Writing timestamp... -main.c: Data is: 6507,10351,6/6/2014T23:37:28 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:37:28 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:37:28 -main.c: Memory freed - main.c: Putting data: 39223,29002,6/6/2014T23:37:28 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39223,29002,6/6/2014T23:37:28 -main.c: Memory freed - main.c: Putting data: 6507,10351,6/6/2014T23:37:28 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6507,10351,6/6/2014T23:37:28 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:37:28 with length 23 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 68 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:37:28"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39223,29002,6/6/2014T23:37:28 with length 29 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 74 - -{"observations":[{"value":"39223,29002","timestamp":"6/6/2014T23:37:28"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6507,10351,6/6/2014T23:37:28 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 73 - -{"observations":[{"value":"6507,10351","timestamp":"6/6/2014T23:37:28"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:37:28 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 67 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:37:28"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611079496 -main.c: Updating new time to 3611079496 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611079496 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 26704 B -buffer.c: Used memory: 8000 B -main.c: Time (absolute): 3611079496 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611079540 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079541 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079541 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:39:1 -ntp.c: Writing timestamp... -main.c: Data is: 39224,29004,6/6/2014T23:39:1 -ntp.c: Writing timestamp... -main.c: Data is: 6509,10351,6/6/2014T23:39:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:39:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:39:1 -main.c: Memory freed - main.c: Putting data: 39224,29004,6/6/2014T23:39:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39224,29004,6/6/2014T23:39:1 -main.c: Memory freed - main.c: Putting data: 6509,10351,6/6/2014T23:39:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6509,10351,6/6/2014T23:39:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26544 B -buffer.c: Used memory: 8160 B -main.c: Time (absolute): 3611079541 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -timer-loop.c: Time to sleep! for 59 seconds -main.c: Time (absolute): 3611079600 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079601 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079601 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:40:1 -ntp.c: Writing timestamp... -main.c: Data is: 39224,29003,6/6/2014T23:40:1 -ntp.c: Writing timestamp... -main.c: Data is: 6510,10394,6/6/2014T23:40:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:40:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:40:1 -main.c: Memory freed - main.c: Putting data: 39224,29003,6/6/2014T23:40:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39224,29003,6/6/2014T23:40:1 -main.c: Memory freed - main.c: Putting data: 6510,10394,6/6/2014T23:40:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6510,10394,6/6/2014T23:40:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26432 B -buffer.c: Used memory: 8272 B -buffer.c: [WARNING] Soft limit reached -main.c: --------------SOFT LIMIT------------- -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:39:1 with length 22 -json.c: Preparing: 65542,6/6/2014T23:40:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 116 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:39:1"},{"value":"65542","timestamp":"6/6/2014T23:40:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39224,29004,6/6/2014T23:39:1 with length 28 -json.c: Preparing: 39224,29003,6/6/2014T23:40:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 128 - -{"observations":[{"value":"39224,29004","timestamp":"6/6/2014T23:39:1"},{"value":"39224,29003","timestamp":"6/6/2014T23:40:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6509,10351,6/6/2014T23:39:1 with length 27 -json.c: Preparing: 6510,10394,6/6/2014T23:40:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 126 - -{"observations":[{"value":"6509,10351","timestamp":"6/6/2014T23:39:1"},{"value":"6510,10394","timestamp":"6/6/2014T23:40:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:40:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:40:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: Time (absolute): 3611079608 -Time LONG_PERIOD: 24 -Time SHORT_PERIOD: 8 -timer-loop.c: Time to sleep! for 52 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611079660 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079661 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079661 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:41:1 -ntp.c: Writing timestamp... -main.c: Data is: 39226,29002,6/6/2014T23:41:1 -ntp.c: Writing timestamp... -main.c: Data is: 6509,10430,6/6/2014T23:41:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:41:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:41:1 -main.c: Memory freed - main.c: Putting data: 39226,29002,6/6/2014T23:41:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39226,29002,6/6/2014T23:41:1 -main.c: Memory freed - main.c: Putting data: 6509,10430,6/6/2014T23:41:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6509,10430,6/6/2014T23:41:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:41:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 67 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:41:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39226,29002,6/6/2014T23:41:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 73 - -{"observations":[{"value":"39226,29002","timestamp":"6/6/2014T23:41:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6509,10430,6/6/2014T23:41:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 72 - -{"observations":[{"value":"6509,10430","timestamp":"6/6/2014T23:41:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:41:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:41:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611079676 -main.c: Updating new time to 3611079676 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611079676 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 26624 B -buffer.c: Used memory: 8080 B -main.c: Time (absolute): 3611079676 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611079720 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079721 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079721 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:42:1 -ntp.c: Writing timestamp... -main.c: Data is: 39226,29004,6/6/2014T23:42:1 -ntp.c: Writing timestamp... -main.c: Data is: 6509,10433,6/6/2014T23:42:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:42:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:42:1 -main.c: Memory freed - main.c: Putting data: 39226,29004,6/6/2014T23:42:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39226,29004,6/6/2014T23:42:1 -main.c: Memory freed - main.c: Putting data: 6509,10433,6/6/2014T23:42:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6509,10433,6/6/2014T23:42:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26464 B -buffer.c: Used memory: 8240 B -buffer.c: [WARNING] Soft limit reached -main.c: --------------SOFT LIMIT------------- -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:42:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 67 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:42:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39226,29004,6/6/2014T23:42:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 73 - -{"observations":[{"value":"39226,29004","timestamp":"6/6/2014T23:42:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6509,10433,6/6/2014T23:42:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 72 - -{"observations":[{"value":"6509,10433","timestamp":"6/6/2014T23:42:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:42:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:42:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: Time (absolute): 3611079728 -Time LONG_PERIOD: 24 -Time SHORT_PERIOD: 8 -timer-loop.c: Time to sleep! for 52 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611079780 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079781 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079781 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:43:1 -ntp.c: Writing timestamp... -main.c: Data is: 39224,29007,6/6/2014T23:43:1 -ntp.c: Writing timestamp... -main.c: Data is: 6509,10406,6/6/2014T23:43:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:43:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:43:1 -main.c: Memory freed - main.c: Putting data: 39224,29007,6/6/2014T23:43:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39224,29007,6/6/2014T23:43:1 -main.c: Memory freed - main.c: Putting data: 6509,10406,6/6/2014T23:43:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6509,10406,6/6/2014T23:43:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26328 B -buffer.c: Used memory: 8376 B -buffer.c: [WARNING] Soft limit reached -main.c: --------------SOFT LIMIT------------- -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:43:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 67 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:43:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39224,29007,6/6/2014T23:43:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 73 - -{"observations":[{"value":"39224,29007","timestamp":"6/6/2014T23:43:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6509,10406,6/6/2014T23:43:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 72 - -{"observations":[{"value":"6509,10406","timestamp":"6/6/2014T23:43:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:43:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:43:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: Time (absolute): 3611079788 -Time LONG_PERIOD: 24 -Time SHORT_PERIOD: 8 -timer-loop.c: Time to sleep! for 52 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611079840 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079841 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079841 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:44:1 -ntp.c: Writing timestamp... -main.c: Data is: 39222,29008,6/6/2014T23:44:1 -ntp.c: Writing timestamp... -main.c: Data is: 6510,10453,6/6/2014T23:44:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:44:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:44:1 -main.c: Memory freed - main.c: Putting data: 39222,29008,6/6/2014T23:44:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39222,29008,6/6/2014T23:44:1 -main.c: Memory freed - main.c: Putting data: 6510,10453,6/6/2014T23:44:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6510,10453,6/6/2014T23:44:1 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:44:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 67 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:44:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39222,29008,6/6/2014T23:44:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 73 - -{"observations":[{"value":"39222,29008","timestamp":"6/6/2014T23:44:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6510,10453,6/6/2014T23:44:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 72 - -{"observations":[{"value":"6510,10453","timestamp":"6/6/2014T23:44:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:44:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:44:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611079856 -main.c: Updating new time to 3611079856 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611079856 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 26536 B -buffer.c: Used memory: 8168 B -main.c: Time (absolute): 3611079856 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611079900 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079901 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079901 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:45:1 -ntp.c: Writing timestamp... -main.c: Data is: 39221,29009,6/6/2014T23:45:1 -ntp.c: Writing timestamp... -main.c: Data is: 6510,10367,6/6/2014T23:45:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:45:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:45:1 -main.c: Memory freed - main.c: Putting data: 39221,29009,6/6/2014T23:45:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39221,29009,6/6/2014T23:45:1 -main.c: Memory freed - main.c: Putting data: 6510,10367,6/6/2014T23:45:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6510,10367,6/6/2014T23:45:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26368 B -buffer.c: Used memory: 8336 B -buffer.c: [WARNING] Soft limit reached -main.c: --------------SOFT LIMIT------------- -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:45:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 67 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:45:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39221,29009,6/6/2014T23:45:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 73 - -{"observations":[{"value":"39221,29009","timestamp":"6/6/2014T23:45:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6510,10367,6/6/2014T23:45:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 72 - -{"observations":[{"value":"6510,10367","timestamp":"6/6/2014T23:45:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:45:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:45:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: Time (absolute): 3611079908 -Time LONG_PERIOD: 24 -Time SHORT_PERIOD: 8 -timer-loop.c: Time to sleep! for 52 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611079960 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 05 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611079961 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611079961 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65541,6/6/2014T23:46:1 -ntp.c: Writing timestamp... -main.c: Data is: 39222,29012,6/6/2014T23:46:1 -ntp.c: Writing timestamp... -main.c: Data is: 6514,10430,6/6/2014T23:46:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65541,6/6/2014T23:46:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65541,6/6/2014T23:46:1 -main.c: Memory freed - main.c: Putting data: 39222,29012,6/6/2014T23:46:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39222,29012,6/6/2014T23:46:1 -main.c: Memory freed - main.c: Putting data: 6514,10430,6/6/2014T23:46:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6514,10430,6/6/2014T23:46:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26248 B -buffer.c: Used memory: 8456 B -buffer.c: [WARNING] Soft limit reached -main.c: --------------SOFT LIMIT------------- -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65541,6/6/2014T23:46:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 67 - -{"observations":[{"value":"65541","timestamp":"6/6/2014T23:46:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39222,29012,6/6/2014T23:46:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 73 - -{"observations":[{"value":"39222,29012","timestamp":"6/6/2014T23:46:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6514,10430,6/6/2014T23:46:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 72 - -{"observations":[{"value":"6514,10430","timestamp":"6/6/2014T23:46:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:46:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:46:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: Time (absolute): 3611079968 -Time LONG_PERIOD: 24 -Time SHORT_PERIOD: 8 -timer-loop.c: Time to sleep! for 52 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611080020 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611080020 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611080020 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:47:0 -ntp.c: Writing timestamp... -main.c: Data is: 39224,29012,6/6/2014T23:47:0 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10422,6/6/2014T23:47:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:47:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:47:0 -main.c: Memory freed - main.c: Putting data: 39224,29012,6/6/2014T23:47:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39224,29012,6/6/2014T23:47:0 -main.c: Memory freed - main.c: Putting data: 6517,10422,6/6/2014T23:47:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10422,6/6/2014T23:47:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:47:0 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 67 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:47:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39224,29012,6/6/2014T23:47:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 73 - -{"observations":[{"value":"39224,29012","timestamp":"6/6/2014T23:47:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6517,10422,6/6/2014T23:47:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 72 - -{"observations":[{"value":"6517,10422","timestamp":"6/6/2014T23:47:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:47:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:47:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611080036 -main.c: Updating new time to 3611080036 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611080036 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 26552 B -buffer.c: Used memory: 8152 B -main.c: Time (absolute): 3611080036 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -timer-loop.c: Time to sleep! for 44 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611080080 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 05 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611080081 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611080081 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65541,6/6/2014T23:48:1 -ntp.c: Writing timestamp... -main.c: Data is: 39219,29016,6/6/2014T23:48:1 -ntp.c: Writing timestamp... -main.c: Data is: 6517,10398,6/6/2014T23:48:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65541,6/6/2014T23:48:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65541,6/6/2014T23:48:1 -main.c: Memory freed - main.c: Putting data: 39219,29016,6/6/2014T23:48:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39219,29016,6/6/2014T23:48:1 -main.c: Memory freed - main.c: Putting data: 6517,10398,6/6/2014T23:48:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6517,10398,6/6/2014T23:48:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26384 B -buffer.c: Used memory: 8320 B -buffer.c: [WARNING] Soft limit reached -main.c: --------------SOFT LIMIT------------- -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65541,6/6/2014T23:48:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 67 - -{"observations":[{"value":"65541","timestamp":"6/6/2014T23:48:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39219,29016,6/6/2014T23:48:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 73 - -{"observations":[{"value":"39219,29016","timestamp":"6/6/2014T23:48:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6517,10398,6/6/2014T23:48:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 72 - -{"observations":[{"value":"6517,10398","timestamp":"6/6/2014T23:48:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:48:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:48:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: Time (absolute): 3611080088 -Time LONG_PERIOD: 24 -Time SHORT_PERIOD: 8 -timer-loop.c: Time to sleep! for 52 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611080140 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611080141 -Time LONG_PERIOD: 3 -Time SHORT_PERIOD: 1 -main.c: Timestamp (absolute): 3611080141 -Timestamp LONG_PERIOD: 3 -Timestamp SHORT_PERIOD: 1 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:49:1 -ntp.c: Writing timestamp... -main.c: Data is: 39217,29016,6/6/2014T23:49:1 -ntp.c: Writing timestamp... -main.c: Data is: 6516,10433,6/6/2014T23:49:1 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:49:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:49:1 -main.c: Memory freed - main.c: Putting data: 39217,29016,6/6/2014T23:49:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39217,29016,6/6/2014T23:49:1 -main.c: Memory freed - main.c: Putting data: 6516,10433,6/6/2014T23:49:1 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6516,10433,6/6/2014T23:49:1 -main.c: Memory freed - main.c: Data is now in buffer - buffer.c: Checking available memory... -buffer.c: Available memory: 26272 B -buffer.c: Used memory: 8432 B -buffer.c: [WARNING] Soft limit reached -main.c: --------------SOFT LIMIT------------- -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:49:1 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 67 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:49:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39217,29016,6/6/2014T23:49:1 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 73 - -{"observations":[{"value":"39217,29016","timestamp":"6/6/2014T23:49:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6516,10433,6/6/2014T23:49:1 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 72 - -{"observations":[{"value":"6516,10433","timestamp":"6/6/2014T23:49:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:49:1 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:49:1"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: Time (absolute): 3611080148 -Time LONG_PERIOD: 24 -Time SHORT_PERIOD: 8 -timer-loop.c: Time to sleep! for 52 seconds -callbacks.c: WiFi Connect indication: Failed -main.c: Time (absolute): 3611080200 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -sensors.c: Collecting data... -sensors.c: Not freeing memory on index 0 -sensors.c: Fetching data from light sensor -sensors.c: [LIGHT] Sent power on command -sensors.c: [LIGHT] Sent start conversion command -sensors.c: [LIGHT] Sent stop conversion command -sensors.c: [LIGHT] Sent fetch command for CH1 -sensors.c: [LIGHT] Got low byte for CH1 -sensors.c: [LIGHT] Got high byte for CH1 -sensors.c: [LIGHT] Got ch1 -sensors.c: [LIGHT] Sent fetch command for CH0 -sensors.c: [LIGHT] Got low byte for CH0 -sensors.c: [LIGHT] Got high byte for CH0 -sensors.c: [LIGHT] Got ch0 -sensors.c: [LIGHT] CH1 = 01 -sensors.c: [LIGHT] CH0 = 06 -sensors.c: Not freeing memory on index 1 -sensors.c: Fetching data from pressure sensor -sensors.c: [PRESSURE] Initialized -sensors.c: [PRESSURE] Got high byte -sensors.c: [PRESSURE] Got low byte -sensors.c: [PRESSURE] Initialized temperature -sensors.c: [PRESSURE] Got temperature high byte -sensors.c: [PRESSURE] Got temperature low byte -sensors.c: Not freeing memory on index 2 -sensors.c: Fetching data from humidity and temperature sensor -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized temperature -sensors.c: [HUMIDITY_TEMP] Discarded first humidity byte -sensors.c: [HUMIDITY_TEMP] Discarded second humidity byte -sensors.c: [HUMIDITY_TEMP] Got temperature high byte -sensors.c: [HUMIDITY_TEMP] Got temperature low byte -sensors.c: [HUMIDITY_TEMP] Initializing sensor -sensors.c: [HUMIDITY_TEMP] Initialized humidity -sensors.c: [HUMIDITY_TEMP] Got humidity high byte -sensors.c: [HUMIDITY_TEMP] Got humidity low byte -sensors.c: Data collected -main.c: Time (absolute): 3611080200 -Time LONG_PERIOD: 0 -Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611080200 -Timestamp LONG_PERIOD: 0 -Timestamp SHORT_PERIOD: 0 -main.c: Timestamping data... -ntp.c: Writing timestamp... -main.c: Data is: 65542,6/6/2014T23:50:0 -ntp.c: Writing timestamp... -main.c: Data is: 39212,29014,6/6/2014T23:50:0 -ntp.c: Writing timestamp... -main.c: Data is: 6513,10422,6/6/2014T23:50:0 -main.c: Returning timestamped data... -main.c: Putting data in buffers... -main.c: Putting data: 65542,6/6/2014T23:50:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 65542,6/6/2014T23:50:0 -main.c: Memory freed - main.c: Putting data: 39212,29014,6/6/2014T23:50:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 39212,29014,6/6/2014T23:50:0 -main.c: Memory freed - main.c: Putting data: 6513,10422,6/6/2014T23:50:0 - buffer.c: Joining buffer... -buffer.c: Data copied -main.c: Message put: 6513,10422,6/6/2014T23:50:0 -main.c: Memory freed - main.c: Data is now in buffer - main.c: Programmed send cycle... -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Preparing: 65542,6/6/2014T23:50:0 with length 22 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 67 - -{"observations":[{"value":"65542","timestamp":"6/6/2014T23:50:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Preparing: 39212,29014,6/6/2014T23:50:0 with length 28 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 73 - -{"observations":[{"value":"39212,29014","timestamp":"6/6/2014T23:50:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Preparing: 6513,10422,6/6/2014T23:50:0 with length 27 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 72 - -{"observations":[{"value":"6513,10422","timestamp":"6/6/2014T23:50:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:50:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:50:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Requesting new NTP time... -ntp.c: Successfully got new time -ntp.c: Received timestamp 3611080216 -main.c: Updating new time to 3611080216 -main.c: Time updated -main.c: Disconnecting wifi... -main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611080216 -Time LONG_PERIOD: 48 -Time SHORT_PERIOD: 16 -buffer.c: Checking available memory... -buffer.c: Available memory: 26488 B -buffer.c: Used memory: 8216 B -buffer.c: [WARNING] Soft limit reached -main.c: --------------SOFT LIMIT------------- -main.c: Connecting wifi... -main.c: SSID = SERVER_WLAN -main.c: Wep key = TGW2YHNKT9TW -main.c: Passphrase = TGW2YHNKT9TW -main.c: User = -main.c: Password = -main.c: Encryption type = 4 -main.c: Geo Localization = 41.557255 2.096183 -main.c: WPA network detected -callbacks.c: WiFi Connect indication: Failed -callbacks.c: WiFi Connect indication: Connected -Connected to: 00:26:5B:D9:0D:18 -callbacks.c: IP: 192.168.0.47 -main.c: Sending buffer 0 -buffer.c: Preparing JSON statement... -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000139 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 18 - -{"observations":]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 1 -buffer.c: Preparing JSON statement... -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000177 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 18 - -{"observations":]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Sending buffer 2 -buffer.c: Preparing JSON statement... -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000127 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 18 - -{"observations":]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -buffer.c: Data sent successfully -main.c: Polling battery level... -adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] -ntp.c: Writing timestamp... -json.c: Preparing: 3300,6/6/2014T23:50:0 with length 21 -json.c: Server is lewis.upc.es -httpClient.c: Checking params -httpClient.c: Calculating header size -httpClient.c: Building request head -httpClient.c: Adding content to request string -httpClient.c: Packet: - -PUT /modularsense/wordpress/opendata/data/modularupload/00000100 HTTP/1.1 -Host: 147.83.39.240 -Content-Type: application/json; charset=UTF-8 -Content-Length: 66 - -{"observations":[{"value":"3300","timestamp":"6/6/2014T23:50:0"}]} - -httpClient.c: Setting connection -httpClient.c: Establishing connection -httpClient.c: Sending request -httpClient.c: Write returned: 0 -httpClient.c: Waiting for response -httpClient.c: Receive returned: 0 -httpClient.c: Response received. Let's parse the information -httpClient.c: Response code: 200 -json.c: Success: JSON_POST_OK -main.c: Disconnecting wifi... +buffer.c: Available memory: 33544 B +buffer.c: Used memory: 1160 B +main.c: Time (absolute): 3611098035 +Time LONG_PERIOD: 45 +Time SHORT_PERIOD: 15 +Failed diff --git a/Project/applications/smartcities/main.c b/Project/applications/smartcities/main.c index b998fda..0930c34 100644 --- a/Project/applications/smartcities/main.c +++ b/Project/applications/smartcities/main.c @@ -132,15 +132,19 @@ void put_buffers(char** buffers[],uint32_t ind[],uint32_t sizes[],char** cooked, buffers[i] = put_message(cooked[i], buffers[i] ,&ind[i],&sizes[i]); DBG("Message put: %s\r\n",buffers[i][ind[i]-1]); chHeapFree(cooked[i]); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,cooked[i],0x1B); DBG("Memory freed\n\r"); } DBG("Data is now in buffer\n\r"); + chHeapFree(cooked); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,cooked,0x1B); } char** timestamp_datas(char* value[],unsigned long timestamp, uint8_t* sensors) { DBG("Timestamping data...\r\n"); char** cooked_data; cooked_data = (char**) chHeapAlloc(NULL,sensors_length * sizeof(char*)); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,sensors_length * sizeof(char*),cooked_data,0x1B); Date t=getDate(timestamp); int i; for(i=0;iAC1); sprintf(str + strlen(str),"%u,",parameters->AC2); @@ -348,6 +351,7 @@ uint16_t get_pressure_temperature_data(void) char* pressure_value(uint16_t pressure, uint16_t temperature) { char *value = chHeapAlloc(NULL,11 + 1); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,12,value,0x1B); sprintf(value,"%u,%u",pressure,temperature); return value; } @@ -395,6 +399,7 @@ uint16_t get_temperature_data(void) char* temp_humidity_value(uint16_t temp, uint16_t humidity) { char *value = chHeapAlloc(NULL,11 + 1); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,12,value,0x1B); sprintf(value,"%u,%u",temp,humidity); return value; } @@ -411,6 +416,7 @@ uint32_t get_sound_data(void) char* sound_value(uint32_t sound) { char *value = chHeapAlloc(NULL,11 + 1); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,12,value,0x1B); sprintf(value,"%4u",(unsigned int)sound); return value; } @@ -429,6 +435,7 @@ uint32_t get_battery_data(void) char* battery_value(uint32_t battery) { char *value = chHeapAlloc(NULL,11 + 1); + printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,12,value,0x1B); sprintf(value,"%4u",(unsigned int)battery); return value; } @@ -444,6 +451,7 @@ void collectData(char* valueSensors[], uint8_t* sensors) { DBG_SENSORS("Freeing memory from previous entry on index %d\r\n",i); chHeapFree(valueSensors[i]); + printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,valueSensors[i],0x1B); } else {