BMW OBD Service 0x22 Extended PIDs

Discussion on the Lua Scripting capabilities for RaceCapture/Pro. Also see the <a href="">Lua Scripting Guide</a>

Moderators: JeffC, stieg

Post Reply
Posts: 5
Joined: Fri Oct 01, 2021 1:17 am

BMW OBD Service 0x22 Extended PIDs

Post by TYRFRYR »

For all the BMW owners, you may or may not have discovered that your vehicle does not respond to OBD Service 0x22 queries when using a RaceCapture device. Upon a review of the RaceCapture firmware for version 2.19.0 (available on github) it was determined that the firmware, in its’s current implementation, isn’t capable of accommodating BMW OBD Service 0x22 queries. A write up on the specifics of BMW OBD Service 0x22 messaging can be found here

Without having native firmware support, a Lua script was developed to perform BMW OBD Service 0x22 queries for data from the various ECU modules throughout the vehicle. The script implements the same “Bubble Up” PID scheduling method as in the firmware so similar PID performance can be expected. Unfortunately, the Central Gateway Module will not respond to Service 0x22 queries from the script while also being queried for standard PIDs that may be configured on the OBDII Mapping Tab of the RaceCapture app. For this reason, OBDII Mapping should be turned off while using the script.

The script, in its native form, is rather large and requires “minification” to be loaded in the RaceCapture Device (tested on Track Mk2 and Track Mk3). A minified version of the script is available as a public script preset through the RaceCapture app. The full script (with comments and documentation) along with processing/building tools is available as a public github repository. A guide for using the script with links to the repository are located here

I’d like to give a thank you to EarlyApex for helping to test and improve the script!


The SECRET Ingredient!

Site Admin
Posts: 6281
Joined: Wed Jan 24, 2007 6:36 am

Re: BMW OBD Service 0x22 Extended PIDs

Post by brentp »

This is great, thanks for your contribution!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply