A few questions

Inquiry and support for Freematics products
Post Reply
Tiba~
Posts: 2
Joined: Fri Sep 11, 2020 12:47 pm

A few questions

Post by Tiba~ »

Hi there!

I have been working away on my project and all is well, I have all the basics working how I want and now I'm up to the hard part.

I need to do some CAN sniffing for the steering wheel controls on my car, I have the UART 2.1 adaptor and I know it can do can sniffing but I couldn't find any good sample code so I had a dig around your GITHUB and found the sniffing sample, I have ported the functions over to the UART adaptor lib and I think it works, testing on the OBD emulator, I know it wont work how I want( I get a message) more just to make sure it connects and that before I go out to my car.

1.) Can I ran an OBDII connection and CAN sniff at the same time? I assume it wont work because I could get random CAN message while waiting for the OBDII response? I ask because I'm not sure how to go about this part, how do I get my RPM value and listen for steering wheel control CAN messages? I'm I slow and I can get all that data from CAN sniffing, its just not as easy as asking OBDII for the value?

2). Do I have to shutdown the OBDII connection each time? Is it safe to just pull the adaptor out when I'm done? I notice you stop CAN sniffing each time before a new session is started.

3.) I'm bad or I just ask to much form the 16mhz MCU, my LCD update takes 80ms, waiting for OBDII response takes some time so once I have it all running, I'm at around 144ms per tick, so I'm thinking of moving to Pi4, I ported the UART class and it compiles but before i go to deep, do you know if it will work? UART is UART so once the code works in the correct way I should just be able to send commands to the adaptor just like i do now with my mega
Post Reply