Reciveing Passive Information on the CAN-BUS (Not Querying)

Inquiry and support for Freematics products
Monroe07
Posts: 4
Joined: Sun Oct 11, 2015 10:40 am

Reciveing Passive Information on the CAN-BUS (Not Querying)

Postby Monroe07 » Sun Oct 18, 2015 7:29 am

Ok, So as far as I understand, There are 2 types of information on a CAN-BUS.

A type of info you have to query for (send a PID or Request for), and information that is being broadcast automatically or being asked for already by another device on the network.

My question is this;

how do I read (Sniff) and view the information on the bus that's already being sent? I don't want to "send" anything to an ECU, I just want to receive everything on the bus and then sort or "filter" out what I don't want or need. Is that already what the i2c_RPM does? Just show you what you want to see from everything that is being sent on the bus?
If so, How do the opposite? Send a request onto the bus and receive the response?

I'm starting to regret buying this and not going with the Seeed Studio shield in which I can completely customize what I send and filter the information in a much simpler manor.

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

Re: Reciveing Passive Information on the CAN-BUS (Not Queryi

Postby stanley » Sun Oct 18, 2015 12:20 pm

We are working on the sniff mode. Currently this is not yet supported.

cottjr
Posts: 10
Joined: Sat Jun 03, 2017 8:08 am

Sniffing OBD - Re: Reciveing Passive Information on the CAN-BUS (Not Querying)

Postby cottjr » Wed Jun 14, 2017 12:33 pm

+1 on this request.

In order to use the Freematics ONE for a fleet project I'm working on, it needs to be able to sniff.

Is sniffing possible now? Has this capability become possible since Oct 2015? Can somebody share an update?

jonathan
Posts: 18
Joined: Thu Feb 04, 2016 1:25 pm

Re: Reciveing Passive Information on the CAN-BUS (Not Querying)

Postby jonathan » Tue Jun 20, 2017 1:32 pm

I'm working on a custom firmware to sniff CAN data from Tesla vehicles. I'll make a post here once it's finished.

cottjr
Posts: 10
Joined: Sat Jun 03, 2017 8:08 am

Re: Reciveing Passive Information on the CAN-BUS (Not Querying)

Postby cottjr » Wed Jun 21, 2017 6:53 am

Jonathan,

Tesla focused sniffing firmware - sounds great!

What kind of trajectory are you on - days, weeks, months away?

Are you planning to share open source, or sell licenses?

jonathan
Posts: 18
Joined: Thu Feb 04, 2016 1:25 pm

Re: Reciveing Passive Information on the CAN-BUS (Not Querying)

Postby jonathan » Mon Jun 26, 2017 1:04 pm

I talked to stanley on facebook about this. He said it's not possible to do sniffing with the STM32 chip and no firmware is available. He advised to get a CAN shield if you want to do sniffing.

We tried setting the chip in to Monitor All mode (by sending the ATMA command and trying to read constantly), but got no results. Here's the code I used in case you're wondering:

bool COBDSPI::init(OBD_PROTOCOLS protocol, HardwareSerial& s) {
s.println();
const char *initcmd[] = {"ATZ\r",
// "ATL1\r",
"ATE0\r",
"ATH0\r",
"ATCRA\r",
// "ATCS\r",
// "ATCFC1\r",
// "ATCM0ff\r"
// "ATS1\r",
// "ATS1\r",
// "ATAL\r",
// "ATMA\r"
};
char buffer[64];

m_state = OBD_DISCONNECTED;
for (unsigned char i = 0; i < sizeof(initcmd) / sizeof(initcmd[0]); i++) {
write(initcmd[i]);
if (receive(buffer, sizeof(buffer), OBD_TIMEOUT_LONG) == 0) {
return false;
}
s.print(initcmd[i]);
s.println(buffer);
}


if (protocol != PROTO_AUTO) {
sprintf_P(buffer, PSTR("ATSP %u\r"), protocol);
write(buffer);
s.print(buffer);

if (receive(buffer, sizeof(buffer), OBD_TIMEOUT_LONG) == 0 && !strstr(buffer, "OK")) {
return false;
}
s.println(buffer);
}
write("ATMA\r");
while(1) {
sprintf(buffer, "reset");
receive(buffer, sizeof(buffer), OBD_TIMEOUT_LONG);
s.print("ATMA");
s.println(buffer);
delay(30);
}
};

cottjr
Posts: 10
Joined: Sat Jun 03, 2017 8:08 am

Re: Reciveing Passive Information on the CAN-BUS (Not Querying)

Postby cottjr » Thu Jun 29, 2017 12:30 am

Hmm - so close...

Well thanks very much for giving this a shot :)

eric
Posts: 7
Joined: Sun Nov 26, 2017 10:11 am

Re: Reciveing Passive Information on the CAN-BUS (Not Querying)

Postby eric » Mon Nov 27, 2017 5:31 am

jonathan wrote:
> I talked to stanley on facebook about this. He said it's not possible to do
> sniffing with the STM32 chip and no firmware is available. He advised to
> get a CAN shield if you want to do sniffing.

:o
This simple sniffing to get data which is already on the bus was the main reason i bought the ONE+.
I read "arduino" and "open source" and since i have it working on a bulky shield, i thought this nice newer and faster "ONE+" must be even better!
Very disappointing at the moment to see this limitation.

The EV-Community need such a tool!
Tesla, Daimler, Smart, Renault, Hyundai, etc.

... if i can help. i have a smart and a zoe for testing.

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

Re: Reciveing Passive Information on the CAN-BUS (Not Querying)

Postby stanley » Tue Nov 28, 2017 11:37 am

Technically we can implement API for CAN sniffing for Freematics ONE/ONE+. The related AT commands are already implemented in our OBD-II UART Adapters.

eric
Posts: 7
Joined: Sun Nov 26, 2017 10:11 am

Re: Reciveing Passive Information on the CAN-BUS (Not Querying)

Postby eric » Fri Dec 01, 2017 11:16 pm

Hi Stanley,

is there a documentation of the AT-Commands?
Then we can try ourselfe.

...


Return to “Freematics Products”

Who is online

Users browsing this forum: No registered users and 4 guests