Commit a802cbf56ea5f122c00edd2f3ae36a1cc6c419e3

Authored by Imanol-Mikel Barba Sabariego
1 parent 4d99fb0a

FINAL CODE

Project/applications/smartcities/json.c
... ... @@ -157,7 +157,6 @@ uint8_t send_json(char* statement, uint32_t length, char* provider_ID, char* sen
157 157 {
158 158 URL = (char*) chHeapAlloc(NULL,1+strlen(SERVER_HOSTNAME));
159 159 strcpy(URL,SERVER_HOSTNAME);
160   - URL[strlen(SERVER_HOSTNAME)] = '\0';
161 160 #ifdef SERVER_VANILLA
162 161 //VANILLA SERVER (SENTILO)
163 162 DBG_JSON("Server is vanilla\r\n")
... ...
Project/applications/smartcities/logger/ttyS0.log
No preview for this file type
Project/applications/smartcities/logger/ttyS0.log.2 0 → 100644
  1 +main.c: --------------WI-SENSE STARTED-------------
  2 +main.c: Connecting wifi...
  3 +main.c: SSID = SERVER_WLAN
  4 +main.c: Wep key = TGW2YHNKT9TW
  5 +main.c: Passphrase = TGW2YHNKT9TW
  6 +main.c: User =
  7 +main.c: Password =
  8 +main.c: Encryption type = 4
  9 +main.c: Geo Localization = 41.557255 2.096183
  10 +main.c: WPA network detected
  11 +Connected
  12 +Connected to: 00:26:5B:D9:0D:18
  13 +buffer.c: Checking available memory...
  14 +buffer.c: Available memory: 33320 B
  15 +buffer.c: Used memory: 1384 B
  16 +[ALLOC] Allocated 120 bytes to 2000FCA8
  17 +[ALLOC] Allocated 32 bytes to 2000FC20
  18 +[ALLOC] Allocated 49 bytes to 2000FC48
  19 +[FREE] Freed bytes from 2000FC20
  20 +[ALLOC] Allocated 64 bytes to 2000FEC0
  21 +[FREE] Freed bytes from 2000FC48
  22 +[ALLOC] Allocated 74 bytes to 2000FC20
  23 +[FREE] Freed bytes from 2000FEC0
  24 +[ALLOC] Allocated 82 bytes to 2000FEC0
  25 +[FREE] Freed bytes from 2000FC20
  26 +[ALLOC] Allocated 92 bytes to 2000FC20
  27 +[FREE] Freed bytes from 2000FEC0
  28 +[ALLOC] Allocated 95 bytes to 2000FEC0
  29 +[FREE] Freed bytes from 2000FC20
  30 +[ALLOC] Allocated 109 bytes to 2000FF28
  31 +[FREE] Freed bytes from 2000FEC0
  32 +[ALLOC] Allocated 127 bytes to 2000FFA0
  33 +[FREE] Freed bytes from 2000FF28
  34 +[ALLOC] Allocated 147 bytes to 2000FEC0
  35 +[FREE] Freed bytes from 2000FFA0
  36 +[ALLOC] Allocated 206 bytes to 2000FF60
  37 +[FREE] Freed bytes from 2000FEC0
  38 +[ALLOC] Allocated 211 bytes to 20010038
  39 +[FREE] Freed bytes from 2000FF60
  40 +[FREE] Freed bytes from 2000FCA8
  41 +[ALLOC] Allocated 14 bytes to 2000FC20
  42 +[ALLOC] Allocated 50 bytes to 2000FC38
  43 +[ALLOC] Allocated 368 bytes to 2000FEC0
  44 +[ALLOC] Allocated 4 bytes to 2000FC78
  45 +[FREE] Freed bytes from 2000FC78
  46 +[FREE] Freed bytes from 2000FEC0
  47 +[ALLOC] Allocated 4 bytes to 2000F328
  48 +[FREE] Freed bytes from 2000F328
  49 +[FREE] Freed bytes from 2000FC38
  50 +[FREE] Freed bytes from 2000FC20
  51 +[FREE] Freed bytes from 20010038
  52 +[ALLOC] Allocated 32 bytes to 2000FC20
  53 +[ALLOC] Allocated 49 bytes to 2000FC48
  54 +[FREE] Freed bytes from 2000FC20
  55 +[ALLOC] Allocated 80 bytes to 2000FCA8
  56 +[FREE] Freed bytes from 2000FC48
  57 +[ALLOC] Allocated 90 bytes to 2000FC20
  58 +[FREE] Freed bytes from 2000FCA8
  59 +[ALLOC] Allocated 110 bytes to 2000FCA8
  60 +[FREE] Freed bytes from 2000FC20
  61 +[ALLOC] Allocated 120 bytes to 2000FEC0
  62 +[FREE] Freed bytes from 2000FCA8
  63 +[ALLOC] Allocated 126 bytes to 2000FCA8
  64 +[FREE] Freed bytes from 2000FEC0
  65 +[ALLOC] Allocated 140 bytes to 2000FEC0
  66 +[FREE] Freed bytes from 2000FCA8
  67 +[ALLOC] Allocated 158 bytes to 2000FF58
  68 +[FREE] Freed bytes from 2000FEC0
  69 +[ALLOC] Allocated 163 bytes to 20010000
  70 +[FREE] Freed bytes from 2000FF58
  71 +[ALLOC] Allocated 14 bytes to 2000F328
  72 +[ALLOC] Allocated 50 bytes to 2000FC20
  73 +[ALLOC] Allocated 320 bytes to 20010208
  74 +[ALLOC] Allocated 4 bytes to 2000FC60
  75 +[FREE] Freed bytes from 2000FC60
  76 +[FREE] Freed bytes from 20010208
  77 +[ALLOC] Allocated 4 bytes to 2000FC78
  78 +[FREE] Freed bytes from 2000FC78
  79 +[FREE] Freed bytes from 2000FC20
  80 +[FREE] Freed bytes from 2000F328
  81 +[FREE] Freed bytes from 20010000
  82 +[ALLOC] Allocated 32 bytes to 2000FC20
  83 +[ALLOC] Allocated 49 bytes to 2000FC48
  84 +[FREE] Freed bytes from 2000FC20
  85 +[ALLOC] Allocated 62 bytes to 2000FCA8
  86 +[FREE] Freed bytes from 2000FC48
  87 +[ALLOC] Allocated 72 bytes to 2000FC20
  88 +[FREE] Freed bytes from 2000FCA8
  89 +[ALLOC] Allocated 77 bytes to 2000FCA8
  90 +[FREE] Freed bytes from 2000FC20
  91 +[ALLOC] Allocated 87 bytes to 2000FC20
  92 +[FREE] Freed bytes from 2000FCA8
  93 +[ALLOC] Allocated 89 bytes to 2000FCA8
  94 +[FREE] Freed bytes from 2000FC20
  95 +[ALLOC] Allocated 103 bytes to 2000FEC0
  96 +[FREE] Freed bytes from 2000FCA8
  97 +[ALLOC] Allocated 121 bytes to 2000FCA8
  98 +[FREE] Freed bytes from 2000FEC0
  99 +[ALLOC] Allocated 126 bytes to 2000FEC0
  100 +[FREE] Freed bytes from 2000FCA8
  101 +[ALLOC] Allocated 14 bytes to 2000F328
  102 +[ALLOC] Allocated 50 bytes to 2000FC20
  103 +[ALLOC] Allocated 283 bytes to 2000FF48
  104 +[ALLOC] Allocated 4 bytes to 2000FC60
  105 +[FREE] Freed bytes from 2000FC60
  106 +[FREE] Freed bytes from 2000FF48
  107 +[ALLOC] Allocated 4 bytes to 2000FC78
  108 +[FREE] Freed bytes from 2000FC78
  109 +[FREE] Freed bytes from 2000FC20
  110 +[FREE] Freed bytes from 2000F328
  111 +[FREE] Freed bytes from 2000FEC0
  112 +main.c: 2 sensor detected...
  113 +main.c: Requesting new NTP time...
  114 +main.c: Updating new time to 3611097704
  115 +main.c: Time updated
  116 +main.c: Disconnecting wifi...
  117 +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS
  118 +Failed
  119 +main.c: Time (absolute): 3611097720
  120 +Time LONG_PERIOD: 0
  121 +Time SHORT_PERIOD: 0
  122 +[ALLOC] Allocated 12 bytes to 2000EFC8
  123 +[ALLOC] Allocated 12 bytes to 2000F400
  124 +main.c: Time (absolute): 3611097720
  125 +Time LONG_PERIOD: 0
  126 +Time SHORT_PERIOD: 0
  127 +main.c: Timestamp (absolute): 3611097720
  128 +Timestamp LONG_PERIOD: 0
  129 +Timestamp SHORT_PERIOD: 0
  130 +main.c: Timestamping data...
  131 +[ALLOC] Allocated 8 bytes to 2000F418
  132 +[ALLOC] Allocated 32 bytes to 2000F428
  133 +main.c: Data is: 39172,29020,7/6/2014T4:42:0
  134 +[FREE] Freed bytes from 2000EFC8
  135 +[ALLOC] Allocated 31 bytes to 2000F450
  136 +main.c: Data is: 6507,10252,7/6/2014T4:42:0
  137 +[FREE] Freed bytes from 2000F400
  138 +main.c: Returning timestamped data...
  139 +main.c: Putting data in buffers...
  140 +main.c: Putting data: 39172,29020,7/6/2014T4:42:0
  141 + buffer.c: Joining buffer...
  142 +[ALLOC] Allocated 4 bytes to 2000EFC8
  143 +[ALLOC] Allocated 28 bytes to 2000F478
  144 +buffer.c: Data copied
  145 +main.c: Message put: 39172,29020,7/6/2014T4:42:0
  146 +[FREE] Freed bytes from 2000F428
  147 +main.c: Memory freed
  148 + main.c: Putting data: 6507,10252,7/6/2014T4:42:0
  149 + buffer.c: Joining buffer...
  150 +[ALLOC] Allocated 4 bytes to 2000EFD8
  151 +[ALLOC] Allocated 27 bytes to 2000F428
  152 +buffer.c: Data copied
  153 +main.c: Message put: 6507,10252,7/6/2014T4:42:0
  154 +[FREE] Freed bytes from 2000F450
  155 +main.c: Memory freed
  156 + main.c: Data is now in buffer
  157 + buffer.c: Checking available memory...
  158 +buffer.c: Available memory: 33600 B
  159 +buffer.c: Used memory: 1104 B
  160 +main.c: Time (absolute): 3611097720
  161 +Time LONG_PERIOD: 0
  162 +Time SHORT_PERIOD: 0
  163 +main.c: Time (absolute): 3611097780
  164 +Time LONG_PERIOD: 0
  165 +Time SHORT_PERIOD: 0
  166 +[ALLOC] Allocated 12 bytes to 2000F400
  167 +[ALLOC] Allocated 12 bytes to 2000F450
  168 +main.c: Time (absolute): 3611097780
  169 +Time LONG_PERIOD: 0
  170 +Time SHORT_PERIOD: 0
  171 +main.c: Timestamp (absolute): 3611097780
  172 +Timestamp LONG_PERIOD: 0
  173 +Timestamp SHORT_PERIOD: 0
  174 +main.c: Timestamping data...
  175 +[ALLOC] Allocated 8 bytes to 2000F468
  176 +[ALLOC] Allocated 32 bytes to 2000F4A0
  177 +main.c: Data is: 39176,29013,7/6/2014T4:43:0
  178 +[FREE] Freed bytes from 2000F400
  179 +[ALLOC] Allocated 31 bytes to 2000F4C8
  180 +main.c: Data is: 6506,10268,7/6/2014T4:43:0
  181 +[FREE] Freed bytes from 2000F450
  182 +main.c: Returning timestamped data...
  183 +main.c: Putting data in buffers...
  184 +main.c: Putting data: 39176,29013,7/6/2014T4:43:0
  185 + buffer.c: Joining buffer...
  186 +[ALLOC] Allocated 8 bytes to 2000F400
  187 +[ALLOC] Allocated 28 bytes to 2000F4F0
  188 +[FREE] Freed bytes from 2000F478
  189 +[FREE] Freed bytes from 2000EFC8
  190 +[ALLOC] Allocated 28 bytes to 2000F478
  191 +buffer.c: Data copied
  192 +main.c: Message put: 39176,29013,7/6/2014T4:43:0
  193 +[FREE] Freed bytes from 2000F4A0
  194 +main.c: Memory freed
  195 + main.c: Putting data: 6506,10268,7/6/2014T4:43:0
  196 + buffer.c: Joining buffer...
  197 +[ALLOC] Allocated 8 bytes to 2000EFC8
  198 +[ALLOC] Allocated 27 bytes to 2000F4A0
  199 +[FREE] Freed bytes from 2000F428
  200 +[FREE] Freed bytes from 2000EFD8
  201 +[ALLOC] Allocated 27 bytes to 2000F428
  202 +buffer.c: Data copied
  203 +main.c: Message put: 6506,10268,7/6/2014T4:43:0
  204 +[FREE] Freed bytes from 2000F4C8
  205 +main.c: Memory freed
  206 + main.c: Data is now in buffer
  207 + buffer.c: Checking available memory...
  208 +buffer.c: Available memory: 33488 B
  209 +buffer.c: Used memory: 1216 B
  210 +main.c: Time (absolute): 3611097780
  211 +Time LONG_PERIOD: 0
  212 +Time SHORT_PERIOD: 0
  213 +main.c: Time (absolute): 3611097840
  214 +Time LONG_PERIOD: 0
  215 +Time SHORT_PERIOD: 0
  216 +[ALLOC] Allocated 12 bytes to 2000F450
  217 +[ALLOC] Allocated 12 bytes to 2000F4C8
  218 +main.c: Time (absolute): 3611097840
  219 +Time LONG_PERIOD: 0
  220 +Time SHORT_PERIOD: 0
  221 +main.c: Timestamp (absolute): 3611097840
  222 +Timestamp LONG_PERIOD: 0
  223 +Timestamp SHORT_PERIOD: 0
  224 +main.c: Timestamping data...
  225 +[ALLOC] Allocated 8 bytes to 2000EFD8
  226 +[ALLOC] Allocated 32 bytes to 2000F518
  227 +main.c: Data is: 39184,29009,7/6/2014T4:44:0
  228 +[FREE] Freed bytes from 2000F450
  229 +[ALLOC] Allocated 31 bytes to 2000F540
  230 +main.c: Data is: 6499,10193,7/6/2014T4:44:0
  231 +[FREE] Freed bytes from 2000F4C8
  232 +main.c: Returning timestamped data...
  233 +main.c: Putting data in buffers...
  234 +main.c: Putting data: 39184,29009,7/6/2014T4:44:0
  235 + buffer.c: Joining buffer...
  236 +[ALLOC] Allocated 12 bytes to 2000F450
  237 +[ALLOC] Allocated 28 bytes to 2000F4C8
  238 +[FREE] Freed bytes from 2000F4F0
  239 +[ALLOC] Allocated 28 bytes to 2000F4F0
  240 +[FREE] Freed bytes from 2000F478
  241 +[FREE] Freed bytes from 2000F400
  242 +[ALLOC] Allocated 28 bytes to 2000F478
  243 +buffer.c: Data copied
  244 +main.c: Message put: 39184,29009,7/6/2014T4:44:0
  245 +[FREE] Freed bytes from 2000F518
  246 +main.c: Memory freed
  247 + main.c: Putting data: 6499,10193,7/6/2014T4:44:0
  248 + buffer.c: Joining buffer...
  249 +[ALLOC] Allocated 12 bytes to 2000F400
  250 +[ALLOC] Allocated 27 bytes to 2000F518
  251 +[FREE] Freed bytes from 2000F4A0
  252 +[ALLOC] Allocated 27 bytes to 2000F4A0
  253 +[FREE] Freed bytes from 2000F428
  254 +[FREE] Freed bytes from 2000EFC8
  255 +[ALLOC] Allocated 27 bytes to 2000F428
  256 +buffer.c: Data copied
  257 +main.c: Message put: 6499,10193,7/6/2014T4:44:0
  258 +[FREE] Freed bytes from 2000F540
  259 +main.c: Memory freed
  260 + main.c: Data is now in buffer
  261 + main.c: Programmed send cycle...
  262 +main.c: Connecting wifi...
  263 +main.c: SSID = SERVER_WLAN
  264 +main.c: Wep key = TGW2YHNKT9TW
  265 +main.c: Passphrase = TGW2YHNKT9TW
  266 +main.c: User =
  267 +main.c: Password =
  268 +main.c: Encryption type = 4
  269 +main.c: Geo Localization = 41.557255 2.096183
  270 +main.c: WPA network detected
  271 +Connected
  272 +Connected to: 00:26:5B:D9:0D:18
  273 +main.c: Sending buffer 0
  274 +buffer.c: Preparing JSON statement...
  275 +[ALLOC] Allocated 18 bytes to 2000F328
  276 +[ALLOC] Allocated 12 bytes to 2000F570
  277 +[ALLOC] Allocated 16 bytes to 2000FC60
  278 +[ALLOC] Allocated 22 bytes to 2000FC78
  279 +[ALLOC] Allocated 37 bytes to 2000FC98
  280 +[ALLOC] Allocated 52 bytes to 2000FCC8
  281 +[FREE] Freed bytes from 2000FC98
  282 +[FREE] Freed bytes from 2000FC60
  283 +[ALLOC] Allocated 55 bytes to 20010040
  284 +[FREE] Freed bytes from 2000FC78
  285 +[FREE] Freed bytes from 2000FCC8
  286 +[FREE] Freed bytes from 2000F570
  287 +[ALLOC] Allocated 72 bytes to 2000FC60
  288 +[FREE] Freed bytes from 2000F328
  289 +[FREE] Freed bytes from 20010040
  290 +[ALLOC] Allocated 12 bytes to 2000F328
  291 +[ALLOC] Allocated 16 bytes to 2000F570
  292 +[ALLOC] Allocated 22 bytes to 2000FCB0
  293 +[ALLOC] Allocated 37 bytes to 2000FCD0
  294 +[ALLOC] Allocated 52 bytes to 20010040
  295 +[FREE] Freed bytes from 2000FCD0
  296 +[FREE] Freed bytes from 2000F570
  297 +[ALLOC] Allocated 55 bytes to 2000FCD0
  298 +[FREE] Freed bytes from 2000FCB0
  299 +[FREE] Freed bytes from 20010040
  300 +[FREE] Freed bytes from 2000F328
  301 +[ALLOC] Allocated 126 bytes to 20010040
  302 +[FREE] Freed bytes from 2000FC60
  303 +[FREE] Freed bytes from 2000FCD0
  304 +[ALLOC] Allocated 12 bytes to 2000F328
  305 +[ALLOC] Allocated 16 bytes to 2000F570
  306 +[ALLOC] Allocated 22 bytes to 2000FC60
  307 +[ALLOC] Allocated 37 bytes to 2000FC80
  308 +[ALLOC] Allocated 52 bytes to 2000FCB0
  309 +[FREE] Freed bytes from 2000FC80
  310 +[FREE] Freed bytes from 2000F570
  311 +[ALLOC] Allocated 55 bytes to 200100C8
  312 +[FREE] Freed bytes from 2000FC60
  313 +[FREE] Freed bytes from 2000FCB0
  314 +[FREE] Freed bytes from 2000F328
  315 +[ALLOC] Allocated 180 bytes to 20010108
  316 +[FREE] Freed bytes from 20010040
  317 +[FREE] Freed bytes from 200100C8
  318 +[ALLOC] Allocated 182 bytes to 20010040
  319 +[FREE] Freed bytes from 20010108
  320 +[ALLOC] Allocated 14 bytes to 2000F328
  321 +[ALLOC] Allocated 62 bytes to 2000FC60
  322 +[ALLOC] Allocated 350 bytes to 20010100
  323 +[ALLOC] Allocated 4 bytes to 2000F570
  324 +[FREE] Freed bytes from 2000F570
  325 +[FREE] Freed bytes from 20010100
  326 +[ALLOC] Allocated 4 bytes to 2000FC20
  327 +[FREE] Freed bytes from 2000FC20
  328 +[FREE] Freed bytes from 2000FC60
  329 +[FREE] Freed bytes from 2000F328
  330 +[FREE] Freed bytes from 20010040
  331 +buffer.c: Data sent successfully
  332 +[FREE] Freed bytes from 2000F4C8
  333 +[FREE] Freed bytes from 2000F4F0
  334 +[FREE] Freed bytes from 2000F478
  335 +[FREE] Freed bytes from 2000F450
  336 +main.c: Sending buffer 1
  337 +buffer.c: Preparing JSON statement...
  338 +[ALLOC] Allocated 18 bytes to 2000F328
  339 +[ALLOC] Allocated 11 bytes to 2000F450
  340 +[ALLOC] Allocated 16 bytes to 2000F478
  341 +[ALLOC] Allocated 21 bytes to 2000F4C8
  342 +[ALLOC] Allocated 36 bytes to 2000F4E8
  343 +[ALLOC] Allocated 51 bytes to 2000FC60
  344 +[FREE] Freed bytes from 2000F4E8
  345 +[FREE] Freed bytes from 2000F478
  346 +[ALLOC] Allocated 54 bytes to 20010040
  347 +[FREE] Freed bytes from 2000F4C8
  348 +[FREE] Freed bytes from 2000FC60
  349 +[FREE] Freed bytes from 2000F450
  350 +[ALLOC] Allocated 71 bytes to 2000F4C8
  351 +[FREE] Freed bytes from 2000F328
  352 +[FREE] Freed bytes from 20010040
  353 +[ALLOC] Allocated 11 bytes to 2000F328
  354 +[ALLOC] Allocated 16 bytes to 2000F450
  355 +[ALLOC] Allocated 21 bytes to 2000F478
  356 +[ALLOC] Allocated 36 bytes to 2000FC60
  357 +[ALLOC] Allocated 51 bytes to 2000FC90
  358 +[FREE] Freed bytes from 2000FC60
  359 +[FREE] Freed bytes from 2000F450
  360 +[ALLOC] Allocated 54 bytes to 2000FCD0
  361 +[FREE] Freed bytes from 2000F478
  362 +[FREE] Freed bytes from 2000FC90
  363 +[FREE] Freed bytes from 2000F328
  364 +[ALLOC] Allocated 124 bytes to 20010040
  365 +[FREE] Freed bytes from 2000F4C8
  366 +[FREE] Freed bytes from 2000FCD0
  367 +[ALLOC] Allocated 11 bytes to 2000F328
  368 +[ALLOC] Allocated 16 bytes to 2000F450
  369 +[ALLOC] Allocated 21 bytes to 2000F478
  370 +[ALLOC] Allocated 36 bytes to 2000F4C8
  371 +[ALLOC] Allocated 51 bytes to 2000FC60
  372 +[FREE] Freed bytes from 2000F4C8
  373 +[FREE] Freed bytes from 2000F450
  374 +[ALLOC] Allocated 54 bytes to 2000F4C8
  375 +[FREE] Freed bytes from 2000F478
  376 +[FREE] Freed bytes from 2000FC60
  377 +[FREE] Freed bytes from 2000F328
  378 +[ALLOC] Allocated 177 bytes to 200100C8
  379 +[FREE] Freed bytes from 20010040
  380 +[FREE] Freed bytes from 2000F4C8
  381 +[ALLOC] Allocated 179 bytes to 20010188
  382 +[FREE] Freed bytes from 200100C8
  383 +[ALLOC] Allocated 14 bytes to 2000F328
  384 +[ALLOC] Allocated 62 bytes to 2000F4C8
  385 +[ALLOC] Allocated 347 bytes to 20010248
  386 +[ALLOC] Allocated 4 bytes to 2000F450
  387 +[FREE] Freed bytes from 2000F450
  388 +[FREE] Freed bytes from 20010248
  389 +[ALLOC] Allocated 4 bytes to 2000F478
  390 +[FREE] Freed bytes from 2000F478
  391 +[FREE] Freed bytes from 2000F4C8
  392 +[FREE] Freed bytes from 2000F328
  393 +[FREE] Freed bytes from 20010188
  394 +buffer.c: Data sent successfully
  395 +[FREE] Freed bytes from 2000F518
  396 +[FREE] Freed bytes from 2000F4A0
  397 +[FREE] Freed bytes from 2000F428
  398 +[FREE] Freed bytes from 2000F400
  399 +main.c: Polling battery level...
  400 +[ALLOC] Allocated 12 bytes to 2000F328
  401 +[ALLOC] Allocated 25 bytes to 2000F428
  402 +[FREE] Freed bytes from 2000F328
  403 +[ALLOC] Allocated 18 bytes to 2000F328
  404 +[ALLOC] Allocated 5 bytes to 2000F400
  405 +[ALLOC] Allocated 16 bytes to 2000F450
  406 +[ALLOC] Allocated 15 bytes to 2000F478
  407 +[ALLOC] Allocated 30 bytes to 2000F490
  408 +[ALLOC] Allocated 45 bytes to 2000F4B8
  409 +[FREE] Freed bytes from 2000F490
  410 +[FREE] Freed bytes from 2000F450
  411 +[ALLOC] Allocated 48 bytes to 2000F4F0
  412 +[FREE] Freed bytes from 2000F478
  413 +[FREE] Freed bytes from 2000F4B8
  414 +[FREE] Freed bytes from 2000F400
  415 +[ALLOC] Allocated 65 bytes to 2000F478
  416 +[FREE] Freed bytes from 2000F328
  417 +[FREE] Freed bytes from 2000F4F0
  418 +[ALLOC] Allocated 67 bytes to 2000F4C8
  419 +[FREE] Freed bytes from 2000F478
  420 +[FREE] Freed bytes from 2000F428
  421 +[ALLOC] Allocated 14 bytes to 2000F328
  422 +[ALLOC] Allocated 62 bytes to 2000F478
  423 +[ALLOC] Allocated 234 bytes to 20010040
  424 +[ALLOC] Allocated 3 bytes to 2000F400
  425 +[FREE] Freed bytes from 2000F400
  426 +[FREE] Freed bytes from 20010040
  427 +[ALLOC] Allocated 4 bytes to 2000F428
  428 +[FREE] Freed bytes from 2000F428
  429 +[FREE] Freed bytes from 2000F478
  430 +[FREE] Freed bytes from 2000F328
  431 +[FREE] Freed bytes from 2000F4C8
  432 +main.c: Requesting new NTP time...
  433 +main.c: Updating new time to 3611097855
  434 +main.c: Time updated
  435 +main.c: Disconnecting wifi...
  436 +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS
  437 +main.c: New NTP time (absolute): 3611097855
  438 +Time LONG_PERIOD: 45
  439 +Time SHORT_PERIOD: 15
  440 +buffer.c: Checking available memory...
  441 +buffer.c: Available memory: 33576 B
  442 +buffer.c: Used memory: 1128 B
  443 +main.c: Time (absolute): 3611097856
  444 +Time LONG_PERIOD: 48
  445 +Time SHORT_PERIOD: 16
  446 +Failed
  447 +main.c: Time (absolute): 3611097900
  448 +Time LONG_PERIOD: 0
  449 +Time SHORT_PERIOD: 0
  450 +[ALLOC] Allocated 12 bytes to 2000F328
  451 +[ALLOC] Allocated 12 bytes to 2000F428
  452 +main.c: Time (absolute): 3611097900
  453 +Time LONG_PERIOD: 0
  454 +Time SHORT_PERIOD: 0
  455 +main.c: Timestamp (absolute): 3611097900
  456 +Timestamp LONG_PERIOD: 0
  457 +Timestamp SHORT_PERIOD: 0
  458 +main.c: Timestamping data...
  459 +[ALLOC] Allocated 8 bytes to 2000F408
  460 +[ALLOC] Allocated 32 bytes to 2000F440
  461 +main.c: Data is: 39186,29010,7/6/2014T4:45:0
  462 +[FREE] Freed bytes from 2000F328
  463 +[ALLOC] Allocated 31 bytes to 2000F478
  464 +main.c: Data is: 6498,10182,7/6/2014T4:45:0
  465 +[FREE] Freed bytes from 2000F428
  466 +main.c: Returning timestamped data...
  467 +main.c: Putting data in buffers...
  468 +main.c: Putting data: 39186,29010,7/6/2014T4:45:0
  469 + buffer.c: Joining buffer...
  470 +[ALLOC] Allocated 4 bytes to 2000F328
  471 +[ALLOC] Allocated 28 bytes to 2000F4A0
  472 +buffer.c: Data copied
  473 +main.c: Message put: 39186,29010,7/6/2014T4:45:0
  474 +[FREE] Freed bytes from 2000F440
  475 +main.c: Memory freed
  476 + main.c: Putting data: 6498,10182,7/6/2014T4:45:0
  477 + buffer.c: Joining buffer...
  478 +[ALLOC] Allocated 4 bytes to 2000F338
  479 +[ALLOC] Allocated 27 bytes to 2000F428
  480 +buffer.c: Data copied
  481 +main.c: Message put: 6498,10182,7/6/2014T4:45:0
  482 +[FREE] Freed bytes from 2000F478
  483 +main.c: Memory freed
  484 + main.c: Data is now in buffer
  485 + buffer.c: Checking available memory...
  486 +buffer.c: Available memory: 33456 B
  487 +buffer.c: Used memory: 1248 B
  488 +main.c: Time (absolute): 3611097900
  489 +Time LONG_PERIOD: 0
  490 +Time SHORT_PERIOD: 0
  491 +main.c: Time (absolute): 3611097960
  492 +Time LONG_PERIOD: 0
  493 +Time SHORT_PERIOD: 0
  494 +[ALLOC] Allocated 12 bytes to 2000F450
  495 +[ALLOC] Allocated 12 bytes to 2000F478
  496 +main.c: Time (absolute): 3611097960
  497 +Time LONG_PERIOD: 0
  498 +Time SHORT_PERIOD: 0
  499 +main.c: Timestamp (absolute): 3611097960
  500 +Timestamp LONG_PERIOD: 0
  501 +Timestamp SHORT_PERIOD: 0
  502 +main.c: Timestamping data...
  503 +[ALLOC] Allocated 8 bytes to 2000F490
  504 +[ALLOC] Allocated 32 bytes to 2000F4C8
  505 +main.c: Data is: 39180,29010,7/6/2014T4:46:0
  506 +[FREE] Freed bytes from 2000F450
  507 +[ALLOC] Allocated 31 bytes to 2000F4F0
  508 +main.c: Data is: 6496,10162,7/6/2014T4:46:0
  509 +[FREE] Freed bytes from 2000F478
  510 +main.c: Returning timestamped data...
  511 +main.c: Putting data in buffers...
  512 +main.c: Putting data: 39180,29010,7/6/2014T4:46:0
  513 + buffer.c: Joining buffer...
  514 +[ALLOC] Allocated 8 bytes to 2000F450
  515 +[ALLOC] Allocated 28 bytes to 2000F518
  516 +[FREE] Freed bytes from 2000F4A0
  517 +[FREE] Freed bytes from 2000F328
  518 +[ALLOC] Allocated 28 bytes to 2000F4A0
  519 +buffer.c: Data copied
  520 +main.c: Message put: 39180,29010,7/6/2014T4:46:0
  521 +[FREE] Freed bytes from 2000F4C8
  522 +main.c: Memory freed
  523 + main.c: Putting data: 6496,10162,7/6/2014T4:46:0
  524 + buffer.c: Joining buffer...
  525 +[ALLOC] Allocated 8 bytes to 2000F328
  526 +[ALLOC] Allocated 27 bytes to 2000F4C8
  527 +[FREE] Freed bytes from 2000F428
  528 +[FREE] Freed bytes from 2000F338
  529 +[ALLOC] Allocated 27 bytes to 2000F428
  530 +buffer.c: Data copied
  531 +main.c: Message put: 6496,10162,7/6/2014T4:46:0
  532 +[FREE] Freed bytes from 2000F4F0
  533 +main.c: Memory freed
  534 + main.c: Data is now in buffer
  535 + buffer.c: Checking available memory...
  536 +buffer.c: Available memory: 33344 B
  537 +buffer.c: Used memory: 1360 B
  538 +main.c: Time (absolute): 3611097960
  539 +Time LONG_PERIOD: 0
  540 +Time SHORT_PERIOD: 0
  541 +main.c: Time (absolute): 3611098020
  542 +Time LONG_PERIOD: 0
  543 +Time SHORT_PERIOD: 0
  544 +[ALLOC] Allocated 12 bytes to 2000F478
  545 +[ALLOC] Allocated 12 bytes to 2000F4F0
  546 +main.c: Time (absolute): 3611098020
  547 +Time LONG_PERIOD: 0
  548 +Time SHORT_PERIOD: 0
  549 +main.c: Timestamp (absolute): 3611098020
  550 +Timestamp LONG_PERIOD: 0
  551 +Timestamp SHORT_PERIOD: 0
  552 +main.c: Timestamping data...
  553 +[ALLOC] Allocated 8 bytes to 2000F338
  554 +[ALLOC] Allocated 32 bytes to 2000FC20
  555 +main.c: Data is: 39184,29008,7/6/2014T4:47:0
  556 +[FREE] Freed bytes from 2000F478
  557 +[ALLOC] Allocated 31 bytes to 2000FCC0
  558 +main.c: Data is: 6500,10233,7/6/2014T4:47:0
  559 +[FREE] Freed bytes from 2000F4F0
  560 +main.c: Returning timestamped data...
  561 +main.c: Putting data in buffers...
  562 +main.c: Putting data: 39184,29008,7/6/2014T4:47:0
  563 + buffer.c: Joining buffer...
  564 +[ALLOC] Allocated 12 bytes to 2000F478
  565 +[ALLOC] Allocated 28 bytes to 2000F4F0
  566 +[FREE] Freed bytes from 2000F518
  567 +[ALLOC] Allocated 28 bytes to 2000F518
  568 +[FREE] Freed bytes from 2000F4A0
  569 +[FREE] Freed bytes from 2000F450
  570 +[ALLOC] Allocated 28 bytes to 2000F4A0
  571 +buffer.c: Data copied
  572 +main.c: Message put: 39184,29008,7/6/2014T4:47:0
  573 +[FREE] Freed bytes from 2000FC20
  574 +main.c: Memory freed
  575 + main.c: Putting data: 6500,10233,7/6/2014T4:47:0
  576 + buffer.c: Joining buffer...
  577 +[ALLOC] Allocated 12 bytes to 2000F450
  578 +[ALLOC] Allocated 27 bytes to 2000FC20
  579 +[FREE] Freed bytes from 2000F4C8
  580 +[ALLOC] Allocated 27 bytes to 2000F4C8
  581 +[FREE] Freed bytes from 2000F428
  582 +[FREE] Freed bytes from 2000F328
  583 +[ALLOC] Allocated 27 bytes to 2000F428
  584 +buffer.c: Data copied
  585 +main.c: Message put: 6500,10233,7/6/2014T4:47:0
  586 +[FREE] Freed bytes from 2000FCC0
  587 +main.c: Memory freed
  588 + main.c: Data is now in buffer
  589 + main.c: Programmed send cycle...
  590 +main.c: Connecting wifi...
  591 +main.c: SSID = SERVER_WLAN
  592 +main.c: Wep key = TGW2YHNKT9TW
  593 +main.c: Passphrase = TGW2YHNKT9TW
  594 +main.c: User =
  595 +main.c: Password =
  596 +main.c: Encryption type = 4
  597 +main.c: Geo Localization = 41.557255 2.096183
  598 +main.c: WPA network detected
  599 +Connected
  600 +Connected to: 00:26:5B:D9:0D:18
  601 +main.c: Sending buffer 0
  602 +buffer.c: Preparing JSON statement...
  603 +[ALLOC] Allocated 18 bytes to 2000F540
  604 +[ALLOC] Allocated 12 bytes to 2000FC48
  605 +[ALLOC] Allocated 16 bytes to 20010018
  606 +[ALLOC] Allocated 22 bytes to 20010030
  607 +[ALLOC] Allocated 37 bytes to 20010050
  608 +[ALLOC] Allocated 52 bytes to 20010080
  609 +[FREE] Freed bytes from 20010050
  610 +[FREE] Freed bytes from 20010018
  611 +[ALLOC] Allocated 55 bytes to 200100C0
  612 +[FREE] Freed bytes from 20010030
  613 +[FREE] Freed bytes from 20010080
  614 +[FREE] Freed bytes from 2000FC48
  615 +[ALLOC] Allocated 72 bytes to 20010018
  616 +[FREE] Freed bytes from 2000F540
  617 +[FREE] Freed bytes from 200100C0
  618 +[ALLOC] Allocated 12 bytes to 2000F540
  619 +[ALLOC] Allocated 16 bytes to 2000F558
  620 +[ALLOC] Allocated 22 bytes to 20010068
  621 +[ALLOC] Allocated 37 bytes to 20010088
  622 +[ALLOC] Allocated 52 bytes to 200100B8
  623 +[FREE] Freed bytes from 20010088
  624 +[FREE] Freed bytes from 2000F558
  625 +[ALLOC] Allocated 55 bytes to 200100F8
  626 +[FREE] Freed bytes from 20010068
  627 +[FREE] Freed bytes from 200100B8
  628 +[FREE] Freed bytes from 2000F540
  629 +[ALLOC] Allocated 126 bytes to 20010068
  630 +[FREE] Freed bytes from 20010018
  631 +[FREE] Freed bytes from 200100F8
  632 +[ALLOC] Allocated 12 bytes to 2000F540
  633 +[ALLOC] Allocated 16 bytes to 2000F558
  634 +[ALLOC] Allocated 22 bytes to 20010018
  635 +[ALLOC] Allocated 37 bytes to 20010038
  636 +[ALLOC] Allocated 52 bytes to 200100F0
  637 +[FREE] Freed bytes from 20010038
  638 +[FREE] Freed bytes from 2000F558
  639 +[ALLOC] Allocated 55 bytes to 20010130
  640 +[FREE] Freed bytes from 20010018
  641 +[FREE] Freed bytes from 200100F0
  642 +[FREE] Freed bytes from 2000F540
  643 +[ALLOC] Allocated 180 bytes to 20010170
  644 +[FREE] Freed bytes from 20010068
  645 +[FREE] Freed bytes from 20010130
  646 +[ALLOC] Allocated 182 bytes to 20010018
  647 +[FREE] Freed bytes from 20010170
  648 +[ALLOC] Allocated 14 bytes to 2000F540
  649 +[ALLOC] Allocated 62 bytes to 200100D8
  650 +[ALLOC] Allocated 350 bytes to 20010120
  651 +[ALLOC] Allocated 4 bytes to 2000F558
  652 +[FREE] Freed bytes from 2000F558
  653 +[FREE] Freed bytes from 20010120
  654 +[ALLOC] Allocated 4 bytes to 2000FC48
  655 +[FREE] Freed bytes from 2000FC48
  656 +[FREE] Freed bytes from 200100D8
  657 +[FREE] Freed bytes from 2000F540
  658 +[FREE] Freed bytes from 20010018
  659 +buffer.c: Data sent successfully
  660 +[FREE] Freed bytes from 2000F4F0
  661 +[FREE] Freed bytes from 2000F518
  662 +[FREE] Freed bytes from 2000F4A0
  663 +[FREE] Freed bytes from 2000F478
  664 +main.c: Sending buffer 1
  665 +buffer.c: Preparing JSON statement...
  666 +[ALLOC] Allocated 18 bytes to 2000F4A0
  667 +[ALLOC] Allocated 11 bytes to 2000F478
  668 +[ALLOC] Allocated 16 bytes to 2000F4F0
  669 +[ALLOC] Allocated 21 bytes to 2000F508
  670 +[ALLOC] Allocated 36 bytes to 2000F528
  671 +[ALLOC] Allocated 51 bytes to 20010018
  672 +[FREE] Freed bytes from 2000F528
  673 +[FREE] Freed bytes from 2000F4F0
  674 +[ALLOC] Allocated 54 bytes to 2000F528
  675 +[FREE] Freed bytes from 2000F508
  676 +[FREE] Freed bytes from 20010018
  677 +[FREE] Freed bytes from 2000F478
  678 +[ALLOC] Allocated 71 bytes to 20010018
  679 +[FREE] Freed bytes from 2000F4A0
  680 +[FREE] Freed bytes from 2000F528
  681 +[ALLOC] Allocated 11 bytes to 2000F478
  682 +[ALLOC] Allocated 16 bytes to 2000F4A0
  683 +[ALLOC] Allocated 21 bytes to 2000F4F0
  684 +[ALLOC] Allocated 36 bytes to 2000F510
  685 +[ALLOC] Allocated 51 bytes to 20010068
  686 +[FREE] Freed bytes from 2000F510
  687 +[FREE] Freed bytes from 2000F4A0
  688 +[ALLOC] Allocated 54 bytes to 2000F510
  689 +[FREE] Freed bytes from 2000F4F0
  690 +[FREE] Freed bytes from 20010068
  691 +[FREE] Freed bytes from 2000F478
  692 +[ALLOC] Allocated 124 bytes to 20010068
  693 +[FREE] Freed bytes from 20010018
  694 +[FREE] Freed bytes from 2000F510
  695 +[ALLOC] Allocated 11 bytes to 2000F478
  696 +[ALLOC] Allocated 16 bytes to 2000F4A0
  697 +[ALLOC] Allocated 21 bytes to 2000F4F0
  698 +[ALLOC] Allocated 36 bytes to 2000F510
  699 +[ALLOC] Allocated 51 bytes to 20010018
  700 +[FREE] Freed bytes from 2000F510
  701 +[FREE] Freed bytes from 2000F4A0
  702 +[ALLOC] Allocated 54 bytes to 2000F510
  703 +[FREE] Freed bytes from 2000F4F0
  704 +[FREE] Freed bytes from 20010018
  705 +[FREE] Freed bytes from 2000F478
  706 +[ALLOC] Allocated 177 bytes to 200100F0
  707 +[FREE] Freed bytes from 20010068
  708 +[FREE] Freed bytes from 2000F510
  709 +[ALLOC] Allocated 179 bytes to 20010018
  710 +[FREE] Freed bytes from 200100F0
  711 +[ALLOC] Allocated 14 bytes to 2000F478
  712 +[ALLOC] Allocated 62 bytes to 2000F4F0
  713 +[ALLOC] Allocated 347 bytes to 200100D8
  714 +[ALLOC] Allocated 4 bytes to 2000F4A0
  715 +[FREE] Freed bytes from 2000F4A0
  716 +[FREE] Freed bytes from 200100D8
  717 +[ALLOC] Allocated 4 bytes to 2000F4B8
  718 +[FREE] Freed bytes from 2000F4B8
  719 +[FREE] Freed bytes from 2000F4F0
  720 +[FREE] Freed bytes from 2000F478
  721 +[FREE] Freed bytes from 20010018
  722 +buffer.c: Data sent successfully
  723 +[FREE] Freed bytes from 2000FC20
  724 +[FREE] Freed bytes from 2000F4C8
  725 +[FREE] Freed bytes from 2000F428
  726 +[FREE] Freed bytes from 2000F450
  727 +main.c: Polling battery level...
  728 +[ALLOC] Allocated 12 bytes to 2000F428
  729 +[ALLOC] Allocated 25 bytes to 2000F440
  730 +[FREE] Freed bytes from 2000F428
  731 +[ALLOC] Allocated 18 bytes to 2000F4A0
  732 +[ALLOC] Allocated 5 bytes to 2000F428
  733 +[ALLOC] Allocated 16 bytes to 2000F478
  734 +[ALLOC] Allocated 15 bytes to 2000F4C0
  735 +[ALLOC] Allocated 30 bytes to 2000F4D8
  736 +[ALLOC] Allocated 45 bytes to 2000F500
  737 +[FREE] Freed bytes from 2000F4D8
  738 +[FREE] Freed bytes from 2000F478
  739 +[ALLOC] Allocated 48 bytes to 2000F538
  740 +[FREE] Freed bytes from 2000F4C0
  741 +[FREE] Freed bytes from 2000F500
  742 +[FREE] Freed bytes from 2000F428
  743 +[ALLOC] Allocated 65 bytes to 2000F4C0
  744 +[FREE] Freed bytes from 2000F4A0
  745 +[FREE] Freed bytes from 2000F538
  746 +[ALLOC] Allocated 67 bytes to 2000F510
  747 +[FREE] Freed bytes from 2000F4C0
  748 +[FREE] Freed bytes from 2000F440
  749 +[ALLOC] Allocated 14 bytes to 2000F428
  750 +[ALLOC] Allocated 62 bytes to 2000F4A0
  751 +[ALLOC] Allocated 234 bytes to 20010018
  752 +[ALLOC] Allocated 3 bytes to 2000F440
  753 +[FREE] Freed bytes from 2000F440
  754 +[FREE] Freed bytes from 20010018
  755 +[ALLOC] Allocated 4 bytes to 2000F458
  756 +[FREE] Freed bytes from 2000F458
  757 +[FREE] Freed bytes from 2000F4A0
  758 +[FREE] Freed bytes from 2000F428
  759 +[FREE] Freed bytes from 2000F510
  760 +main.c: Requesting new NTP time...
  761 +main.c: Updating new time to 3611098035
  762 +main.c: Time updated
  763 +main.c: Disconnecting wifi...
  764 +main.c: Disconnecting Successful: WIFI_DISCONNECT_SUCCESS
  765 +main.c: New NTP time (absolute): 3611098035
  766 +Time LONG_PERIOD: 45
  767 +Time SHORT_PERIOD: 15
  768 +buffer.c: Checking available memory...
  769 +buffer.c: Available memory: 33544 B
  770 +buffer.c: Used memory: 1160 B
  771 +main.c: Time (absolute): 3611098035
  772 +Time LONG_PERIOD: 45
  773 +Time SHORT_PERIOD: 15
  774 +Failed
... ...
Project/applications/smartcities/sensors.c
... ... @@ -439,17 +439,6 @@ void collectData(char* valueSensors[], uint8_t* sensors)
439 439 uint8_t i;
440 440 for(i=0;i<strlen((char*)sensors);i++)
441 441 {
442   -
443   - if(valueSensors[i]!=NULL)
444   - {
445   - DBG_SENSORS("Freeing memory from previous entry on index %d\r\n",i);
446   - chHeapFree(valueSensors[i]);
447   - }
448   - else
449   - {
450   - DBG_SENSORS("Not freeing memory on index %d\r\n",i);
451   - }
452   -
453 442 if(sensors[i]==LIGHT_ADDR)
454 443 {
455 444 DBG_SENSORS("Fetching data from light sensor\r\n");
... ...