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.
Reciveing Passive Information on the CAN-BUS (Not Querying)
Re: Reciveing Passive Information on the CAN-BUS (Not Queryi
We are working on the sniff mode. Currently this is not yet supported.
Sniffing OBD - Re: Reciveing Passive Information on the CAN-BUS (Not Querying)
+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?
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?
Re: Reciveing Passive Information on the CAN-BUS (Not Querying)
I'm working on a custom firmware to sniff CAN data from Tesla vehicles. I'll make a post here once it's finished.
Re: Reciveing Passive Information on the CAN-BUS (Not Querying)
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?
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?
Re: Reciveing Passive Information on the CAN-BUS (Not Querying)
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);
}
};
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);
}
};
Re: Reciveing Passive Information on the CAN-BUS (Not Querying)
Hmm - so close...
Well thanks very much for giving this a shot
Well thanks very much for giving this a shot
Re: Reciveing Passive Information on the CAN-BUS (Not Querying)
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.
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.
> 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.
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.
Re: Reciveing Passive Information on the CAN-BUS (Not Querying)
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.
Re: Reciveing Passive Information on the CAN-BUS (Not Querying)
Hi Stanley,
is there a documentation of the AT-Commands?
Then we can try ourselfe.
...
is there a documentation of the AT-Commands?
Then we can try ourselfe.
...