Page 1 of 1

OBD UART CAN Sniffing challenges

Posted: Fri Nov 29, 2019 7:46 pm
by speedneed
I'm currently working on a project based on the Nano kit. My code is almost ready and shows different information on the oled. Currently I'm using a switch button to switch between the different screens.

The next step is to switch the screen based on built-in button of the car (for example cruise control lower speed). I need to sniff the CAN message for the button press to be able to program an action. So the logic will be:
- listen to specific CAN <message>
- Update a counter in the code
- switch to a next page

Now i'm facing difficulties to get the can sniffing feature working. I understood that the OBD UART adapter has a Micro USB socket to connect directly to a laptop. When I connect to my laptop I get an USB malfunction error. Could someone explain the process to get CAN Sniffing to work with the OBD UART adapter? I'm not getting further at the moment. I tried to search on the internet but there is limited information available.

thank you

Re: OBD UART CAN Sniffing challenges

Posted: Tue Dec 03, 2019 9:07 pm
by stanley
Freematics OBD UART adapter V2 supports CAN sniffing.

Re: OBD UART CAN Sniffing challenges

Posted: Mon Dec 09, 2019 10:14 pm
by speedneed
in that case, I ordered the wrong Adapter..Any option for me to get the adapter only, without paying the 30 dollar shipping costs?

Re: OBD UART CAN Sniffing challenges

Posted: Tue Mar 09, 2021 9:47 pm
by speedneed
Bump as I currently have the correct adapter that supports can sniffing. I there any guide on how exactly to sniff from a laptop for example. I connected the OBD connector to the usb port but I'm not able to connect. Any help is appreciated

Re: OBD UART CAN Sniffing challenges

Posted: Sat Mar 13, 2021 4:27 am
by speedneed
I got a bit further with the adapter. I hooked it up to the laptop and used Tera Term to connect to the adapter Freematics OBD-II UART Adapter V2.1.

I'll put some info here that can be useful for other people.

With teraterm
- Speed 115200
- Data 8 bits
- Parity none
- Stop bits 1 bit
- Flow control none
- Select CR in terminal setup
- Select local Echo in terminal setup

Commands to connect:
Once setup you can use the following commands to create a connection
- ATR This will reset the device/setting
- ATZ This will reboot the device
- ATSP0 This will connect to your car's canbus. 0 = the setting for auto. My car uses ATSP6 for example. Both work.
- ATE 0 | 1 Echo on/off. Not exactly sure what this does
- ATH 0 | 1 Display headers on/off
After executing these commands you should have a connection.

Next step is to enable the setting for CAN sniffing:
ATSH 7EB This will set the header to 7EB
ATCM FFFFFFFF This will set the subnet mask. I'm not sure exactly about this command. FFFFFFF0 will ignore the last bytes I think
ATM1 This will start sniffing
ATM0 This will stop sniffing.

Now my problem is that after following this procedure I only get the same results. I'm getting the result of 0100 (All supported PIDS in HEX. Whatever I try I'm not getting any other data. Does anyone have some information about this? Am I missing some steps? It looks like the adapter is not picking up the broadcast messages.