SD Card Logging issue

General Q&A specific to RaceCapture/Pro. For app related questions post in the RaceCapture App forum. also see the <a href="http://www.autosportlabs.net/RaceCapture">RaceCapture Information Page</a>

Moderators: JeffC, rdoherty, stieg, brentp

rigamaroo
Posts: 5
Joined: Fri Nov 04, 2016 6:35 am

SD Card Logging issue

Post by rigamaroo »

I'm having issues with SD card logging. I have had the logging working in the past with RCP GPS channels and a custom LUA script to log RPM, Brake pressure and a few other items on my Evo X. I did not log anything for a few months and then switched over to the 2.11.0 firmware and then new 1.8.0 RCP app software. Now I'm having issues with the SD card log files. The log files are being created when I press the log button and the files are proportional in size compared to the length of time I let the logging continue. So the longer I leave the RCP in log mode the larger the files. The problem is the log files contain no data. I looked at the log files with a few different programs and finally with a hex editor found that there is no actual data, it is all binary zeros. What type of incorrect settings could cause this, or where should I begin looking to figure this out?

rigamaroo
Posts: 5
Joined: Fri Nov 04, 2016 6:35 am

Post by rigamaroo »

Correction to the first post, I was actually running the most recent 1.9.0 RCP app not the 1.8.0. That wasn't related to the issue though. The problem was that I used this card for the RC, then lost my GoPro SD card and used this RC SD card for the GoPro until I found a new one. For whatever reason the GoPro files and/or format made it incompatible with the RCP when I switched back. Formatting the SD card solved my issue.

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi,

Glad you figured it out. Yes, formatting the SD card is a good first step for troubleshooting!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Vrushabh
Posts: 22
Joined: Tue Apr 04, 2017 7:26 pm

Post by Vrushabh »

Does the format of SD card affect the logging ?
if yes i would like to know why is it so?

Thank You

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Yes, it affects the logging. A proper and clean format allows computers to write data correctly to storage drives, including SD cards.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

dewittpayne
Posts: 67
Joined: Sun Dec 11, 2016 1:07 am

Post by dewittpayne »

The GoPro puts several directories in the root directory when it formats a card. That is probably confusing the issue.

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Actually, it doesn't matter if other folders and files are present. When RCP goes to create a log, it looks for the next available log file name it can create - RC_1, RC_2 and so on. It's very simple and deterministic, ignoring anything else that might be present on the SD.

A fresh format ensures the file allocation table is not corrupt, and that data shows up where it's expected when written.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Vrushabh
Posts: 22
Joined: Tue Apr 04, 2017 7:26 pm

Post by Vrushabh »

what can be the maximum size of the log file on SD card ?

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

What we use is the standard FAT32, which is limited to 2GB per file.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

air1dpt
Posts: 12
Joined: Tue Jan 26, 2016 8:51 pm
Location: KY, USA

sd logging issues

Post by air1dpt »

I am trying to get my sd logging working again. Sometime in the last 6 months i have lost the capability. I have a MK2 on my daily driver/track car. I have logging set to come on when gps speed > 5. I am on 2.12.0 firmware. I have formatted my sd card. My script looks like this:

function onTick()
if getGpsSpeed() > 5
startLogging()
else
stopLogging()
end
end

While going more than 5mph, the status screen for logging reports that "Status not logging"
but "Logging for" is counting up in seconds from when I exceed 5mph and resets to zero when I stop. I get no script loading errors. After a few test runs, I check the SD card but there are no files created...
It seems like my script is running but there is no data.
Any thoughts on what to try next?

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi, let's try eliminating the lua script as a variable.

Erase the lua script you have, and then write it back to the config.

Then try logging directly using the action button on the unit. What activity do you see? Do you see the logging LED flash, or the red error LED light up?

Also, you can try different SD cards as a test. It was a good idea to do a fresh format (FAT32) - so do that with any other card you test with as well.

Let us know what you find out!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

air1dpt
Posts: 12
Joined: Tue Jan 26, 2016 8:51 pm
Location: KY, USA

Post by air1dpt »

brentp wrote:Hi, let's try eliminating the lua script as a variable.

Erase the lua script you have, and then write it back to the config.

Then try logging directly using the action button on the unit. What activity do you see? Do you see the logging LED flash, or the red error LED light up?

Also, you can try different SD cards as a test. It was a good idea to do a fresh format (FAT32) - so do that with any other card you test with as well.

Let us know what you find out!
I ran through the suggestions and here is what I found:
1) Erased script and wrote back empty script.
2) Attempted to log data by using the action button. Logging status light starts flashing and error light immediately turns on
3) Purchased a new 32gv EVO sd card, formatted FAT32. Installed and performed test 2 above with the same result.

I am getting no where fast trying to solve this problem. Just to re-iterate, I have logged hundreds of sessions in the past so I know that it used to work.

Any additional thoughts or things to try?
Thanks,
Dan

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi,

Thanks for the reply.

it sounds like you've tried at least a couple of different cards formatted to FAT32.

Try this step: when you enable the RaceCapture log (as described here: https://wiki.autosportlabs.com/RaceCapt ... leshooting)

What messages do you see in the log pertaining to logging?

If necessary, we can take a look at your system and perform any necessary repairs.

Thanks,
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

If you can, try a few different SD cards of different sizes - 8 or 16 GB, all with fresh formats. That would help diagnosing the issue. Thanks for working through it!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

EagleWorksAVL
Posts: 1
Joined: Wed May 23, 2018 9:12 pm
Location: Prescott, AZ
Contact:

Post by EagleWorksAVL »

Hello,

I am also having trouble with the getting data from the SD card.

Everything seems to work well on the RaceCapture, when I hit the action button the light comes on and files are being written to the SD card. I have been able to pull data and even tracks in the form of paths I have taken to play with the RCP in the past but its usually a hit or miss, but lately just miss. I am hoping to gather consistent data as anyone would.

using the Application log I have discovered the following:

Starting where I assume importing the file begins

[LogImportWidget] loading log: 5-24-2018-3
[DataStore ] Created session with ID: 9
[RCPAPI ] trying last known device before each other device: COM3 (X 10)

[Datastore ] import_datalog function took 69337.9998207 ms
[RCPAPI ] trying last known device before each other device: COM3
[Datastore ] _refresh_session_data function took 7121.99997902 ms
[Datastore ] import_datalog function took 76459.9997997 ms
[AnalysisView] No best lap could be determined; selecting first lap by default for session 9

[RCPAPI ] trying last known device before each other device: COM3 (X 37)
[Unable to open directory <C]\Users\Documents>
[Unable to open directory <C]\Users\Documents>

My guess is this unable to open directory is where the problem lies.

I tried again with the RCP plugged into the computer desperately hoping for a different result. the log is as follows:

[LogImportWidget] loading log: 5-24-2018-3
[DataStore ] Created session with ID: 10
[Datastore ] import_datalog function took 68257.999897 ms
[Datastore ] _refresh_session_data function took 7407.00006485 ms
[Datastore ] import_datalog function took 75664.9999619 ms
[AnalysisView] No best lap could be determined; selecting first lap by default for session 10
[RCPAPI ] sendCommand exception caused by 'Port Closed'
[Traceback (most recent call last)]
File "autosportlabs\racecapture\api\rcpapi.py", line 436, in sendCommand
File "autosportlabs\comms\comms.py", line 173, in write_message
PortNotOpenException: caused by 'Port Closed'

[TelemetryManager] on_data_connected: False
[RCPAPI ] trying last known device before each other device: COM3
[DataBusPump ] Checking for streaming API support
[StatusPump ] Already running
[TelemetryManager] on_data_connected: True
[TelemetryManager] start() telemetry_enabled: False cell_enabled: False
[TelemetryManager] self._should_connect is false, not connecting
[DataBusPump ] device supports streaming

My guess here is the 'Port Closed' is what is keeping my data from appearing.

Before these runs I formatted the SD card. I tried again after having moved the datastore.sq3 file as instructed on the log troubleshooting page but with no further progress.

I apologize for the lengthy post but I just wanted to be sure it was detailed for anyone who might be able to point out the error.

Thanks.
Team Member
Eagle Works Advanced Vehicle Lab
Embry-Riddle Aeronautical University
Prescott, Arizona

Post Reply