Page 1 of 1

firmware_v4/datalogger OBD_UART_BAUDRATE

Posted: Wed Jun 14, 2017 12:00 pm
by compdriver
Hi All,

I have got the freematics one a couple of weeks ago. Since then I have been trying to get it working on my VW Tiguan (2015, Petrol). According to the information on the internet it uses the CAN bus. The setup process always fails, but at different stages. Already the first command (ATI) results quite often in an SPI timeout. Sometimes, but really seldom, it reaches the loading pid map step, but doesn't come further. Mostly, it fails at ATZ, ATH0 or ATE0 steps with the error SPI timeout. I have been trying to find a solution and everyday I learn more about it, but I still didn't get it working. :)

Does somebody have an idea why already the first command (ATI) results in an SPI timeout? In my understanding, it should just return the firmware version and doesn't require the OBD access. I would expect it to come back quickly without reaching the timeout. Is it something related to a baud rate, which can be adjusted?

I have also noticed that the constant OBD_UART_BAUDRATE is declared but not used in the code.

Thanks a lot in advance!

Viktor

Re: firmware_v4/datalogger OBD_UART_BAUDRATE

Posted: Fri Jun 16, 2017 10:36 am
by compdriver
Nobody has a idea what could be the reason for the SPI timeout?

Could somebody please post a debug log from a working freematics one? I would like to see if anybody else also has SPI timeouts.

Re: firmware_v4/datalogger OBD_UART_BAUDRATE

Posted: Fri Jun 16, 2017 8:28 pm
by protomor
To cover stuff, do you plug in before you start the car, with the car on, or with the car running?

I plugged into a 2016 VW diesel just fine with my megaloggerhd. My code is pretty heavily modified but the protocol autoselect should be fine. Did you change code right out of the box or are you using 100% stanley's code?

Re: firmware_v4/datalogger OBD_UART_BAUDRATE

Posted: Sat Jun 17, 2017 12:05 am
by compdriver
Thanks for your reply, promotor!

I tried to plug it in before start the car and with the car running, but I think I didn't try it with the car on yet. I'll test all three options tomorrow and provide an update.

As I couldn't find any logs on the SD card, I uploaded the latest datalogger code from here: https://github.com/stanleyhuangyc/Freem ... datalogger

This didn't help and I started modifying the code in order to find out the root cause. Changing the protocol from auto to any other doesn't make any difference. Today, I was testing different SPI settings, but still the same result.

Re: firmware_v4/datalogger OBD_UART_BAUDRATE

Posted: Mon Jun 19, 2017 8:43 pm
by compdriver
Hi protomor,

Thanks for your reply! I already replied on Friday, but the post is still in approval. :shock:

Finally, I managed to get some data logged. I uploaded the latest Stanley's datalogger sketch, which contains some changes and plugged freematics in while the car war running (didn't try this before your post ;) ). It seems to be quite unstable (doesn't wake up), but anyway I am quite happy to see some data being logged.

Cheers!
Viktor