diff --git a/Project/applications/smartcities/json.c b/Project/applications/smartcities/json.c index 92584b9..5d59675 100644 --- a/Project/applications/smartcities/json.c +++ b/Project/applications/smartcities/json.c @@ -157,7 +157,6 @@ uint8_t send_json(char* statement, uint32_t length, char* provider_ID, char* sen { URL = (char*) chHeapAlloc(NULL,1+strlen(SERVER_HOSTNAME)); strcpy(URL,SERVER_HOSTNAME); - URL[strlen(SERVER_HOSTNAME)] = '\0'; #ifdef SERVER_VANILLA //VANILLA SERVER (SENTILO) DBG_JSON("Server is vanilla\r\n") diff --git a/Project/applications/smartcities/logger/ttyS0.log b/Project/applications/smartcities/logger/ttyS0.log index 52a7066..bcd4b05 100644 --- a/Project/applications/smartcities/logger/ttyS0.log +++ b/Project/applications/smartcities/logger/ttyS0.log @@ -8,254 +8,274 @@ main.c: Encryption type = 4 main.c: Geo Localization = 41.557255 2.096183 main.c: WPA network detected -Connected +main.c: --------------WI-SENSE STARTED------------- +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.49 buffer.c: Checking available memory... buffer.c: Available memory: 33320 B buffer.c: Used memory: 1384 B -[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 +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: 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: 2 sensor detected... main.c: Requesting new NTP time... -main.c: Updating new time to 3611097704 +ntp.c: Successfully got new time +ntp.c: Received timestamp 3611129802 +main.c: Updating new time to 3611129802 main.c: Time updated main.c: Disconnecting wifi... main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -Failed -main.c: Time (absolute): 3611097720 +timer-loop.c: Time to sleep! for 18 seconds +callbacks.c: WiFi Connect indication: Failed +main.c: Time (absolute): 3611129820 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 +sensors.c: Collecting data... +sensors.c: Not freeing memory on index 0 +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 1 +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): 3611129820 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611097720 +main.c: Timestamp (absolute): 3611129820 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 +ntp.c: Writing timestamp... +main.c: Data is: 39259,28926,7/6/2014T13:37:0 +ntp.c: Writing timestamp... +main.c: Data is: 6446,9510,7/6/2014T13:37:0 main.c: Returning timestamped data... main.c: Putting data in buffers... -main.c: Putting data: 39172,29020,7/6/2014T4:42:0 +main.c: Putting data: 39259,28926,7/6/2014T13:37: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: 39172,29020,7/6/2014T4:42:0 -[FREE] Freed bytes from 2000F428 +main.c: Message put: 39259,28926,7/6/2014T13:37:0 main.c: Memory freed - main.c: Putting data: 6507,10252,7/6/2014T4:42:0 + main.c: Putting data: 6446,9510,7/6/2014T13:37: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: 6507,10252,7/6/2014T4:42:0 -[FREE] Freed bytes from 2000F450 +main.c: Message put: 6446,9510,7/6/2014T13:37:0 main.c: Memory freed main.c: Data is now in buffer buffer.c: Checking available memory... -buffer.c: Available memory: 33600 B -buffer.c: Used memory: 1104 B -main.c: Time (absolute): 3611097720 +buffer.c: Available memory: 33616 B +buffer.c: Used memory: 1088 B +main.c: Time (absolute): 3611129820 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Time (absolute): 3611097780 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611129880 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -[ALLOC] Allocated 12 bytes to 2000F400 -[ALLOC] Allocated 12 bytes to 2000F450 -main.c: Time (absolute): 3611097780 +sensors.c: Collecting data... +sensors.c: Not freeing memory on index 0 +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 1 +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): 3611129880 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611097780 +main.c: Timestamp (absolute): 3611129880 Timestamp LONG_PERIOD: 0 Timestamp SHORT_PERIOD: 0 main.c: Timestamping data... -[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 +ntp.c: Writing timestamp... +main.c: Data is: 39258,28928,7/6/2014T13:38:0 +ntp.c: Writing timestamp... +main.c: Data is: 6446,9530,7/6/2014T13:38:0 main.c: Returning timestamped data... main.c: Putting data in buffers... -main.c: Putting data: 39176,29013,7/6/2014T4:43:0 +main.c: Putting data: 39258,28928,7/6/2014T13:38: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: 39176,29013,7/6/2014T4:43:0 -[FREE] Freed bytes from 2000F4A0 +main.c: Message put: 39258,28928,7/6/2014T13:38:0 main.c: Memory freed - main.c: Putting data: 6506,10268,7/6/2014T4:43:0 + main.c: Putting data: 6446,9530,7/6/2014T13:38: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: 6506,10268,7/6/2014T4:43:0 -[FREE] Freed bytes from 2000F4C8 +main.c: Message put: 6446,9530,7/6/2014T13:38:0 main.c: Memory freed main.c: Data is now in buffer buffer.c: Checking available memory... -buffer.c: Available memory: 33488 B -buffer.c: Used memory: 1216 B -main.c: Time (absolute): 3611097780 +buffer.c: Available memory: 33536 B +buffer.c: Used memory: 1168 B +main.c: Time (absolute): 3611129880 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Time (absolute): 3611097840 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611129940 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -[ALLOC] Allocated 12 bytes to 2000F450 -[ALLOC] Allocated 12 bytes to 2000F4C8 -main.c: Time (absolute): 3611097840 +sensors.c: Collecting data... +sensors.c: Not freeing memory on index 0 +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 1 +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): 3611129940 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611097840 +main.c: Timestamp (absolute): 3611129940 Timestamp LONG_PERIOD: 0 Timestamp SHORT_PERIOD: 0 main.c: Timestamping data... -[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 +ntp.c: Writing timestamp... +main.c: Data is: 39261,28931,7/6/2014T13:39:0 +ntp.c: Writing timestamp... +main.c: Data is: 6448,9510,7/6/2014T13:39:0 main.c: Returning timestamped data... main.c: Putting data in buffers... -main.c: Putting data: 39184,29009,7/6/2014T4:44:0 +main.c: Putting data: 39261,28931,7/6/2014T13:39: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: 39184,29009,7/6/2014T4:44:0 -[FREE] Freed bytes from 2000F518 +main.c: Message put: 39261,28931,7/6/2014T13:39:0 main.c: Memory freed - main.c: Putting data: 6499,10193,7/6/2014T4:44:0 + main.c: Putting data: 6448,9510,7/6/2014T13:39: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: 6499,10193,7/6/2014T4:44:0 -[FREE] Freed bytes from 2000F540 +main.c: Message put: 6448,9510,7/6/2014T13:39:0 main.c: Memory freed main.c: Data is now in buffer main.c: Programmed send cycle... @@ -268,322 +288,825 @@ Timestamp SHORT_PERIOD: 0 main.c: Encryption type = 4 main.c: Geo Localization = 41.557255 2.096183 main.c: WPA network detected -Connected +callbacks.c: WiFi Connect indication: Connected Connected to: 00:26:5B:D9:0D:18 +callbacks.c: IP: 192.168.0.49 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 +json.c: Preparing: 39259,28926,7/6/2014T13:37:0 with length 28 +json.c: Preparing: 39258,28928,7/6/2014T13:38:0 with length 28 +json.c: Preparing: 39261,28931,7/6/2014T13: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":"39259,28926","timestamp":"7/6/2014T13:37:0"},{"value":"39258,28928","timestamp":"7/6/2014T13:38:0"},{"value":"39261,28931","timestamp":"7/6/2014T13: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 -[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 +json.c: Preparing: 6446,9510,7/6/2014T13:37:0 with length 26 +json.c: Preparing: 6446,9530,7/6/2014T13:38:0 with length 26 +json.c: Preparing: 6448,9510,7/6/2014T13:39: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":"6446,9510","timestamp":"7/6/2014T13:37:0"},{"value":"6446,9530","timestamp":"7/6/2014T13:38:0"},{"value":"6448,9510","timestamp":"7/6/2014T13: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 -[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 +adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] +ntp.c: Writing timestamp... +json.c: Preparing: 3300,7/6/2014T13: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":"7/6/2014T13: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... -main.c: Updating new time to 3611097855 +ntp.c: Successfully got new time +ntp.c: Received timestamp 3611129954 +main.c: Updating new time to 3611129954 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 +main.c: New NTP time (absolute): 3611129954 +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): 3611129954 +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): 3611130000 +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 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 1 +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): 3611130000 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611130000 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39262,28930,7/6/2014T13:40:0 +ntp.c: Writing timestamp... +main.c: Data is: 6449,9502,7/6/2014T13:40:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39262,28930,7/6/2014T13:40:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39262,28930,7/6/2014T13:40:0 +main.c: Memory freed + main.c: Putting data: 6449,9502,7/6/2014T13:40:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6449,9502,7/6/2014T13:40:0 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33512 B +buffer.c: Used memory: 1192 B +main.c: Time (absolute): 3611130000 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611130060 +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 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 1 +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): 3611130061 +Time LONG_PERIOD: 3 +Time SHORT_PERIOD: 1 +main.c: Timestamp (absolute): 3611130061 +Timestamp LONG_PERIOD: 3 +Timestamp SHORT_PERIOD: 1 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39261,28933,7/6/2014T13:41:1 +ntp.c: Writing timestamp... +main.c: Data is: 6448,9522,7/6/2014T13:41:1 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39261,28933,7/6/2014T13:41:1 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39261,28933,7/6/2014T13:41:1 +main.c: Memory freed + main.c: Putting data: 6448,9522,7/6/2014T13:41:1 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6448,9522,7/6/2014T13:41:1 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33424 B +buffer.c: Used memory: 1280 B +main.c: Time (absolute): 3611130061 +Time LONG_PERIOD: 3 +Time SHORT_PERIOD: 1 +timer-loop.c: Time to sleep! for 59 seconds +main.c: Time (absolute): 3611130120 +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 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 1 +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): 3611130120 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611130120 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39260,28932,7/6/2014T13:42:0 +ntp.c: Writing timestamp... +main.c: Data is: 6448,9300,7/6/2014T13:42:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39260,28932,7/6/2014T13:42:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39260,28932,7/6/2014T13:42:0 +main.c: Memory freed + main.c: Putting data: 6448,9300,7/6/2014T13:42:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6448,9300,7/6/2014T13:42: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.49 +main.c: Sending buffer 0 +buffer.c: Preparing JSON statement... +json.c: Preparing: 39262,28930,7/6/2014T13:40:0 with length 28 +json.c: Preparing: 39261,28933,7/6/2014T13:41:1 with length 28 +json.c: Preparing: 39260,28932,7/6/2014T13:42: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":"39262,28930","timestamp":"7/6/2014T13:40:0"},{"value":"39261,28933","timestamp":"7/6/2014T13:41:1"},{"value":"39260,28932","timestamp":"7/6/2014T13:42: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: 6449,9502,7/6/2014T13:40:0 with length 26 +json.c: Preparing: 6448,9522,7/6/2014T13:41:1 with length 26 +json.c: Preparing: 6448,9300,7/6/2014T13:42: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":"6449,9502","timestamp":"7/6/2014T13:40:0"},{"value":"6448,9522","timestamp":"7/6/2014T13:41:1"},{"value":"6448,9300","timestamp":"7/6/2014T13:42: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,7/6/2014T13:42: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":"7/6/2014T13:42: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 3611130136 +main.c: Updating new time to 3611130136 +main.c: Time updated +main.c: Disconnecting wifi... +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS +main.c: New NTP time (absolute): 3611130136 +Time LONG_PERIOD: 48 +Time SHORT_PERIOD: 16 buffer.c: Checking available memory... -buffer.c: Available memory: 33576 B -buffer.c: Used memory: 1128 B -main.c: Time (absolute): 3611097856 +buffer.c: Available memory: 33640 B +buffer.c: Used memory: 1064 B +main.c: Time (absolute): 3611130136 Time LONG_PERIOD: 48 Time SHORT_PERIOD: 16 -Failed -main.c: Time (absolute): 3611097900 +timer-loop.c: Time to sleep! for 44 seconds +callbacks.c: WiFi Connect indication: Failed +main.c: Time (absolute): 3611130180 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -[ALLOC] Allocated 12 bytes to 2000F328 -[ALLOC] Allocated 12 bytes to 2000F428 -main.c: Time (absolute): 3611097900 +sensors.c: Collecting data... +sensors.c: Not freeing memory on index 0 +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 1 +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): 3611130180 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611097900 +main.c: Timestamp (absolute): 3611130180 Timestamp LONG_PERIOD: 0 Timestamp SHORT_PERIOD: 0 main.c: Timestamping data... -[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 +ntp.c: Writing timestamp... +main.c: Data is: 39252,28933,7/6/2014T13:43:0 +ntp.c: Writing timestamp... +main.c: Data is: 6455,9391,7/6/2014T13:43:0 main.c: Returning timestamped data... main.c: Putting data in buffers... -main.c: Putting data: 39186,29010,7/6/2014T4:45:0 +main.c: Putting data: 39252,28933,7/6/2014T13:43: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: 39186,29010,7/6/2014T4:45:0 -[FREE] Freed bytes from 2000F440 +main.c: Message put: 39252,28933,7/6/2014T13:43:0 main.c: Memory freed - main.c: Putting data: 6498,10182,7/6/2014T4:45:0 + main.c: Putting data: 6455,9391,7/6/2014T13:43: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: 6498,10182,7/6/2014T4:45:0 -[FREE] Freed bytes from 2000F478 +main.c: Message put: 6455,9391,7/6/2014T13:43:0 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): 3611097900 +buffer.c: Available memory: 33512 B +buffer.c: Used memory: 1192 B +main.c: Time (absolute): 3611130180 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611130240 +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 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 1 +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): 3611130240 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611130240 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39254,28936,7/6/2014T13:44:0 +ntp.c: Writing timestamp... +main.c: Data is: 6457,9375,7/6/2014T13:44:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39254,28936,7/6/2014T13:44:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39254,28936,7/6/2014T13:44:0 +main.c: Memory freed + main.c: Putting data: 6457,9375,7/6/2014T13:44:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6457,9375,7/6/2014T13:44:0 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33432 B +buffer.c: Used memory: 1272 B +main.c: Time (absolute): 3611130240 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611130300 +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 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 1 +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): 3611130300 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611130300 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39252,28936,7/6/2014T13:45:0 +ntp.c: Writing timestamp... +main.c: Data is: 6456,9395,7/6/2014T13:45:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39252,28936,7/6/2014T13:45:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39252,28936,7/6/2014T13:45:0 +main.c: Memory freed + main.c: Putting data: 6456,9395,7/6/2014T13:45:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6456,9395,7/6/2014T13:45: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.49 +main.c: Sending buffer 0 +buffer.c: Preparing JSON statement... +json.c: Preparing: 39252,28933,7/6/2014T13:43:0 with length 28 +json.c: Preparing: 39254,28936,7/6/2014T13:44:0 with length 28 +json.c: Preparing: 39252,28936,7/6/2014T13:45: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":"39252,28933","timestamp":"7/6/2014T13:43:0"},{"value":"39254,28936","timestamp":"7/6/2014T13:44:0"},{"value":"39252,28936","timestamp":"7/6/2014T13:45: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: 6455,9391,7/6/2014T13:43:0 with length 26 +json.c: Preparing: 6457,9375,7/6/2014T13:44:0 with length 26 +json.c: Preparing: 6456,9395,7/6/2014T13:45: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":"6455,9391","timestamp":"7/6/2014T13:43:0"},{"value":"6457,9375","timestamp":"7/6/2014T13:44:0"},{"value":"6456,9395","timestamp":"7/6/2014T13:45: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,7/6/2014T13:45: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":"7/6/2014T13:45: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 3611130316 +main.c: Updating new time to 3611130316 +main.c: Time updated +main.c: Disconnecting wifi... +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS +main.c: New NTP time (absolute): 3611130316 +Time LONG_PERIOD: 48 +Time SHORT_PERIOD: 16 +buffer.c: Checking available memory... +buffer.c: Available memory: 33632 B +buffer.c: Used memory: 1072 B +main.c: Time (absolute): 3611130316 +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): 3611130360 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Time (absolute): 3611097960 +sensors.c: Collecting data... +sensors.c: Not freeing memory on index 0 +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 1 +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): 3611130361 +Time LONG_PERIOD: 3 +Time SHORT_PERIOD: 1 +main.c: Timestamp (absolute): 3611130361 +Timestamp LONG_PERIOD: 3 +Timestamp SHORT_PERIOD: 1 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39254,28936,7/6/2014T13:46:1 +ntp.c: Writing timestamp... +main.c: Data is: 6450,9363,7/6/2014T13:46:1 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39254,28936,7/6/2014T13:46:1 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39254,28936,7/6/2014T13:46:1 +main.c: Memory freed + main.c: Putting data: 6450,9363,7/6/2014T13:46:1 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6450,9363,7/6/2014T13:46:1 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33520 B +buffer.c: Used memory: 1184 B +main.c: Time (absolute): 3611130361 +Time LONG_PERIOD: 3 +Time SHORT_PERIOD: 1 +timer-loop.c: Time to sleep! for 59 seconds +main.c: Time (absolute): 3611130420 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -[ALLOC] Allocated 12 bytes to 2000F450 -[ALLOC] Allocated 12 bytes to 2000F478 -main.c: Time (absolute): 3611097960 +sensors.c: Collecting data... +sensors.c: Not freeing memory on index 0 +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 1 +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): 3611130420 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611097960 +main.c: Timestamp (absolute): 3611130420 Timestamp LONG_PERIOD: 0 Timestamp SHORT_PERIOD: 0 main.c: Timestamping data... -[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 +ntp.c: Writing timestamp... +main.c: Data is: 39251,28938,7/6/2014T13:47:0 +ntp.c: Writing timestamp... +main.c: Data is: 6449,9336,7/6/2014T13:47:0 main.c: Returning timestamped data... main.c: Putting data in buffers... -main.c: Putting data: 39180,29010,7/6/2014T4:46:0 +main.c: Putting data: 39251,28938,7/6/2014T13:47: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: 39180,29010,7/6/2014T4:46:0 -[FREE] Freed bytes from 2000F4C8 +main.c: Message put: 39251,28938,7/6/2014T13:47:0 main.c: Memory freed - main.c: Putting data: 6496,10162,7/6/2014T4:46:0 + main.c: Putting data: 6449,9336,7/6/2014T13:47: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: 6496,10162,7/6/2014T4:46:0 -[FREE] Freed bytes from 2000F4F0 +main.c: Message put: 6449,9336,7/6/2014T13:47:0 main.c: Memory freed main.c: Data is now in buffer buffer.c: Checking available memory... -buffer.c: Available memory: 33344 B -buffer.c: Used memory: 1360 B -main.c: Time (absolute): 3611097960 +buffer.c: Available memory: 33440 B +buffer.c: Used memory: 1264 B +main.c: Time (absolute): 3611130420 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Time (absolute): 3611098020 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611130480 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -[ALLOC] Allocated 12 bytes to 2000F478 -[ALLOC] Allocated 12 bytes to 2000F4F0 -main.c: Time (absolute): 3611098020 +sensors.c: Collecting data... +sensors.c: Not freeing memory on index 0 +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 1 +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): 3611130480 Time LONG_PERIOD: 0 Time SHORT_PERIOD: 0 -main.c: Timestamp (absolute): 3611098020 +main.c: Timestamp (absolute): 3611130480 Timestamp LONG_PERIOD: 0 Timestamp SHORT_PERIOD: 0 main.c: Timestamping data... -[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 +ntp.c: Writing timestamp... +main.c: Data is: 39250,28941,7/6/2014T13:48:0 +ntp.c: Writing timestamp... +main.c: Data is: 6450,9304,7/6/2014T13:48:0 main.c: Returning timestamped data... main.c: Putting data in buffers... -main.c: Putting data: 39184,29008,7/6/2014T4:47:0 +main.c: Putting data: 39250,28941,7/6/2014T13:48: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,29008,7/6/2014T4:47:0 -[FREE] Freed bytes from 2000FC20 +main.c: Message put: 39250,28941,7/6/2014T13:48:0 main.c: Memory freed - main.c: Putting data: 6500,10233,7/6/2014T4:47:0 + main.c: Putting data: 6450,9304,7/6/2014T13:48: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: 6500,10233,7/6/2014T4:47:0 -[FREE] Freed bytes from 2000FCC0 +main.c: Message put: 6450,9304,7/6/2014T13:48:0 main.c: Memory freed main.c: Data is now in buffer main.c: Programmed send cycle... @@ -596,179 +1119,1883 @@ Timestamp SHORT_PERIOD: 0 main.c: Encryption type = 4 main.c: Geo Localization = 41.557255 2.096183 main.c: WPA network detected -Connected +callbacks.c: WiFi Connect indication: Connected Connected to: 00:26:5B:D9:0D:18 +callbacks.c: IP: 192.168.0.49 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 +json.c: Preparing: 39254,28936,7/6/2014T13:46:1 with length 28 +json.c: Preparing: 39251,28938,7/6/2014T13:47:0 with length 28 +json.c: Preparing: 39250,28941,7/6/2014T13:48: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":"39254,28936","timestamp":"7/6/2014T13:46:1"},{"value":"39251,28938","timestamp":"7/6/2014T13:47:0"},{"value":"39250,28941","timestamp":"7/6/2014T13:48: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 -[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 +json.c: Preparing: 6450,9363,7/6/2014T13:46:1 with length 26 +json.c: Preparing: 6449,9336,7/6/2014T13:47:0 with length 26 +json.c: Preparing: 6450,9304,7/6/2014T13:48: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":"6450,9363","timestamp":"7/6/2014T13:46:1"},{"value":"6449,9336","timestamp":"7/6/2014T13:47:0"},{"value":"6450,9304","timestamp":"7/6/2014T13:48: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 -[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 +adc.c: Register value is 4095 [3300 milliVolts are currently given to gpio PA1] +ntp.c: Writing timestamp... +json.c: Preparing: 3300,7/6/2014T13:48: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":"7/6/2014T13:48: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... -main.c: Updating new time to 3611098035 +ntp.c: Successfully got new time +ntp.c: Received timestamp 3611130495 +main.c: Updating new time to 3611130495 main.c: Time updated main.c: Disconnecting wifi... main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS -main.c: New NTP time (absolute): 3611098035 +main.c: New NTP time (absolute): 3611130495 Time LONG_PERIOD: 45 Time SHORT_PERIOD: 15 buffer.c: Checking available memory... -buffer.c: Available memory: 33544 B -buffer.c: Used memory: 1160 B -main.c: Time (absolute): 3611098035 +buffer.c: Available memory: 33640 B +buffer.c: Used memory: 1064 B +main.c: Time (absolute): 3611130495 Time LONG_PERIOD: 45 Time SHORT_PERIOD: 15 -Failed +timer-loop.c: Time to sleep! for 45 seconds +callbacks.c: WiFi Connect indication: Failed +main.c: Time (absolute): 3611130540 +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 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 1 +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): 3611130540 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611130540 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39248,28941,7/6/2014T13:49:0 +ntp.c: Writing timestamp... +main.c: Data is: 6455,9288,7/6/2014T13:49:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39248,28941,7/6/2014T13:49:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39248,28941,7/6/2014T13:49:0 +main.c: Memory freed + main.c: Putting data: 6455,9288,7/6/2014T13:49:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6455,9288,7/6/2014T13:49:0 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33520 B +buffer.c: Used memory: 1184 B +main.c: Time (absolute): 3611130540 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611130600 +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 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 1 +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): 3611130600 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611130600 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39248,28943,7/6/2014T13:50:0 +ntp.c: Writing timestamp... +main.c: Data is: 6457,9268,7/6/2014T13:50:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39248,28943,7/6/2014T13:50:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39248,28943,7/6/2014T13:50:0 +main.c: Memory freed + main.c: Putting data: 6457,9268,7/6/2014T13:50:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6457,9268,7/6/2014T13:50:0 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33440 B +buffer.c: Used memory: 1264 B +main.c: Time (absolute): 3611130601 +Time LONG_PERIOD: 3 +Time SHORT_PERIOD: 1 +timer-loop.c: Time to sleep! for 59 seconds +main.c: Time (absolute): 3611130660 +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 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 1 +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): 3611130660 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611130660 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39248,28942,7/6/2014T13:51:0 +ntp.c: Writing timestamp... +main.c: Data is: 6456,9256,7/6/2014T13:51:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39248,28942,7/6/2014T13:51:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39248,28942,7/6/2014T13:51:0 +main.c: Memory freed + main.c: Putting data: 6456,9256,7/6/2014T13:51:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6456,9256,7/6/2014T13:51: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.49 +main.c: Sending buffer 0 +buffer.c: Preparing JSON statement... +json.c: Preparing: 39248,28941,7/6/2014T13:49:0 with length 28 +json.c: Preparing: 39248,28943,7/6/2014T13:50:0 with length 28 +json.c: Preparing: 39248,28942,7/6/2014T13:51: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":"39248,28941","timestamp":"7/6/2014T13:49:0"},{"value":"39248,28943","timestamp":"7/6/2014T13:50:0"},{"value":"39248,28942","timestamp":"7/6/2014T13:51: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: 6455,9288,7/6/2014T13:49:0 with length 26 +json.c: Preparing: 6457,9268,7/6/2014T13:50:0 with length 26 +json.c: Preparing: 6456,9256,7/6/2014T13:51: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":"6455,9288","timestamp":"7/6/2014T13:49:0"},{"value":"6457,9268","timestamp":"7/6/2014T13:50:0"},{"value":"6456,9256","timestamp":"7/6/2014T13:51: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,7/6/2014T13:51: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":"7/6/2014T13:51: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 3611130676 +main.c: Updating new time to 3611130676 +main.c: Time updated +main.c: Disconnecting wifi... +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS +main.c: New NTP time (absolute): 3611130676 +Time LONG_PERIOD: 48 +Time SHORT_PERIOD: 16 +buffer.c: Checking available memory... +buffer.c: Available memory: 33640 B +buffer.c: Used memory: 1064 B +main.c: Time (absolute): 3611130676 +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): 3611130720 +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 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 1 +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): 3611130720 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611130720 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39249,28941,7/6/2014T13:52:0 +ntp.c: Writing timestamp... +main.c: Data is: 6457,9272,7/6/2014T13:52:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39249,28941,7/6/2014T13:52:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39249,28941,7/6/2014T13:52:0 +main.c: Memory freed + main.c: Putting data: 6457,9272,7/6/2014T13:52:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6457,9272,7/6/2014T13:52:0 +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): 3611130720 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611130780 +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 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 1 +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): 3611130780 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611130780 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39249,28944,7/6/2014T13:53:0 +ntp.c: Writing timestamp... +main.c: Data is: 6455,9256,7/6/2014T13:53:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39249,28944,7/6/2014T13:53:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39249,28944,7/6/2014T13:53:0 +main.c: Memory freed + main.c: Putting data: 6455,9256,7/6/2014T13:53:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6455,9256,7/6/2014T13:53:0 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33448 B +buffer.c: Used memory: 1256 B +main.c: Time (absolute): 3611130780 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611130840 +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 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 1 +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): 3611130841 +Time LONG_PERIOD: 3 +Time SHORT_PERIOD: 1 +main.c: Timestamp (absolute): 3611130841 +Timestamp LONG_PERIOD: 3 +Timestamp SHORT_PERIOD: 1 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39250,28939,7/6/2014T13:54:1 +ntp.c: Writing timestamp... +main.c: Data is: 6453,9232,7/6/2014T13:54:1 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39250,28939,7/6/2014T13:54:1 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39250,28939,7/6/2014T13:54:1 +main.c: Memory freed + main.c: Putting data: 6453,9232,7/6/2014T13:54:1 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6453,9232,7/6/2014T13:54: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.49 +main.c: Sending buffer 0 +buffer.c: Preparing JSON statement... +json.c: Preparing: 39249,28941,7/6/2014T13:52:0 with length 28 +json.c: Preparing: 39249,28944,7/6/2014T13:53:0 with length 28 +json.c: Preparing: 39250,28939,7/6/2014T13:54: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":"39249,28941","timestamp":"7/6/2014T13:52:0"},{"value":"39249,28944","timestamp":"7/6/2014T13:53:0"},{"value":"39250,28939","timestamp":"7/6/2014T13:54: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: 6457,9272,7/6/2014T13:52:0 with length 26 +json.c: Preparing: 6455,9256,7/6/2014T13:53:0 with length 26 +json.c: Preparing: 6453,9232,7/6/2014T13:54: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":"6457,9272","timestamp":"7/6/2014T13:52:0"},{"value":"6455,9256","timestamp":"7/6/2014T13:53:0"},{"value":"6453,9232","timestamp":"7/6/2014T13:54: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€z0 +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,7/6/2014T13:54: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":"7/6/2014T13:54: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 3611130856 +main.c: Updating new time to 3611130856 +main.c: Time updated +main.c: Disconnecting wifi... +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS +main.c: New NTP time (absolute): 3611130856 +Time LONG_PERIOD: 48 +Time SHORT_PERIOD: 16 +buffer.c: Checking available memory... +buffer.c: Available memory: 33648 B +buffer.c: Used memory: 1056 B +main.c: Time (absolute): 3611130856 +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): 3611130900 +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 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 1 +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): 3611130901 +Time LONG_PERIOD: 3 +Time SHORT_PERIOD: 1 +main.c: Timestamp (absolute): 3611130901 +Timestamp LONG_PERIOD: 3 +Timestamp SHORT_PERIOD: 1 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39248,28943,7/6/2014T13:55:1 +ntp.c: Writing timestamp... +main.c: Data is: 6453,9244,7/6/2014T13:55:1 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39248,28943,7/6/2014T13:55:1 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39248,28943,7/6/2014T13:55:1 +main.c: Memory freed + main.c: Putting data: 6453,9244,7/6/2014T13:55:1 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6453,9244,7/6/2014T13:55:1 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33536 B +buffer.c: Used memory: 1168 B +main.c: Time (absolute): 3611130901 +Time LONG_PERIOD: 3 +Time SHORT_PERIOD: 1 +timer-loop.c: Time to sleep! for 59 seconds +main.c: Time (absolute): 3611130960 +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 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 1 +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): 3611130960 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611130960 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39247,28943,7/6/2014T13:56:0 +ntp.c: Writing timestamp... +main.c: Data is: 6455,9252,7/6/2014T13:56:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39247,28943,7/6/2014T13:56:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39247,28943,7/6/2014T13:56:0 +main.c: Memory freed + main.c: Putting data: 6455,9252,7/6/2014T13:56:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6455,9252,7/6/2014T13:56:0 +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): 3611130960 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611131020 +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 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 1 +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): 3611131020 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611131020 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39249,28946,7/6/2014T13:57:0 +ntp.c: Writing timestamp... +main.c: Data is: 6455,9197,7/6/2014T13:57:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39249,28946,7/6/2014T13:57:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39249,28946,7/6/2014T13:57:0 +main.c: Memory freed + main.c: Putting data: 6455,9197,7/6/2014T13:57:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6455,9197,7/6/2014T13:57: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.49 +main.c: Sending buffer 0 +buffer.c: Preparing JSON statement... +json.c: Preparing: 39248,28943,7/6/2014T13:55:1 with length 28 +json.c: Preparing: 39247,28943,7/6/2014T13:56:0 with length 28 +json.c: Preparing: 39249,28946,7/6/2014T13:57: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":"39248,28943","timestamp":"7/6/2014T13:55:1"},{"value":"39247,28943","timestamp":"7/6/2014T13:56:0"},{"value":"39249,28946","timestamp":"7/6/2014T13:57: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: 6453,9244,7/6/2014T13:55:1 with length 26 +json.c: Preparing: 6455,9252,7/6/2014T13:56:0 with length 26 +json.c: Preparing: 6455,9197,7/6/2014T13:57: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":"6453,9244","timestamp":"7/6/2014T13:55:1"},{"value":"6455,9252","timestamp":"7/6/2014T13:56:0"},{"value":"6455,9197","timestamp":"7/6/2014T13:57: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€0 +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,7/6/2014T13:57: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":"7/6/2014T13:57: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 3611131036 +main.c: Updating new time to 3611131036 +main.c: Time updated +main.c: Disconnecting wifi... +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS +main.c: New NTP time (absolute): 3611131036 +Time LONG_PERIOD: 48 +Time SHORT_PERIOD: 16 +buffer.c: Checking available memory... +buffer.c: Available memory: 33648 B +buffer.c: Used memory: 1056 B +main.c: Time (absolute): 3611131036 +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): 3611131080 +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 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 1 +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): 3611131080 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611131080 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39250,28946,7/6/2014T13:58:0 +ntp.c: Writing timestamp... +main.c: Data is: 6453,9189,7/6/2014T13:58:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39250,28946,7/6/2014T13:58:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39250,28946,7/6/2014T13:58:0 +main.c: Memory freed + main.c: Putting data: 6453,9189,7/6/2014T13:58:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6453,9189,7/6/2014T13:58:0 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33536 B +buffer.c: Used memory: 1168 B +main.c: Time (absolute): 3611131080 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611131140 +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 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 1 +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): 3611131140 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611131140 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39240,28960,7/6/2014T13:59:0 +ntp.c: Writing timestamp... +main.c: Data is: 6457,9133,7/6/2014T13:59:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39240,28960,7/6/2014T13:59:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39240,28960,7/6/2014T13:59:0 +main.c: Memory freed + main.c: Putting data: 6457,9133,7/6/2014T13:59:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6457,9133,7/6/2014T13:59:0 +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): 3611131141 +Time LONG_PERIOD: 3 +Time SHORT_PERIOD: 1 +timer-loop.c: Time to sleep! for 59 seconds +main.c: Time (absolute): 3611131200 +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 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 1 +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): 3611131200 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611131200 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39234,28965,7/6/2014T14:0:0 +ntp.c: Writing timestamp... +main.c: Data is: 6471,9066,7/6/2014T14:0:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39234,28965,7/6/2014T14:0:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39234,28965,7/6/2014T14:0:0 +main.c: Memory freed + main.c: Putting data: 6471,9066,7/6/2014T14:0:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6471,9066,7/6/2014T14:0: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.49 +main.c: Sending buffer 0 +buffer.c: Preparing JSON statement... +json.c: Preparing: 39250,28946,7/6/2014T13:58:0 with length 28 +json.c: Preparing: 39240,28960,7/6/2014T13:59:0 with length 28 +json.c: Preparing: 39234,28965,7/6/2014T14:0: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: 182 + +{"observations":[{"value":"39250,28946","timestamp":"7/6/2014T13:58:0"},{"value":"39240,28960","timestamp":"7/6/2014T13:59:0"},{"value":"39234,28965","timestamp":"7/6/2014T14:0: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: 6453,9189,7/6/2014T13:58:0 with length 26 +json.c: Preparing: 6457,9133,7/6/2014T13:59:0 with length 26 +json.c: Preparing: 6471,9066,7/6/2014T14:0:0 with length 25 +json.c: Server is lewis.upc.es +httpClient.c: Checking params +httpClient.c: 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: 176 + +{"observations":[{"value":"6453,9189","timestamp":"7/6/2014T13:58:0"},{"value":"6457,9133","timestamp":"7/6/2014T13:59:0"},{"value":"6471,9066","timestamp":"7/6/2014T14:0: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€Ż0 +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,7/6/2014T14:0: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":"7/6/2014T14:0: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 3611131215 +main.c: Updating new time to 3611131215 +main.c: Time updated +main.c: Disconnecting wifi... +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS +main.c: New NTP time (absolute): 3611131215 +Time LONG_PERIOD: 45 +Time SHORT_PERIOD: 15 +buffer.c: Checking available memory... +buffer.c: Available memory: 33648 B +buffer.c: Used memory: 1056 B +main.c: Time (absolute): 3611131215 +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): 3611131260 +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 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 1 +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): 3611131260 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611131260 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39231,28974,7/6/2014T14:1:0 +ntp.c: Writing timestamp... +main.c: Data is: 6475,9078,7/6/2014T14:1:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39231,28974,7/6/2014T14:1:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39231,28974,7/6/2014T14:1:0 +main.c: Memory freed + main.c: Putting data: 6475,9078,7/6/2014T14:1:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6475,9078,7/6/2014T14:1:0 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33536 B +buffer.c: Used memory: 1168 B +main.c: Time (absolute): 3611131260 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611131320 +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 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 1 +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): 3611131320 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611131320 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39232,28982,7/6/2014T14:2:0 +ntp.c: Writing timestamp... +main.c: Data is: 6475,9030,7/6/2014T14:2:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39232,28982,7/6/2014T14:2:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39232,28982,7/6/2014T14:2:0 +main.c: Memory freed + main.c: Putting data: 6475,9030,7/6/2014T14:2:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6475,9030,7/6/2014T14:2:0 +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): 3611131320 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611131380 +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 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 1 +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): 3611131380 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611131380 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39227,28979,7/6/2014T14:3:0 +ntp.c: Writing timestamp... +main.c: Data is: 6478,8994,7/6/2014T14:3:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39227,28979,7/6/2014T14:3:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39227,28979,7/6/2014T14:3:0 +main.c: Memory freed + main.c: Putting data: 6478,8994,7/6/2014T14:3:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6478,8994,7/6/2014T14:3: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.49 +main.c: Sending buffer 0 +buffer.c: Preparing JSON statement... +json.c: Preparing: 39231,28974,7/6/2014T14:1:0 with length 27 +json.c: Preparing: 39232,28982,7/6/2014T14:2:0 with length 27 +json.c: Preparing: 39227,28979,7/6/2014T14:3: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":"39231,28974","timestamp":"7/6/2014T14:1:0"},{"value":"39232,28982","timestamp":"7/6/2014T14:2:0"},{"value":"39227,28979","timestamp":"7/6/2014T14:3: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: 6475,9078,7/6/2014T14:1:0 with length 25 +json.c: Preparing: 6475,9030,7/6/2014T14:2:0 with length 25 +json.c: Preparing: 6478,8994,7/6/2014T14:3:0 with length 25 +json.c: Server is lewis.upc.es +httpClient.c: Checking params +httpClient.c: 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: 174 + +{"observations":[{"value":"6475,9078","timestamp":"7/6/2014T14:1:0"},{"value":"6475,9030","timestamp":"7/6/2014T14:2:0"},{"value":"6478,8994","timestamp":"7/6/2014T14:3: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,7/6/2014T14:3: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":"7/6/2014T14:3: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 3611131396 +main.c: Updating new time to 3611131396 +main.c: Time updated +main.c: Disconnecting wifi... +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS +main.c: New NTP time (absolute): 3611131396 +Time LONG_PERIOD: 48 +Time SHORT_PERIOD: 16 +buffer.c: Checking available memory... +buffer.c: Available memory: 33552 B +buffer.c: Used memory: 1152 B +main.c: Time (absolute): 3611131396 +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): 3611131440 +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 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 1 +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): 3611131440 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611131440 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39233,28971,7/6/2014T14:4:0 +ntp.c: Writing timestamp... +main.c: Data is: 6478,8954,7/6/2014T14:4:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39233,28971,7/6/2014T14:4:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39233,28971,7/6/2014T14:4:0 +main.c: Memory freed + main.c: Putting data: 6478,8954,7/6/2014T14:4:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6478,8954,7/6/2014T14:4:0 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33432 B +buffer.c: Used memory: 1272 B +main.c: Time (absolute): 3611131441 +Time LONG_PERIOD: 3 +Time SHORT_PERIOD: 1 +timer-loop.c: Time to sleep! for 59 seconds +main.c: Time (absolute): 3611131500 +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 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 1 +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): 3611131500 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611131500 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39237,28964,7/6/2014T14:5:0 +ntp.c: Writing timestamp... +main.c: Data is: 6474,8855,7/6/2014T14:5:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39237,28964,7/6/2014T14:5:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39237,28964,7/6/2014T14:5:0 +main.c: Memory freed + main.c: Putting data: 6474,8855,7/6/2014T14:5:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6474,8855,7/6/2014T14:5:0 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33352 B +buffer.c: Used memory: 1352 B +main.c: Time (absolute): 3611131500 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611131560 +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 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 1 +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): 3611131560 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611131560 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39235,28958,7/6/2014T14:6:0 +ntp.c: Writing timestamp... +main.c: Data is: 6470,8950,7/6/2014T14:6:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39235,28958,7/6/2014T14:6:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39235,28958,7/6/2014T14:6:0 +main.c: Memory freed + main.c: Putting data: 6470,8950,7/6/2014T14:6:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6470,8950,7/6/2014T14:6: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.49 +main.c: Sending buffer 0 +buffer.c: Preparing JSON statement... +json.c: Preparing: 39233,28971,7/6/2014T14:4:0 with length 27 +json.c: Preparing: 39237,28964,7/6/2014T14:5:0 with length 27 +json.c: Preparing: 39235,28958,7/6/2014T14:6: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,28971","timestamp":"7/6/2014T14:4:0"},{"value":"39237,28964","timestamp":"7/6/2014T14:5:0"},{"value":"39235,28958","timestamp":"7/6/2014T14:6: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: 6478,8954,7/6/2014T14:4:0 with length 25 +json.c: Preparing: 6474,8855,7/6/2014T14:5:0 with length 25 +json.c: Preparing: 6470,8950,7/6/2014T14:6:0 with length 25 +json.c: Server is lewis.upc.es +httpClient.c: Checking params +httpClient.c: 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: 174 + +{"observations":[{"value":"6478,8954","timestamp":"7/6/2014T14:4:0"},{"value":"6474,8855","timestamp":"7/6/2014T14:5:0"},{"value":"6470,8950","timestamp":"7/6/2014T14:6: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,7/6/2014T14:6: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":"7/6/2014T14:6: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 3611131576 +main.c: Updating new time to 3611131576 +main.c: Time updated +main.c: Disconnecting wifi... +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS +main.c: New NTP time (absolute): 3611131576 +Time LONG_PERIOD: 48 +Time SHORT_PERIOD: 16 +buffer.c: Checking available memory... +buffer.c: Available memory: 33440 B +buffer.c: Used memory: 1264 B +main.c: Time (absolute): 3611131576 +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): 3611131620 +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 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 1 +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): 3611131620 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611131620 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39245,28957,7/6/2014T14:7:0 +ntp.c: Writing timestamp... +main.c: Data is: 6464,8911,7/6/2014T14:7:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39245,28957,7/6/2014T14:7:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39245,28957,7/6/2014T14:7:0 +main.c: Memory freed + main.c: Putting data: 6464,8911,7/6/2014T14:7:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6464,8911,7/6/2014T14:7:0 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33328 B +buffer.c: Used memory: 1376 B +main.c: Time (absolute): 3611131620 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +timer-loop.c: Time to sleep! for 60 seconds +main.c: Time (absolute): 3611131680 +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 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 1 +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): 3611131680 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Timestamp (absolute): 3611131680 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +ntp.c: Writing timestamp... +main.c: Data is: 39235,28961,7/6/2014T14:8:0 +ntp.c: Writing timestamp... +main.c: Data is: 6464,8990,7/6/2014T14:8:0 +main.c: Returning timestamped data... +main.c: Putting data in buffers... +main.c: Putting data: 39235,28961,7/6/2014T14:8:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 39235,28961,7/6/2014T14:8:0 +main.c: Memory freed + main.c: Putting data: 6464,8990,7/6/2014T14:8:0 + buffer.c: Joining buffer... +buffer.c: Data copied +main.c: Message put: 6464,8990,7/6/2014T14:8:0 +main.c: Memory freed + main.c: Data is now in buffer + buffer.c: Checking available memory... +buffer.c: Available memory: 33248 B +buffer.c: Used memory: 1456 B +main.c: Time (absolute): 3611131681 +Time LONG_PERIOD: 3 +Time SHORT_PERIOD: 1 +timer-loop.c: Time to sleep! for 59 seconds diff --git a/Project/applications/smartcities/logger/ttyS0.log.2 b/Project/applications/smartcities/logger/ttyS0.log.2 new file mode 100644 index 0000000..52a7066 --- /dev/null +++ b/Project/applications/smartcities/logger/ttyS0.log.2 @@ -0,0 +1,774 @@ +main.c: --------------WI-SENSE STARTED------------- +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 +Connected +Connected to: 00:26:5B:D9:0D:18 +buffer.c: Checking available memory... +buffer.c: Available memory: 33320 B +buffer.c: Used memory: 1384 B +[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: 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: 39172,29020,7/6/2014T4:42:0 +[FREE] Freed bytes from 2000F428 +main.c: Memory freed + 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: 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: 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 +[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): 3611097780 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +[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: 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: 39176,29013,7/6/2014T4:43:0 +[FREE] Freed bytes from 2000F4A0 +main.c: Memory freed + 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: 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: 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 +[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): 3611097840 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +[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: 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: 39184,29009,7/6/2014T4:44:0 +[FREE] Freed bytes from 2000F518 +main.c: Memory freed + 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: 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... +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 +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 +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 +[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): 3611097900 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +[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: 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: 39186,29010,7/6/2014T4:45:0 +[FREE] Freed bytes from 2000F440 +main.c: Memory freed + 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: 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): 3611097900 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Time (absolute): 3611097960 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +[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 +main.c: Timestamp (absolute): 3611097960 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +[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: 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: 39180,29010,7/6/2014T4:46:0 +[FREE] Freed bytes from 2000F4C8 +main.c: Memory freed + 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: 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: 33344 B +buffer.c: Used memory: 1360 B +main.c: Time (absolute): 3611097960 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +main.c: Time (absolute): 3611098020 +Time LONG_PERIOD: 0 +Time SHORT_PERIOD: 0 +[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): 3611098020 +Timestamp LONG_PERIOD: 0 +Timestamp SHORT_PERIOD: 0 +main.c: Timestamping data... +[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: 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,29008,7/6/2014T4:47:0 +[FREE] Freed bytes from 2000FC20 +main.c: Memory freed + 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: 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... +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 +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: 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/sensors.c b/Project/applications/smartcities/sensors.c index 771727a..3b03cd6 100644 --- a/Project/applications/smartcities/sensors.c +++ b/Project/applications/smartcities/sensors.c @@ -439,17 +439,6 @@ void collectData(char* valueSensors[], uint8_t* sensors) uint8_t i; for(i=0;i