Need help with initial setup of Carloop

I’ve been trying to get Carloop working on just a basic level (i.e. reading available PIDs) from my vehicle and I’m not having any luck.

I’m using Carloop with an Electron plugged in. When I plug the Carloop into the OBD port it powers the Electron, but I can’t get it to read OBD data. Both cars are Honda (2010 and 2015).

In speaking with Julien over e-mail he recommended that I try changing the speed from the default of 500 to something like 250 or 1000 (because some vehicles use these speeds) and that was a good suggestion but it didn’t make any difference in my case.

Eventually I tried the “minimal” example in the Github library, which just returns the CAN message count. This does seem to work (with the default speed of 500 kbps) and it seems to return about 1500 CAN messages per second. Not sure if that is typical or not.

But I’m unable to get any further than this. The “Blink LED” example doesn’t blink the LED and the “Available PIDs” example (posted by a forum member here) doesn’t return anything.

My Electron is on firmware 0.6.0.

I have an extension cable which is about 10 ft. long and if I use that cable it still exhibits the same problem. The one interesting thing about the cable is it’s an extremely tight fit in the carloop and OBD port and doesn’t quite go in all the way. I ordered another ODB extension cable which is shorter and perhaps will fit better, so I’ll find out how that works later this week.

Any help would be greatly appreciated… thanks!

Mike

Subbed; I’m having similar issues with the OBD-blink not working on my 2016 BMW F82 M4 nor on a Toyota Yaris. Haven’t tried yet to see whether carloop_minimal is reporting CAN messages, but I can report that it’s seemingly not reporting GPS location (I do see many asterisks though, and can share output if it’d be useful).

Only difference on my end other than the cars is firmware 0.6.1, as I’m also using an electron.

update: I can see the CAN Messages count increment by +10 every 1s. Hooray, activity, but I have a feeling 10 messages/sec is low (same rate w/ iginition on/engine off, and both on).

Is this still a problem?
Sorry, I only get the chance to login here on weekends…

One thing to try is to send the messages to the serial port and view on your computer or other connected device. You will get a whole lot of messages, but by looking at just one of the messages you should be able to tell if you are getting real messages, or just garbage.

Yeah, I’m still struggling to get replies back from the vehicle. Tried a different OBD cable which fits better but still have the same problem. When I filter on all CAN traffic it returns around 1500 messages per second and the Message IDs are usually in the range of 300-1500 or thereabouts.

I haven’t checked the actual data being returned. Not sure how I would know the difference between real messages and garbage but the Message IDs seem pretty realistic.

Is there any chance the receive buffer could be filling up and causing it to “miss” diagnostic reply messages? I’m looping every 5ms and the amount of messages in the queue hovers around 15 as I continue to receive them (doesn’t appear to be maxing out but maybe I’m not understanding it correctly).

I haven’t tried this yet, but I assume if I set my filter to 0x7E0 and mask to 0x7F0, that would cover any potential OBD diagnostic reply messages.

Mike

@mike_b,

It looks like you are not filling the CAN buffer. If I have read the docs correctly, the default buffer can hold 32 messages.
https://docs.particle.io/reference/firmware/photon/#can-canbus-

If you filter for OBD diagnostic messages, you will have to make sure you send a request for those messages. There will be no OBD reply without a request first being sent. You will need to set up your firmware to behave like an OBD scan tool. I think there is a sample that does that … you will need to look at that code to see how it is done.

@cyclin_al1,

Thanks, I ended up at the same conclusion about the buffer. I already have the firmware set up to send the diagnostic message and check the reply. The message transmits “successfully” (no error returned on the transmit() call) but I never get a reply back. For reference, here is the current code I’m using for building the message:

CANMessage message;
message.id = 0x7DF; // This should send the message to the ECU
message.len = 8; // message will always be 8 bytes
message.data[0] = 0x02; // 2 bytes of data in message
message.data[1] = 0x01; // Get current data
message.data[2] = 0x00; // The PID to retrieve (Get Available PIDs)
message.data[3] = 0x55;
message.data[4] = 0x55;
message.data[5] = 0x55;
message.data[6] = 0x55;
message.data[7] = 0x55;

I tried some other stuff like the following:

  • Setting message ID to 0x7E0 (for some reason @jvanier sample code is using 0x7E0 instead of 0x7DF and I’m not sure why or if there is a difference)
  • Setting the trailing 5 bytes to 0x00 instead of 0x55, or not setting them at all
  • Changing the PID to retrieve from 0x00 to something else like 0x0D (vehicle speed)

I’ve also tried it with and without this filter (still don’t get a reply, but without the filter I can see other CAN messages on the bus):

canDriver.addFilter(0x7E0, 0x7F0); // reply might come from an address between 0x7E8 and 0x7EF

I confirmed my car is using 500kbps for the speed because it states that in the manual.

One other thing to note, I’m using a 5 ft. extension cable because the Carloop doesn’t fit very well in the OBD port on my car. That makes me wonder if there is some kind of signal degradation on the transmit where the message is never getting to the OBD port. My firmware never detects any problems with the OBD interface though (no error status code is set).

Thanks,
Mike

Will it fit without the cable? I suppose it’s possible the extension is somehow changing the termination resistance.

I’ve solved the problem with my setup-- details can be found in my other post, thanks!

https://community.carloop.io/t/handling-29-bit-extended-format/239