model H not read j1939 protocol

Inquiry and support for Freematics products
Post Reply
maicollbellpi
Posts: 6
Joined: Fri Sep 17, 2021 8:13 am

model H not read j1939 protocol

Post by maicollbellpi »

Hi Stanley, please read this,


The model H does not read protocol J1939, because the chip version elm327 v1.5 that you are using is not compatible with it.
I read this code: FrematicsOBD.ccp and I tried to send the following AT commands:

link->sendCommand("ATZ\r", buffer, sizeof(buffer), OBD_TIMEOUT_SHORT);
link->sendCommand("AT SP A\r", buffer, sizeof(buffer), OBD_TIMEOUT_SHORT);
link->sendCommand("AT DP\r", buffer, sizeof(buffer), OBD_TIMEOUT_SHORT);

The response of the chip was the following:

[UART SEND] AT Z
>UART RECV] LM327 v1.5
[UART SEND] AT SP A
>UART RECV] OK
[UART SEND] AT DP
>UART RECV] AUTO, ERROR

Searching in the web, I found that the datasheet of this chip (elm327 v1.5) says: Elm Electronics never made a v1.5,


I appreciate your help in finding a solution to read the J1939 protocol whit this chip (ELM327 v 1.5). Or if you have a device that has a chip that reads the J1939 protocol that we can purchase.
stanley
Site Admin
Posts: 1018
Joined: Sat Mar 01, 2014 3:15 am

Re: model H not read j1939 protocol

Post by stanley »

Since we don't use any ELM327 chips, we have our way of J1939 traffic monitoring. Use example code j1939_monitor.
maicollbellpi
Posts: 6
Joined: Fri Sep 17, 2021 8:13 am

Re: model H not read j1939 protocol

Post by maicollbellpi »

HI Stanley,

we already use the example that you say, and it doesn't detect any value. in (FreematicsPlus.cpp), I check up the tag "#define VERBOSE LINK" to see UART traffic, and add line to check protocol setted in (FreematicsOBD.cpp), like that:

if (protocol != PROTO_AUTO) {
sprintf(buffer, "ATSP %X\r", protocol);
if (!link->sendCommand(buffer, buffer, sizeof(buffer), OBD_TIMEOUT_SHORT) || !strstr(buffer, "OK")) {
return false;
}
}
stage = 2;
if (protocol == PROTO_J1939) {
link->sendCommand("AT DP\r", buffer, sizeof(buffer), OBD_TIMEOUT_SHORT); // add line to check protocol setted.
m_state = OBD_CONNECTED;
errors = 0;
return true;
}

the response is:

[UART BEGIN]
[UART SEND]ATI
>UART RECV]OBD2USART V1.5
[UART SEND]ATZ
>NO DATACV]ELM327 v1.5
[UART SEND]ATE0
>UART RECV]OK
[UART SEND]ATH0
>UART RECV]OK
[UART SEND]ATSP B
>UART RECV]OK
[UART SEND]AT DP
>UART RECV]AUTO, ERROR
J1939 data monitor started

I still can't read the J1939 protocol on trucks.

please Help us
screenshot VS code
screenshot VS code
Captura.JPG (179.43 KiB) Viewed 11639 times
....
stanley
Site Admin
Posts: 1018
Joined: Sat Mar 01, 2014 3:15 am

Re: model H not read j1939 protocol

Post by stanley »

I see you have modified the FreematicsOBD.cpp and added some code. Please use the original. Please don't think you are working with ELM327 although it appears to be. Also we have stated on the product page that only broadcast traffic of J1939 can be obtained.
sharase
Posts: 1
Joined: Tue Jan 10, 2023 3:23 pm

Re: model H not read j1939 protocol

Post by sharase »

Use screen sample code j1939 to monitor traffic subway surfers
Post Reply