OBD UART CAN Sniffing challenges

Inquiry and support for Freematics products
Post Reply
speedneed
Posts: 4
Joined: Wed Nov 27, 2019 8:00 pm

OBD UART CAN Sniffing challenges

Post 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. https://imgur.com/bcjKzpC

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

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

Re: OBD UART CAN Sniffing challenges

Post by stanley »

Freematics OBD UART adapter V2 supports CAN sniffing.

speedneed
Posts: 4
Joined: Wed Nov 27, 2019 8:00 pm

Re: OBD UART CAN Sniffing challenges

Post 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?

speedneed
Posts: 4
Joined: Wed Nov 27, 2019 8:00 pm

Re: OBD UART CAN Sniffing challenges

Post 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

speedneed
Posts: 4
Joined: Wed Nov 27, 2019 8:00 pm

Re: OBD UART CAN Sniffing challenges

Post 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.

Post Reply