Data Logger Demo Application
Risposta
11/05/15 6.41
Hi everyone,

I've been reading through the "Getting Started" guide for the XDK and saw a demo application beeing mentioned called "Data Logger: Storage of sensor data on a Micro-SD card" which I'm not able to find anywhere. As it would save a lot of time for quick PoC, does a demo like that exist already and how can I get my hands on it?

Thanks a lot!
0 (0 Voti)
Data Logger Demo Application
Risposta
11/05/15 11.29 come risposta a Chuan Liu.
Hi singapore_xdk,

the demo "Data Logger" has not yet been released, but it will come soon.

Regards,
Manuel
0 (0 Voti)
Data Logger Demo Application
Risposta
12/05/15 5.21 come risposta a Manuel Cerny.
Hi singapore_xdk,
Maybe you could tell us a little bit about the application in have in mind? What sensor data would you want to store and for how long?
When would you ideally want to use such a demo?
I'll get back to about when we think we might have this so that you know how to proceed.
Best wishes,
William
0 (0 Voti)
Data Logger Demo Application
Risposta
20/05/15 6.41 come risposta a William Stevenson.
Hi William, Hi Manuel,

thanks for the quick replies that I unfortunately noticed just now.
For the purpose of our PoC, in the meantime we've built a very simple application based on the "PSD_printSensorData" example. It simply creates a CSV file for each sensor on the SD card and adds a new line every second consisting of the current sensor data and timestamp.

If there's interest in making this available to the community, just let us know!

Best regards,
Philipp
0 (0 Voti)
Data Logger Demo Application
Risposta
26/05/15 12.35 come risposta a Chuan Liu.
Hi Mr. Philipp,
I have heard, the Data Logger application is available in four weeks.
In the meantime, we want to work with your simple logging application based on the "PSD_printSensorData" example .
So can you please making this available to the community (?)
Thanks and best regards
  Manfred
 
0 (0 Voti)
Data Logger Demo Application
Risposta
26/05/15 14.24 come risposta a Manfred Holzapfel.
Hi Mr. Philipp,
we have the following fwe additional questions:
1. Are the csv - files on the Mini SD card readable via USB ?
2. Can we explore to the file structure inside the XDX via the XDK Workbench ?
Thanks and best regards
  Manfred
0 (0 Voti)
Data Logger Demo Application
Risposta
03/06/15 5.45 come risposta a Manfred Holzapfel.
Hello Manfred,
The CSV files are stored on the micro SD card as one file per sensor. As far as I know the SD card can not be read through the USB interface but only using a seperate card reader. Regarding the file structure we simply store the raw sensor data one value per column and once every second together with the current milliseconds elapsed since the device was turned on. This can of course be changed in the source code.

As for sharing I couldn't find a way to do this here in the community. Maybe the easiest would be via email?

Best regards
Philipp
0 (0 Voti)
Data Logger Demo Application
Risposta
05/06/15 9.03 come risposta a Chuan Liu.
Dear Philipp

Although the Data Logger Application is available now, I would still be very interested in getting your code. I have made the email visible in the profile. Would it be possible to send it there?

Many thanks in advance
Simon
0 (0 Voti)
Data Logger Demo Application
Risposta
08/06/15 7.08 come risposta a Jochen Traub.
Dear Phillip,
can You tell me, which MICRO SD card type can we use to insert in the XDK ?
- micro SD
- micro SDHC
- micro SDXC
or all ?

thanks for Your help

Kind Regards
  Manfred
0 (0 Voti)
Data Logger Demo Application
Risposta
09/06/15 7.21 come risposta a Manfred Holzapfel.
Dear Manfred and Simon,

As far as I'm aware all types of micro SD cards should work, we are using a 32GB SDHC with our demo.
I'll prepare the code and send it out later today.

Best regards
Philipp
0 (0 Voti)
Data Logger Demo Application
Risposta
10/06/15 11.28 come risposta a Singapore XDK.
Dir Philipp,

the data logger application works fine now.
Only the values of the timestamp column seems to be not very acurat.

I have made a logfile (all sensors on; 50 Hz sampling) over exactly on hour.

Last timestamp value = 3350120 ms; expected about 3600000 ms; Difference =  249880 ms (6,9 %)

I have also made a logfile (all sensors on; 100 Hz sampling) over exactly on hour.

Last timestamp value = 2503668 ms; expected about 3600000 ms; Difference =  1096332 ms (30,4 %)

Have You any explination for the differences ?

Kind Regards
  Manfred
0 (0 Voti)
Data Logger Demo Application
Risposta
11/06/15 11.35 come risposta a Manfred Holzapfel.
Dear Philipp,

I have noticed that the unit of the Gyroscop values  (e.G. 'bmg160_z[mDeg]') is mDeg. I think, it should be mDeg/s (?)

Kind regards
  Manfred
0 (0 Voti)
Data Logger Demo Application
Risposta
16/12/15 9.33 come risposta a Manfred Holzapfel.
Hello, we are having trouble copying the INI file to the SD card.

We tried using my mobile phone to save the INIF-file from the desktop to the SD-Card (via USB Cable), and we noticed there's also a logger.ini file in the DDL-demo itself. We also tried flashing the ini-file in the demo by the XDK workbench, but we keep getting the same problem:

After flashing, the error: "bad filename in logger.ini" keeps appearing (see attachment), and the measuring devices are all 0 / disabled  (see picture), even while in the 2 ini's (the one on the SD-card AND the one in the DDL_demoDataLogger via the workbench) we set the value to 1.

After booting / rebooting / flashing, the red light is burning constantly....

Any ideas what can cause this? Which of the 2 ini files should we use:
-A separate one, edited on the HD of the desktop and manually copied to SD card, or
-The ini-file in the DDL-demo project?
0 (0 Voti)
Data Logger Demo Application
Risposta
12/06/15 4.57 come risposta a Addi Houdijk.
Dear Philipp, Manfred and addi_houdijk,

thanks for your replies here over the thread.

I'll try answer everything in their original order:
Quote singaporexdk:
As far as I'm aware all types of micro SD cards should work, we are using a 32GB SDHC with our demo. 
Only microSD cards that fall under the SDHC (2.0) standard are supported. I've published a small FAQ a few days ago, you can find it here:
https://xdk.bosch-connectivity.com/xdk-community/category/[faq]-supported-sd-cards/25525-t/25524#id25524
Quote from holma:
I have noticed that the unit of the Gyroscop values  (e.G. 'bmg160_z[mDeg]') is mDeg. I think, it should be mDeg/s (?) 
I think you are right here. I opened a ticket so this will get fixed.
We tried using my mobile phone to save the INIF-file from the desktop to the SD-Card (via USB Cable), and we noticed there's also a logger.ini file in the DDL-demo itself. We also tried flashing the ini-file in the demo by the XDK workbench, but we keep getting the same problem: 

After flashing, the error: "bad filename in logger.ini" keeps appearing (see attachment), and the measuring devices are all 0 / disabled  (see picture), even while in the 2 ini's (the one on the SD-card AND the one in the DDL_demoDataLogger via the workbench) we set the value to 1. 

After booting / rebooting / flashing, the red light is burning constantly.... 

Any ideas what can cause this? Which of the 2 ini files should we use: 
-A separate one, edited on the HD of the desktop and manually copied to SD card, or 
-The ini-file in the DDL-demo project?
The two files "logger.ini" and "custlog.ini" in the src folder are only sample config files and are ignored by the XDK as the XDK only reads the ini files from the SD Card.

When putting these two files onto the SD Card, try using a direct connection to the SD Card and format the SD Card properly before using it. I highly recommend you not to use a smartphone or any other such device to put things on your SD Card, the chance that these devices will also put other data on your SD Card is quite high. You also never have the control about line endings and other parameters that could influence the behaviour of your XDK.

The "bad filename in logger.ini" seems to be exactly such a problem if you used the sample logger.ini that was in the src folder as the XDK complains about a faulty filename setting in your logger.ini configuration.

A constant burning red led means Internal Error, most likely caused by your logger.ini file. 
To fix this, try putting the sample ini files in your project onto your SDCard directly from your computer and the error should be gone.



I hope this helps everyone!
Let me know if you have further questions.

- Florian
0 (0 Voti)
Data Logger Demo Application
Risposta
24/06/15 13.00 come risposta a Manuel Cerny.
Dear Florian, today we tried loading the logger.ini file directly to the SD card using a card reader, but I got the same results: "bad filename in logger.ini". We also trief formatting the card, but no luck there. Any other ideas on this subject?
 
0 (0 Voti)
Data Logger Demo Application
Risposta
25/06/15 2.57 come risposta a Addi Houdijk.
Hi addi_houdijk,

after hours of testing I'm finally able to give you a better answer.

There seems to be a problem in the data logger demo that prevents you from using it the way it's intended.

First here are a few hints on the SD Card itself:
- Make sure to format the SD Card in FAT32 
-- Do that under Windows ( I had bad results under Mac OS X, probably due to the hidden files that are created upon FS creation )
-- Label the parition something like "UNTITLED" no spaces please
- Only put your ini files in the root, no other files

Now in your XDK application, search for the file "XDK_Datalogger_cc.c" and replace the following:


    ret = ini_gets("general", "filename", 0, config.filename, 13, "logger.ini");

with:


    ret = ini_gets("general", "filename", "log-%02d.csv", config.filename, 13, "logger.ini");

After that, insert the SD Card and things should work for you!

Let me know if it works! 

- Florian

0 (0 Voti)
Data Logger Demo Application
Risposta
16/12/15 9.33 come risposta a Florian Harr.
Unfortunately it still doesn't work. After formatting (FAT32), labelling ("UNTITLED:), and putting the logger.ini file onto the SD card, we changed one line in the "XDK_Datalogger_cc.c" file (see picture) as suggested. The text "bad filename in logger.ini" doesn't appear anymore, but still th red light is on permanently. We tested with the name "log-%04d.csv" and "log-%04i.csv", both as 3rd arguement to the function ini_gets (in the C file). and made sure that the name in the logger.inifile on the SD card was the same.

Console output pasted below, please note output says "enabled" is 0, shouldn't this be 1?

===================

INFO | Disconnecting XDK device 'XDK Device 1' from port 'COM13'...
INFO | Port 'COM13' has been disconnected
INFO | Connecting to XDK device 'XDK Device 1' in port 'COM13'...
INFO | Connection to port 'COM13' established
INFO | Flashing file 'C:/XDK-Workbench/workspace/DDL_demoDataLogger/make/exe/XDK110_DDL.bin'...
INFO | Transmission successfully completed!
INFO | Booting application...
INFO | XDK DEVICE 1: Jumping to application
INFO | Disconnecting XDK device 'XDK Device 1' from port 'COM13'...
INFO | Port 'COM13' has been disconnected
INFO | Connecting to XDK device 'XDK Device 1' in port 'COM13'...
INFO | Connection to port 'COM13' established
INFO | XDK DEVICE 1: config.bma280_enabled: 0
INFO | XDK DEVICE 1: config.bma280_bandwidth: 0
INFO | XDK DEVICE 1: config.bma280_range: 0
INFO | XDK DEVICE 1: config.bma280_sampling_rate_timer_ticks: 0
INFO | XDK DEVICE 1:
INFO | XDK DEVICE 1: config.bmg160_enabled: 0
INFO | XDK DEVICE 1: config.bmg160_bandwidth: 0
INFO | XDK DEVICE 1: config.bmg160_sampling_rate_timer_ticks: 0
INFO | XDK DEVICE 1:
INFO | XDK DEVICE 1: config.bmi160_enabled: 0
INFO | XDK DEVICE 1: config.bmi160_bandwidth_accel: 0
INFO | XDK DEVICE 1: config.bmi160_bandwidth_gyro: 0
INFO | XDK DEVICE 1: config.bmi160_range: 0
INFO | XDK DEVICE 1: config.bmi160_sampling_rate_timer_ticks: 0
INFO | XDK DEVICE 1:
INFO | XDK DEVICE 1: config.bmm150_enabled: 0
INFO | XDK DEVICE 1: config.bmm150_data_rate: 0
INFO | XDK DEVICE 1: config.bmm150_sampling_rate_timer_ticks: 0
INFO | XDK DEVICE 1:
INFO | XDK DEVICE 1: config.bme280_enabled: 0
INFO | XDK DEVICE 1: config.bme280_oversampling: 0
INFO | XDK DEVICE 1: config.bme280_filter_coefficient: 0
INFO | XDK DEVICE 1: config.bme280_sampling_rate_timer_ticks: 0
INFO | XDK DEVICE 1:
INFO | XDK DEVICE 1: config.max44009_enabled: 0
INFO | XDK DEVICE 1: config.max44009_integration_time: 0
INFO | XDK DEVICE 1: config.max44009_sampling_rate_timer_ticks: 0
INFO | XDK DEVICE 1:
0 (0 Voti)
Data Logger Demo Application
Risposta
29/06/15 6.37 come risposta a Addi Houdijk.
Hi Florian,
I have still the line
ret = ini_gets("general", "filename", 0, config.filename, 13, "logger.ini");
instead of Your suggestion
ret = ini_gets("general", "filename", "log-%02d.csv", config.filename, 13, "logger.ini");
in XDK_Datalogger_cc.c.
Everything works fine.
Should I nevertless change this line ?
Kind Regards
  Manfred
0 (0 Voti)
Data Logger Demo Application
Risposta
01/07/15 4.41 come risposta a Manfred Holzapfel.
Hi Manfred,

there's no need for you to change this line if it works for you. 
This is only adding a scenario where the SD Card can't be read and this default value will be inserted instead.

- Florian
0 (0 Voti)
Data Logger Demo Application
Risposta
01/07/15 4.44 come risposta a Florian Harr.
Hi addi_houdijk,

the line you've changed is giving the XDK default values for the parameters you've set in the logger.ini in case it can't read them from the SD card (in cases where there's a problem with the logger.ini). 
As your log tells me, the "bad filename in logger.ini" error is gone which makes it look like your SD card isn't writeable.

Do you have another SD Card to test this again?
It really looks like it's a problem where the XDK can't write to the SD card.

- Florian
0 (0 Voti)