07-27-2023, 02:19 PM
(07-27-2023, 01:19 PM)chris_audi Wrote:(07-26-2023, 11:55 AM)jizobizo Wrote:(07-26-2023, 08:08 AM)KreAch3R Wrote:(07-25-2023, 02:46 PM)jizobizo Wrote:(07-24-2023, 08:02 PM)KreAch3R Wrote: Please share the script you are using to get the CANBUS data, and an example output, and I will take a look to help you.
KreAch3R I am at the moment just using can-utils to query the raw data see: Youtube video. I have not created any scripts for it yet as i'm not very good at writing from scratch. My goal is to have a live candump, with filters, run at start up. then have an API poll that data and show on screen when it changes. Again im not good a writing my own code and this is where im stuck lol.
Ah, well then that's your major problem, not injecting the values. You are going to need to find someone that has already done the reverse engineering work and translated the raw values into readable values, using a script (probably python), that will handle all the connecting to the canbus, polling the data, etc. After you get a script output of readable values, you can send these values easily into OAP with obdinject.
Yea and thats where im stuck. I did find in the API thread that peetereczek has created a "CAN bridge" python script that talks to his audi. Im looking to have something like that created. Im still such a noon in python that i can read his script but not sure if i could re-create one of my own, or even manipulate his to work for me. this is why im offering to pay someone to help me script it out. i appreciate your feedback on all of this!!
Hello jizobizo,
i've simplified my script from AUDI CAN bridge to API thread:
I can't upload .py files, so here is a .txt file. Don't forget to rename to .py ;-)
You can use that to get normal values from your canbus (hex to dez conversion).
This is how you seperate the bytes in the python script:
msg[0:2]
351#00FD55E40B7B7B10
msg[2:4]
351#00FD55E40B7B7B10
msg[4:6]
351#00FD55E40B7B7B10
msg[6:8]
351#00FD55E40B7B7B10
msg[8:10]
351#00FD55E40B7B7B10
msg[10:12]
351#00FD55E40B7B7B10
msg[12:14]
351#00FD55E40B7B7B10
msg[14:16]
351#00FD55E40B7B7B10
From my script here is an example for speed signal:
Example: CAN ID 353 on audi a4 b6 contains speed signal ...
For the canbus message (CANID#MESSAGE) "351#00FD55E40B7B7B10" in Python it looks like this with conversation formula:
speed = int(msg[4:6] + msg[2:4], 16) / 200
msg[4:6] = 55
msg[2:4] = FD
now msg[4:6] + msg[2:4] = 55 + FD = 55FD
55FD hexadecimal to dezimal = 22013 / 200 = 110,065 km/h
with "int(speed)" in python you will now get 110 as result.
With that speed value you know could try to obdinject. I didn't got that work, but didn't tried that long.
Hope that this is helpfull for you. If you have any questions, feel free to contact me. We could also write on telegram, if you want to :-)
DUUUUDDDDDEEEE OMG i thought this was a lost cause and i appreciate you soooooo much. If you have paypal shoot me your info in a PM and ill send you some cash.