I don't receive any data from the car

Inquiry and support for Freematics products
goodyear
Posts: 5
Joined: Mon Nov 09, 2015 7:30 pm

Re: I don't receive any data from the car

Post by goodyear »

Sorry, I didn't change anything, I used the code as it is in github
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: I don't receive any data from the car

Post by stanley »

That's really weird. Are you able to do some debugging? First need to find cause of all thoese 0 time data. It even has nothing to do with OBD. Time elapsed between two data is calculated from Arduino's millis() function.
goodyear
Posts: 5
Joined: Mon Nov 09, 2015 7:30 pm

Re: I don't receive any data from the car

Post by goodyear »

I re-installed everything (ArduinoUno, Freematics firmware+libraries) and did some trials.
Connecting the device via USB (no OBD) I get empty files.
Connecting the device via OBD (on a car) I only get one file like this:
#FREEMATICS
0 10C 0
$GPGSV 1 1 00*79$GPS 0 0 0 0 0 0 0 0>10305 20 -73 -63 -1000
0 21 11 0 2
0 22 -9 5 -17
0 10D 0
$GPGSV 1 1 00*79$GPS 0 0 0 0 0 0 0 0>140 20 -72 -56 -1014
0 21 9 -1 0
0 22 -9 5 -18
0 104 0
$GPGGA 0 0 99.99 *48$GPS 0
0 21 10 1 1
0 22 -8 4 -17
0 111 16
$GPGSV 1 1 00*79$GPS 0 0 0 0 0 0 0 0>153 20 -71 -55 -999
0 21 9 -1 1
0 22 -9 5 -18
0 105 29
$GPGSV 1 1 00*79$GPS 0 0 0 0 0 0 0 0>167 20 -74 -60 -1007
0 21 10 0 2
0 22 -9 4 -17
0 10C
$GPGSV 1 1 1 3 28*71$GPS 0 0 0 0 0 0 0 0>1424

Luckily I had saved the old code (before you modified for slow protocols on Nov 12th). And with this previous version the time issue is not there. But...
Here is what I get w/o OBD (device supplied via USB):
#FREEMATICS
23101 ACC 905 -18 -437
0 GYR 13 -48 13
0 MAG -1 3 -8
$GPS 0 0 0 0 0 0 0 0>77 BAT 0
5098 ACC 878 -65 -495
0 GYR 12 -1 8
0 MAG 0 3 -8
$GPS 0 0 0 0 0 0 0 0>5145 ACC 847 -79 -517
0 GYR 6 2 4
0 MAG 0 3 -8
$GPS 0 0 0 0 0 0 0 0>71 BAT 0
157 ACC 870 -79 -509
0 GYR 12 -4 6
0 MAG -1 3 -8
$GPS 0 0 0 0 0 0 0 0>202 ACC 853 -79 -511
0 GYR 7 4 -2
0 MAG -1 3 -8
$GPS 0 0 0 0 0 0 0 0>202 ACC 864 -73 -521
0 GYR 16 -4 3
0 MAG 0 3 -8
$GPS 0 0 0 0 0 0 0 0>221 ACC 858 -78 -529

So everything seems fine in this case, except it doesn't start a new line after the GPS, but that should be easy to fix.

More importantly, here is what I get with the OBD (device connected to a car):
#FREEMATICS
16657 10C 1674
72 ACC 1070 -22 -315
0 GYR 18 5 -2
0 MAG 1 0 -4
$GPS 0 0 0 0 0 0 0 0>74 BAT 14
137 10D 69
65 ACC 803 8 -536
0 GYR 26 63 4
0 MAG 1 0 -4
$GPS 0 0 0 0 0 0 0 0>178 104 62
65 ACC 973 -134 -443
0 GYR 0 -8 -7
0 MAG 2 0 -4
$GPS 0 0 0 0 0 0 0 0>

Time is then ok now, but this is the whole content of one file. And it saves one file like this every 15-20 sec (look at the first timestamp).

As a quick debug, I added the following lines at line 372 in datalogger.ino (# if ENABLE_DATA_LOG):
logData('\r');
logData('R');logData('e');logData('c');logData('o');logData('n');logData('n');logData('e');logData('c');logData('t');
logData('\r');
closeFile();
flushFile();
And at the end of each file it writes "Reconnect".
So I guess the bug is in the connection. For some reason it continuously get connected/disconnected.

Any thoughts?

P.S.
When I compile I always get this message:
Low memory available, stability problems may occur.
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: warning: cannot set sck period. please check for usbasp firmware update.

Not sure whether this has an impact.
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: I don't receive any data from the car

Post by stanley »

So it is the issue with the latest firmware/library. I will look at this.
The message about USBasp can be ignored. It shows every time even you program an Arduino board.
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: I don't receive any data from the car

Post by stanley »

0 time elapsed data is caused by a bug in the latest sketch. Just fixed it.
goodyear
Posts: 5
Joined: Mon Nov 09, 2015 7:30 pm

Re: I don't receive any data from the car

Post by goodyear »

Still not working :(
10 minutes trip only 2 empty files. And the same when supplied via USB.
Ricardo
Posts: 8
Joined: Wed Apr 13, 2016 1:30 am

Re: I don't receive any data from the car

Post by Ricardo »

Hello guys,

this is, what I got from a trip, longer than an hour.
I uploaded the latest V3 Firmware Code on the V3 Datalogger via Arduino as ISP. My testing car was VW Golf VI 1.4, I think OBD communication was via K-Line.

As I see on the file size of 2KB, connection got lost during the trip.
Does anyone know whats the problem?

Or is there someone who made the V3 Datalogger work??

Any help would be great!

Regards,
Ricardo

Code: Select all

#FREEMATICS            
#6329   10C   1702      
0   24         
0   47         
0   50         
0   47         
0   2A         
0   37         
0   39         
77   20   664   150   862
0   21   7   -5   3
154   10D   62      
0   24         
0   47         
0   50         
0   47         
0   2A         
0   37         
0   39         
75   20   635   75   814
0   21   1   2   10
154   104   17      
0   24         
0   47         
0   50         
0   47         
0   2A         
0   37         
0   39         
73   20   623   120   949
0   21   -4   -3   17
155   111   3      
0   24         
0   47         
0   50         
Post Reply