Page 1 of 2

V4 ODB Not connecting

Posted: Wed Mar 22, 2017 4:06 am
by nonarkitten
I have a Smart ForTwo. If I run the EMU327 software, I can ATZ and ATDP shows "AUTO, ERROR" even though I'm pretty sure the car uses 11/500 CANBUS. So I can ATSP6 (Ok) and ATDP shows, "AUTO, ISO 15765-4 (CAN 11/500)", but any commands respond with CAN ERROR or "SEARCHING...UNABLE TO CONNECT".

I'm compiling with the 1.8.1 Arduino IDE. Is that okay?

As an aside, the emu327 program seemed to be missing the last escape character used in the FreematicsONE.cpp file.

Re: V4 ODB Not connecting

Posted: Wed Mar 22, 2017 8:05 am
by protomor
What version of the freematics hardware are you running? Have you updated to the latest code from the repository? 1.8.1 should be fine. Thats what Im compiling with now.

I don't get why you are manually running commands. Does the default out of the box solution not work at all?

Re: V4 ODB Not connecting

Posted: Fri Mar 24, 2017 2:07 pm
by stanley
Tried manually picking protocol on init()?

Re: V4 ODB Not connecting

Posted: Sat Mar 25, 2017 11:50 am
by nonarkitten
protomor wrote:
> What version of the freematics hardware are you running?
V4 with the SIM800 add-in.

> Have you updated
> to the latest code from the repository?
I'll double check, I only pulled it down a couple weeks ago, so it's pretty up-to-date.

> 1.8.1 should be fine. Thats what Im
> compiling with now.
Okay, great!

> I don't get why you are manually running commands. Does the default out of
> the box solution not work at all?

Nope. It starts up and says "ODB NO" and then spits out random numbers forever. So I thought I'd try the EMU to see where it was failing -- it seems that it's not syncing to the CANBUS?

Re: V4 ODB Not connecting

Posted: Sat Mar 25, 2017 11:53 am
by nonarkitten
stanley wrote:
> Tried manually picking protocol on init()?
Yes, that would be around line 87:
Serial.print("OBD ");
if (init(PROTO_CAN_11B_500K)) {

The difference is that using the auto I just keep getting the error "SEARCHING..." while manually specifying the protocol generates "CANBUS ERROR". Not sure what the difference is there.

Re: V4 ODB Not connecting

Posted: Sat Mar 25, 2017 12:11 pm
by nonarkitten
If it matters, it's the IDE on macOS. I don't think that should matter though.

Re: V4 ODB Not connecting

Posted: Sun Mar 26, 2017 2:46 am
by protomor
Have you tried with other protocols?

Re: V4 ODB Not connecting

Posted: Sat Apr 15, 2017 11:02 am
by nonarkitten
I've tried all the protocols. I haven't tried programming it from Windows -- just a random idea. Other than that, I'm fresh out of ideas. Sorry for the delayed response; it's been a crazy couple of weeks. I'm tempted to grab a Fluke from work just to verify there's voltage from my ODBII port.

Re: V4 ODB Not connecting

Posted: Sun Apr 23, 2017 1:23 pm
by nonarkitten
Even when it appears working, most ELM commands just return a question-mark, which is frustrating -- does this mean that the ELM327 emulation in the Freematics ONE is hobbled compared to the one's in the UART and I2C versions? Even the extended AT commands don't work (e.g., ATTEMP), although ATRZ continues to work like a champ. I noticed some commands (e.g., ATMA) will hang the STM32 and nothing short of unplugging the ONE from my car and USB will bring it back. Also some protocols (using ATSP#) followed by 0100 would also crash it.

Performing an ATSP6 (should be right) or ATSP8 (which should be wrong) with and numbered command would generate a "CAN ERROR" in the ELM327 program.

So, assuming the ELM327 emulator is a no-go, I turned debugging on with the datalogger script. All the AT commands seem fine and it just starts timing out with the 0100, 0120 and so on commands. Just "SPI TIMEOUT" over and over again (never CAN ERROR). From what I can tell, the send and receive functions are virtually identical between the two.

I've tried playing with SPI speed, inter-character delays to no avail.

Re: V4 ODB Not connecting

Posted: Sun Apr 23, 2017 1:25 pm
by nonarkitten
Also updated to the latest code as of today.