Cannot Monitor CANBUS Data

Inquiry and support for Freematics products
td1973
Posts: 17
Joined: Mon Apr 10, 2017 4:35 am

Cannot Monitor CANBUS Data

Postby td1973 » Tue Aug 27, 2019 10:56 am

This forum will not let me post the intended message. It says, "Not enough characters"?

Hello All,

I'm having trouble getting the CABNUS sniffing option to work with the Freematics product.

Hardware:
Freematics OBD-II (with removable harness)
Arduino MEGA 2560

Vehicle:
2006 Infiniti G35
2016 Chevrolet Equinox
2017 Chevrolet Cruze


I am able to initialize and receive Battery Voltage, DTC info, Supported PIDs, etc. However, the code will not allow the Single or Multi PID to work.

When I modify the code, I'm able to get Engine RPM, however the delay is 2-3 seconds per update and also lagging/behind in the update.

I know that the CANBUS data is available because I'm able to get it working with another product in real-time.

Thank you in advance for any help resolving this issue.

Code Used:

#include <Wire.h>
#include <SoftwareSerial.h>
#include <OBD.h>

#define mySerial Serial

COBD obd;
bool hasMEMS;

void readPIDSingle()
{
/*
int value;
mySerial.print('[');
mySerial.print(millis());
mySerial.print(']');
mySerial.print("RPM=");
if (obd.readPID(PID_RPM, value)) {
mySerial.print(value);
}
mySerial.println();
*/

if(obd.readPID(PID_RPM, value)){
Serial.println(value);
}
}

void setup()
{
mySerial.begin(115200);
while (!mySerial);

// this will begin serial
byte version = obd.begin();

delay(2000);
}


void loop()
{
readPIDSingle();

/* readPIDMultiple();
readBatteryVoltage();
if (hasMEMS) {
readMEMS();
}
*/
}


Output before code edit:
No DTC
1 DTC: 6200
[26015]Battery:11.9V
[44183]Battery:11.9V
[68262]Battery:11.9V
[86476]Battery:11.9V


Output after code edit (very slow):

No DTC
650
650
650
662
662
662
1500
1500
1500
1500
1500
2187
Last edited by td1973 on Mon Oct 07, 2019 9:42 am, edited 1 time in total.

td1973
Posts: 17
Joined: Mon Apr 10, 2017 4:35 am

Re: Cannot Monitor CANBUS Data

Postby td1973 » Tue Aug 27, 2019 10:59 am

Output from another device on CANBUS. This is what I would like to achieve from the Freematics product.:

2D1,0,0,0,1,49,3,0,0
2D1,0,0,0,1,49,3,0,0
2D1,0,0,0,1,49,3,0,0
2DE,2,8,2,1,49,3,0,0
216,64,8,2,1,49,3,0,0
251,16,0,0,1,0,47,18,49
23D,99,0,0,234,0,8,1,126
791,0,0,0,0,192,0,16,126
2,29,0,0,7,26,0,16,126
294,0,0,0,0,0,0,70,220
2D1,0,0,0,2,49,3,0,220
2D1,0,0,0,2,49,3,0,220
280,0,0,0,0,0,0,2,0
2DE,2,8,3,0,0,0,2,0
215,255,240,255,0,255,255,2,0
253,1,73,255,0,0,0,173,2
551,116,0,0,160,0,2,128,2
794,4,98,0,160,0,2,128,2
2,29,0,0,7,11,2,128,2
2D1,0,0,0,3,49,3,0,2
2D1,0,0,0,3,49,3,0,2
2D1,0,0,0,3,49,3,0,2
2DE,2,8,0,3,49,3,0,2
216,64,8,0,3,49,3,0,2

td1973
Posts: 17
Joined: Mon Apr 10, 2017 4:35 am

Re: Cannot Monitor CANBUS Data

Postby td1973 » Fri Aug 30, 2019 3:38 am

Nobody? The product page says this device supports CANBUS sniffing:

https://freematics.com/pages/products/f ... apter-mk2/

Are there any code examples to illustrate the commands for this function?

For instance, I've tried

Serial1.print()

Serial1.println()

Serial1.write()

Nothing seems to initialize.

Typical sniffing on 11-bit 500kbps CAN bus

ATSP6
ATCF 700
ATCM FFFFFF00
ATM1
Typical sniffing on 29-bit 500kbps CAN bus

ATSP7
ATCF 18DBF133
ATCM FF000000
ATM1


Thank you.

td1973
Posts: 17
Joined: Mon Apr 10, 2017 4:35 am

Re: Cannot Monitor CANBUS Data

Postby td1973 » Tue Sep 10, 2019 10:02 pm

Can someone please answer this question?

I've been trying for weeks without any success.

Thank you.

stanley
Site Admin
Posts: 748
Joined: Sat Mar 01, 2014 3:15 am

Re: Cannot Monitor CANBUS Data

Postby stanley » Thu Sep 12, 2019 5:06 pm

Refer to the CAN sniffing commands on the product page. They are different from ELM327.
https://freematics.com/pages/products/f ... apter-mk2/

td1973
Posts: 17
Joined: Mon Apr 10, 2017 4:35 am

Re: Cannot Monitor CANBUS Data

Postby td1973 » Tue Sep 17, 2019 11:10 am

Thank you. I already referenced that page, but I can't get the CAN commands to work.

Do you have a line of code to show how to initialize it?

As shown in the post above, I've tried:

Serial1.print()

Serial1.println()

Serial1.write()

With all the commands and nothing seems to work.

stanley
Site Admin
Posts: 748
Joined: Sat Mar 01, 2014 3:15 am

Re: Cannot Monitor CANBUS Data

Postby stanley » Tue Sep 17, 2019 3:25 pm

You know the adapter has USB port. I suggest you try out AT commands via USB first before using Arduino to do it.

td1973
Posts: 17
Joined: Mon Apr 10, 2017 4:35 am

Re: Cannot Monitor CANBUS Data

Postby td1973 » Sat Sep 28, 2019 10:28 pm

I cannot get this to work on USB either.

It works via Arduino Serial1 for the PID commands, so why won't it work with the CANBUS monitoring commands?

I would appreciate a single line of code to illustrate how to initialize the CANBUS streaming/sniffing.

I have tried:


ATCF (xxx) // xxx = any ID that works with the other product
ATM1


Or just:
ATM1

Using either (with or without ""):

Serial1.print(ATM1) //("ATM1")

Serial1.println(ATM1) //("ATM1")

Serial1.write(ATM1) //("ATM1")

td1973
Posts: 17
Joined: Mon Apr 10, 2017 4:35 am

Re: Cannot Monitor CANBUS Data

Postby td1973 » Mon Oct 07, 2019 6:41 am

Bump! I would appreciate a simple answer to a simple request. This is taking far too long to get working and no sample code to help?

I'll make it easy, which line of code is correct to initialize the CANbus sniffing mode:

1. Serial1.print(ATM1) ;

2. Serial1.print("ATM1");

3. Serial1.println(ATM1);

4. Serial1.println("ATM1");

5. Serial1.write(ATM1);

6. Serial1.write("ATM1");

7. Other - Please specify

td1973
Posts: 17
Joined: Mon Apr 10, 2017 4:35 am

Re: Cannot Monitor CANBUS Data

Postby td1973 » Sat Nov 02, 2019 10:53 pm

Wow, the support of this issue is terrible.

No sample code

Can't get a reply from the developer in over a month.

Other threads get replies by the developer and my thread
gets ignored.


How do I return the product?

All I'm asking for is ONE LINE of code to illustrate initialization, which SHOULD HAVE BEEN INCLUDED WITH SAMPLE CODE!


Return to “Freematics Products”

Who is online

Users browsing this forum: No registered users and 7 guests