[Newbie] One+ empty CSV files

Inquiry and support for Freematics products
Post Reply
dsjstc
Posts: 6
Joined: Fri Jun 01, 2018 8:20 am

[Newbie] One+ empty CSV files

Post by dsjstc »

I've followed the quickstart guide (flashed V5 firmware into a virgin One+ unit with GPS), and plugged the device into the known-good OBD2 port on my 2010 Prius. I get activity on the console, but the CSV files on the SD card are all empty, or at most have a "#Freematics" header.

I can't find a troubleshooting guide, and none of the forum posts I've browsed seem to have this type of problem. Is there a troubleshooting recipe somewhere?

Thanks!
stanley
Site Admin
Posts: 1018
Joined: Sat Mar 01, 2014 3:15 am

Re: [Newbie] One+ empty CSV files

Post by stanley »

Please check your serial output for any clue.
dsjstc
Posts: 6
Joined: Fri Jun 01, 2018 8:20 am

Re: [Newbie] One+ empty CSV files

Post by dsjstc »

Third flash is the charm, I guess.

Is there a way to send debug logs to the SD card? I can't find anything on the forum, and my search terms around it get rejected as "too common".
nick
Posts: 5
Joined: Mon Jun 18, 2018 8:43 am

Re: [Newbie] One+ empty CSV files

Post by nick »

Hello, I think there's a bug with the datalogger program - I had the same problem where no data was actually being saved to SD but it was fine saving to SPIFFS.

The problem is the file was never being closed and therefore never actually being saved, this is within the datalogger.h file

I've fixed it for myself and would it attach the file here but I'm unable to do so. I fixed it by changing the write function within the SDLogger class to below. You also have to make "char path[24] = "/DATA";" a global variable. Might be a bit of shody fix but it works for me

void write(const char* buf, byte len)
{
// open();//ADDED THIS TOOOOOOOOOOOOOOOOO
m_file = SD.open(path, SD_FILE_READ | SD_FILE_WRITE);
if (m_next) m_next->write(buf, len);
m_file.write((uint8_t*)buf, len);
m_file.write('\n');
m_file.close();
}
dsjstc
Posts: 6
Joined: Fri Jun 01, 2018 8:20 am

Re: [Newbie] One+ empty CSV files

Post by dsjstc »

Thanks for this -- I didn't get a notification, for some reason, and just happened to notice it now.

It looks like this has been handled in Stanley's Aug 4 commit. I'll give it a whirl and try to remember to report back if it works.
stanley
Site Admin
Posts: 1018
Joined: Sat Mar 01, 2014 3:15 am

Re: [Newbie] One+ empty CSV files

Post by stanley »

It was a typo and has been fixed.
Post Reply