Skip to content

ECU Communication

Function: GetUdsError

string GetUdsError()
Description:
Retrieves the latest UDS error description.

Returns:
A string containing the description of the last UDS error.

Usage Example
string errorDescription = GetUdsError();
PrintLine($"Latest UDS error: {errorDescription}");

Function: GetUdsErrorCode

byte GetUdsErrorCode()
Description:
Fetches the error code corresponding to the latest UDS error.

Returns:
A byte representing the error code.

Usage Example
byte errorCode = GetUdsErrorCode();
PrintLine($"UDS Error Code: {errorCode}");
Error codes list

HEX Code Abbreviation Description
0x00 NO_ERROR No error detected
0x10 GENERAL_REJECT General rejection of the request
0x11 SERVICE_NOT_SUPPORTED Service is not supported
0x12 SUBFUNCTION_NOT_SUPPORTED Subfunction is not supported
0x13 INCORRECT_MSG_LENGTH_OR_FORMAT Incorrect message length or format
0x14 RESPONSE_TOO_LONG Response too long to be processed
0x21 BUSY ECU is busy and cannot process the request
0x22 CONDITIONS_NOT_CORRECT Conditions not correct for the request
0x24 REQUEST_SEQUENCE_ERROR Sequence of request messages was wrong
0x25 NoResponseFromSubnetComponent No response from the subnet component
0x31 REQUEST_OUT_OF_RANGE Request is out of the acceptable range
0x33 SECURITY_ACCESS_DENIED Security access is denied
0x35 INVALID_SECURITY_KEY The provided security key is invalid
0x36 SECURITY_ATTEMPS_EXCEEED Security access attempts exceeded
0x37 REQUIRED_TIME_DELAY_NOT_EXPIRED Required time delay for the operation has not yet expired
0x70 UPLOAD_DOWNLOAD_NOT_ACCEPTED Upload or download request is not accepted
0x71 TRANSFER_DATA_SUSPENDED Transfer data has been suspended
0x72 GENERAL_PROGRAMMING_FAILURE General programming failure occurred
0x73 WRONG_BLOCK_SEQUENCE_COUNTER Wrong block sequence counter detected
0x78 REPONSE_PENDING Response for the request is still pending
0x79 INVALID_DATA_BLOCK Invalid data block detected
0x7E SUBFUNCTION_NOT_SUPPORTED_IN_ACTIVE_SESSION Subfunction is not supported in the current session
0x7F SERVICE_NOT_SUPPORTED_IN_ACTIVE_SESSION Service is not supported in the current session
0x81 RPM_TOO_HIGH RPM value is too high for operation
0x82 RPM_TOO_LOW RPM value is too low for operation
0x83 ENGINE_IS_RUNNING Engine is currently running
0x84 ENGINE_IS_NOT_RUNNING Engine is not currently running
0x85 ENGINE_RUN_TIME_TOO_LOW Engine run time is too low
0x86 TEMPERATURE_TOO_HIGH Temperature is too high for operation
0x87 TEMPERATURE_TOO_LOW Temperature is too low for operation
0x88 VEHICLESPEED_TOO_HIGH Vehicle speed is too high for operation
0x89 VEHICLESPEED_TOO_LOW Vehicle speed is too low for operation
0x8A THROTTLE_PEDAL_TOO_HIGH Throttle pedal position is too high
0x8B THROTTLE_PEDAL_TOO_LOW Throttle pedal position is too low
0x8C TRANSMISSION_RANGE_NOT_IN_NEUTRAL Transmission is not in neutral
0x8D TRANSMISSION_RANGE_NOT_IN_GEAR Transmission is not in gear
0x8F BRAKE_PEDAL_NOT_PRESSED_OR_NOT_APPLIED Brake pedal is not pressed or applied
0x90 SHIFTER_LEVER_NOT_IN_PARK Shifter lever is not in park position
0x91 TORQUE_CONVERTER_CLUTCH_LOCKED Torque converter clutch is locked
0x92 VOLTAGE_TOO_HIGH System voltage is too high for operation
0x93 VOLTAGE_TOO_LOW System voltage is too low for operation
0xEF SYNC_ERROR Synchronization error occurred
0xF0 - 0xFA CONDITIONS_NOT_CORRECT_Fx Conditions not correct (specific code)
0xFB NOT_CONNECTED_TO_ECU Not connected to ECU
0xFC NO_RESPONSE No response received from ECU
0xFD CONNECTION_ERROR Connection error occurred
0xFE VCI_ERROR Vehicle communication interface error
0xFF UNKNOWN Unknown error or state

Function: OpenEcu

bool OpenEcu(int address, byte session = 0x03)
Description:
Attempts to establish communication with the ECU at the specified address.

Parameters:
- address: The address of the target ECU.
- session: The session type to which to switch (by default = 0x03):

session Description
0x01 OBD Diagnostic mode
0x02 Programming session
0x03 Extended session
0x40 EOL session
0x4F Engineering session

Returns:
true if the connection was successful, false otherwise.

Usage Example 1
1
2
3
4
5
6
7
8
if (OpenEcu(0x19))
{
    PrintLine("Successfully connected to the gateway!");
}
else
{
    PrintLine("Failed to connect to ECU.");
}
Usage Example 2
1
2
3
4
5
6
7
8
if (OpenEcu(0x5F, 0x4F))
{
    PrintLine("Successfully connected to the MIB unit in engineering session!");
}
else
{
    PrintLine("Failed to connect to ECU.");
}

Procedure: CloseEcu

void CloseEcu()
Description:
Terminates the communication with the ECU.

Returns:
None.

Usage Example
CloseEcu();
PrintLine("Disconnected from ECU.");

Function: EcuReset

bool EcuReset(int mode = 0x02)
Description:
Performs a reset on the ECU.

Parameters:
- mode: The type of reset to be performed. Default is 0x02.

mode Description
0x01 Hard reset
0x02 Soft reset

Returns:
true if the reset was successful, false otherwise.

Usage Example
1
2
3
4
5
6
7
8
9
if (!OpenEcu(0x19)) return;
if (EcuReset())
{
    PrintLine("ECU reset successfully!");
}
else
{
    PrintLine("ECU reset failed.");
}

Function: ChangeSession

bool ChangeSession(byte session)
Description:
Changes the current ECU session.

Parameters:
- session: The session type to which to switch:

session Description
0x01 OBD Diagnostic mode
0x02 Programming session
0x03 Extended session
0x40 EOL session
0x4F Engineering session

Returns:
true if the session change was successful, false otherwise.

Usage Example
1
2
3
4
5
6
7
8
9
if (!OpenEcu(0x5F)) return;
if (ChangeSession(0x4F))
{
    PrintLine("Session changed to Engineering successfully!");
}
else
{
    PrintLine("Failed to change session.");
}

Function: ReadDataById

byte[] ReadDataById(int id)
Description:
Reads data from the ECU by specifying a data ID.

Parameters:
- id: The ID of the data to be read.

Returns:
An array of bytes representing the data read from the ECU.

Usage Example
1
2
3
if (!OpenEcu(0x19)) return;
byte[] data = ReadDataById(0x600);
PrintLine($"Gateway coding: {ArrayToHexString(data)}");

Function: WriteDataById

bool WriteDataById(int id, byte[] data, bool writeFingerPrint = true)
Description:
Writes data to the ECU by specifying a data ID.

Parameters:
- id: The ID where the data should be written.
- data: The data to be written.
- writeFingerPrint: A flag indicating whether a fingerprint should be written. Default is true.

Returns:
true if the write operation was successful, false otherwise.

Usage Example
if (!OpenEcu(0x76)) return;
byte[] dataToWrite = { 0x01, 0x02, 0x03 };

if (WriteDataById(0x600, dataToWrite))
{
    PrintLine("Coding written successfully!");
}
else
{
    PrintLine("Failed to write data.");
}

Function: SendRawHex

byte[] SendRawHex(byte[] data, bool supressResponse = false)
Description:
Sends raw hexadecimal data to the ECU.

Parameters:
- data: The raw data to be sent.
- supressResponse: A flag indicating whether the ECU response should be suppressed. Default is false.

Returns:
An array of bytes representing the ECU's response.

Usage Example
1
2
3
4
if (!OpenEcu(0x19)) return;
byte[] rawData = { 0x3E, 0x00 }; // Tester present without response supression
byte[] response = SendRawHex(rawData);
PrintLine($"ECU Response: {ArrayToHexString(response)}");

Security Access

Function: Login

bool Login(int login)
Description:
Attempts to authenticate to the ECU with the given login value.

Parameters:
- login: The value used to attempt to authenticate.

Returns:
true if login was successful, false otherwise.

Usage Example
if (!OpenEcu(0x5f)) return;
if (!ChangeSession(0x4F))
{
    CloseEcu();
    return;
}
int loginValue = 20103;
if (Login(loginValue))
{
    PrintLine("Successfully logged in to ECU.");
}
else
{
    PrintLine("Failed to log in to ECU.");
}

Function: Login

bool Login(string hexAlg, byte mode)

Description:
Attempts to login to the system using the specified hexadecimal algorithm and mode.

Parameters:
- hexAlg: Hexadecimal algorithm to be used for login.
- mode: Mode for the login process.

Return Value:
Returns true if the login was successful, otherwise false.

Usage Example
1
2
3
4
string algorithm = "1234567890ABCD";
byte loginMode = 0x12;
bool isLoggedIn = Login(algorithm, loginMode);
PrintLine($"Login Status: {isLoggedIn}");

Function: GetSeed

byte[] GetSeed(int mode)
Description:
Requests a security seed from the ECU for the specified mode.

Parameters:
- mode: The mode for which a seed is requested.

Returns:
An array of bytes representing the seed provided by the ECU.

Usage Example
1
2
3
int requestMode = 0x03;
byte[] seed = GetSeed(requestMode);
PrintLine($"Received Seed: {ByteArrayToString(seed)}");

Function: SendKey

bool SendKey(int mode, byte[] data)
Description:
Sends a security key to the ECU for the specified mode.

Parameters:
- mode: The mode for which the key is sent.
- data: The calculated key to be sent to the ECU.

Returns:
true if the key was accepted by the ECU, false otherwise.

Usage Example
int keyMode = 0x03;
byte[] calculatedKey = { 0xA1, 0xB2, 0xC3, 0xD4 };
if (SendKey(keyMode, calculatedKey))
{
    PrintLine("Key accepted by ECU!");
}
else
{
    PrintLine("Key rejected by ECU.");
}

Routine Control

Function: StartRoutine

byte[] StartRoutine(int routine, byte[] data = null)

Description:
Initiates a specified routine in the ECU. Optional data can be provided.

Parameters:
- routine: The identifier of the routine to be started.
- data: Optional data to be sent alongside the routine start command.

Returns:
An array of bytes representing the response from the ECU upon starting the routine.

Usage Example
1
2
3
int routineID = 0x0203;
byte[] response = StartRoutine(routineID);
PrintLine($"StartRoutine Response: {ByteArrayToString(response)}");

Function: StopRoutine

byte[] StopRoutine(int routine, byte[] data = null)

Description:
Terminates a specified routine in the ECU. Optional data can be provided if necessary for the termination process.

Parameters:
- routine: The identifier of the routine to be stopped.
- data: Optional data to be sent alongside the routine stop command.

Returns:
An array of bytes representing the response from the ECU upon stopping the routine.

Usage Example
1
2
3
int routineID = 0x0203;
byte[] response = StopRoutine(routineID);
PrintLine($"StopRoutine Response: {ByteArrayToString(response)}");

Function: ResultRoutine

byte[] ResultRoutine(int routine, byte[] data = null)

Description:
Requests the result of a specified routine from the ECU.

Parameters:
- routine: The identifier of the routine whose result is being queried.
- data: Optional data to be sent alongside the routine result request.

Returns:
An array of bytes representing the routine's result.

Usage Example
1
2
3
int routineID = 0x0203;
byte[] routineResult = ResultRoutine(routineID);
PrintLine($"Routine Result: {ByteArrayToString(routineResult)}");

Memory Cells Service

Function: ReadMemoryByAddress

byte[] ReadMemoryByAddress(uint address, uint size, byte alfid)

Description:
Retrieves a specific block of memory from the ECU based on the provided address and size.

Parameters:
- address: The starting memory address from which the read should begin.
- size: The amount of memory, in bytes, to read.
- alfid: is a parameter that denotes the dimensionality of the address and data block size length. It can assume values ranging from 0 to 4 for each digit, for example: 0x11, 0x21, 0x33, 0x42, 0x44, etc.

Returns:
An array of bytes representing the retrieved memory block from the ECU.

Usage Example
1
2
3
4
5
uint startAddress = 0x1000;
uint readSize = 256;
byte locationID = 1;
byte[] memoryData = ReadMemoryByAddress(startAddress, readSize, locationID);
PrintLine($"Memory Data: {ByteArrayToString(memoryData)}");

Function: WriteMemoryByAddress

bool WriteMemoryByAddress(uint address, uint size, byte alfid, byte[] data)

Description:
Writes a block of data to a specified memory address within the ECU.

Parameters:
- address: The starting memory address where the data should be written.
- size: The amount of memory, in bytes, that will be overwritten.
- alfid: is a parameter that denotes the dimensionality of the address and data block size length. It can assume values ranging from 0 to 4 for each digit, for example: 0x11, 0x21, 0x33, 0x42, 0x44, etc.
- data: The data that needs to be written to the memory.

Returns:
A boolean indicating whether the write operation was successful (true) or not (false).

Usage Example
1
2
3
4
5
6
uint startAddress = 0x1000;
uint dataSize = 256;
byte alfid = 0x44;
byte[] dataToWrite = GenerateFilledArray(0xAA, dataSize);  // just an example of filling data
bool isWritten = WriteMemoryByAddress(startAddress, dataSize, alfid, dataToWrite);
PrintLine($"Write Successful: {isWritten}");

Upload/download service

Function: RequestUpload

byte[] RequestUpload(uint address, uint size, byte alfid, byte dfi)

Description:
Initiates a request to upload a specific block of memory content from the ECU. This function helps facilitate the upload of data blocks, often necessary for tasks like firmware updates or data extraction.

Parameters:
- address: The starting memory address from which the upload should begin.
- size: The amount of memory, in bytes, to upload.
- alfid: is a parameter that denotes the dimensionality of the address and data block size length. It can assume values ranging from 0 to 4 for each digit, for example: 0x11, 0x21, 0x33, 0x42, 0x44, etc.
- dfi: Data Format Identifier, indicating the format or structure of the memory being requested.

Returns:
An array of bytes representing the acknowledgment or response from the ECU to the upload request. This often contains metadata about the upload process or the status of the request.

Usage Example
1
2
3
4
5
6
uint startAddress = 0x2000;
uint uploadSize = 512;
byte locationID = 2;
byte formatID = 1;
byte[] response = RequestUpload(startAddress, uploadSize, locationID, formatID);
PrintLine($"ECU Response: {ByteArrayToString(response)}");

Uploading Datasets

Function: UploadXmlDatasetFromContainer (Full Dataset)

bool UploadXmlDatasetFromContainer(string dataName, uint login = 0, string name = null, string version = null)

Description:
Uploads the full dataset stored in the container alongside the application.

Parameters:
- dataName: The name of the dataset in the container.
- login: Optional login ID for ECU authentication.
- name: Optional name for the dataset.
- version: Optional version for the dataset.

Usage Example
bool isSuccess = UploadXmlDatasetFromContainer("dataset1.xml");
PrintLine($"Upload Status: {isSuccess}");

Function: UploadXmlDatasetFromContainer (Specific Indexes)

bool UploadXmlDatasetFromContainer(string dataName, uint login = 0, string name = null, string version = null, params int[] indexes)

Description:
Uploads only specified addresses by indexes from the dataset stored in the container. You can get a list of addresses with indexes using the ListDatasetFromContainer() procedure.

Parameters:
- dataName: The name of the dataset in the container.
- login: Optional login ID for ECU authentication.
- name: Optional name for the dataset.
- version: Optional version for the dataset.
- indexes: Array of index values representing specific addresses to upload.

Usage Example
bool isSuccess = UploadXmlDatasetFromContainer("dataset1.xml", 1, 5, 6);
PrintLine($"Upload Status: {isSuccess}");

Function: UploadXmlDatasetFromFile (Full Dataset)

bool UploadXmlDatasetFromFile(string fileName, uint login = 0, string name = null, string version = null)

Description:
Uploads the entire dataset from a file located in the same folder as the application.

Parameters:
- fileName: Name of the file containing the dataset.
- login: Optional login ID for ECU authentication.
- name: Optional name for the dataset.
- version: Optional version for the dataset.

Usage Example
bool isSuccess = UploadXmlDatasetFromFile("dataset.xml");
PrintLine($"Upload Status: {isSuccess}");

Function: UploadXmlDatasetFromFile (Specific Indexes)

bool UploadXmlDatasetFromFile(string fileName, uint login = 0, string name = null, string version = null, params int[] indexes)

Description:
Uploads only specified addresses by indexes from a dataset file located in the same directory as the application. You can get a list of addresses with indexes using the ListDatasetFromFile() procedure.

Parameters:
- fileName: Name of the file containing the dataset.
- login: Optional login ID for ECU authentication.
- name: Optional name for the dataset.
- version: Optional version for the dataset.
- indexes: Array of index values representing specific addresses to upload.

Usage Example
bool isSuccess = UploadXmlDatasetFromFile("dataset.xml", 2, 3, 4);
PrintLine($"Upload Status: {isSuccess}");

Procedure: ListDatasetFromContainer

void ListDatasetFromContainer(string dataName)

Description:
List all data sets available in the specified container.

Parameters:
- dataName: The name of the data set container.

Usage Example
1
2
3
string containerName = "my_data_container.bin";
ListDatasetFromContainer(containerName);
PrintLine($"Listed datasets from: {containerName}");

Procedure: ListDatasetFromFile

void ListDatasetFromFile(string fileName)

Description:
List all data sets available in the specified file.

Parameters:
- fileName: The name of the file that contains the data sets.

Usage Example
1
2
3
string fileName = "my_data_file.bin";
ListDatasetFromFile(fileName);
PrintLine($"Listed datasets from file: {fileName}");

Function: UploadDatasetGen1

bool UploadDatasetGen1(uint login, uint address, byte alfid, bool erase, byte[] data, bool restart = true, string name = "", string version = "")

Description:
Uploads a Generation 1 dataset using the provided parameters and dataset in the form of a byte array.

Parameters:
- login: Login ID for ECU authentication.
- address: Starting memory address.
- alfid: is a parameter that denotes the dimensionality of the address and data block size length. It can assume values ranging from 0 to 4 for each digit, for example: 0x11, 0x21, 0x33, 0x42, 0x44, etc.
- erase: Flag indicating whether to erase existing data.
- data: Dataset in the form of a byte array.
- restart: Optional flag to restart after upload.
- name: Optional name for the dataset.
- version: Optional version for the dataset.

Usage Example
1
2
3
byte[] datasetData = {/*... byte array data ...*/};
bool isSuccess = UploadDatasetGen1(12345, 0x2000, 0x44, true, datasetData);
PrintLine($"Upload Status: {isSuccess}");
byte[] datasetData = GetDataBytesFromContainer("databytes.bin");
bool isSuccess = UploadDatasetGen1(12345, 0x2000, 0x44, true, datasetData);
PrintLine($"Upload Status: {isSuccess}");

Function: UploadDatasetGen2

bool UploadDatasetGen2(uint login, ushort address, byte[] data, bool restart = true, string name = "", string version = "")

Description:
Uploads a Generation 2 dataset.

Parameters:
- login: Login ID for ECU authentication.
- address: Starting memory address.
- data: Dataset in the form of a byte array.
- restart: Optional flag to restart after upload.
- name: Optional name for the dataset.
- version: Optional version for the dataset.

Usage Example
1
2
3
byte[] datasetData = {/*... byte array data ...*/};
bool isSuccess = UploadDatasetGen2(12345, 0x7202, datasetData);
PrintLine($"Upload Status: {isSuccess}");
byte[] datasetData = GetDataBytesFromContainer("databytes_gen2.bin");
bool isSuccess = UploadDatasetGen2(12345, 0x7202, datasetData);
PrintLine($"Upload Status: {isSuccess}");

Flashing

Function: GetFlashingResult

string GetFlashingResult()

Description:
Retrieve a textual description of the flashing operation's outcome.

Return Value:
A string describing the flashing operation result.

Usage Example
string result = GetFlashingResult();
PrintLine($"Flashing Result: {result}");

Function: GetFlashingResultCode

byte GetFlashingResultCode()

Description:
Obtain a numerical code corresponding to the result of the flashing operation.

Return Value:
A byte representing the result code of the flashing operation.

Usage Example
byte resultCode = GetFlashingResultCode();
PrintLine($"Flashing Result Code: {resultCode}");
Result codes list

Code Abbreviation Description
0 Successfull The flashing process was successful
1 PreConditionsNotCorrect Preconditions for flashing are not correct
2 WrongSecurityKey The provided security key for flashing is wrong
3 SessionError Error encountered during the session
4 SigningError Error encountered during the signing process
5 DataBlockDownloadingError Error encountered while downloading data blocks
6 ErasingRoutineError Error encountered during the erasing routine
7 FinalizationError Error encountered during finalization
8 FlashingContainerIsEmpty The container for flashing is empty
9 ConnectionError Error encountered with the connection
10 ErrorWritingFingerprint Error encountered while writing the fingerprint
11 Timeout The flashing process timed out
12 FunctionNotAssigned The required function for flashing is not assigned
13 UpdateExecutionError Error encountered during update execution
14 FdsWrongKey The FDS key in container is wrong
15 NoResponseFromEcu No response received from the ECU
16 UpdateExecutionPhase2Error Error encountered during the second phase of update execution
252 IoError Input/Output error
253 Cancelled The flashing process was cancelled

Function: PerformFlashFromContainer

bool PerformFlashFromContainer(string name, bool checkBlockVersions = true, bool silent = false)

Description:
Execute a flashing operation using a dataset stored in the container. The firmware procedure automatically turns on the working plate and displays the progress of the firmware process on the progress bar. Firmware containers of ODX, FRF and VCTF formats are supported.
Attention! Interface type checking is up to you! It is strongly not recommended to use the firmware functions of control units with ELM interfaces!

Parameters:
- name: Name of the dataset in the container.
- checkBlockVersions: (Optional) Flag to determine whether block versions should be checked before the operation. Default is true.
- silent: (Optional) Flag to suppress any user prompts or notifications during the flashing process. Default is false.

Usage Example
bool isSuccess = PerformFlashFromContainer("FL_3Q0919298C__0038.vctf");
PrintLine($"Flashing Status: {isSuccess}");

Function: PerformFlashFromFile

bool PerformFlashFromFile(string filename, bool checkBlockVersions = true, bool silent = false)

Description:
Execute a flashing operation using a dataset from a file. The firmware procedure automatically turns on the working plate and displays the progress of the firmware process on the progress bar. Firmware containers of ODX, FRF and VCTF formats are supported.
Attention! Interface type checking is up to you! It is strongly not recommended to use the firmware functions of control units with ELM interfaces!

Parameters:
- filename: Name of the file containing the dataset.
- checkBlockVersions: (Optional) Flag to determine whether block versions should be checked before the operation. Default is true.
- silent: (Optional) Flag to suppress any user prompts or notifications during the flashing process. Default is false.

Usage Example
bool isSuccess = PerformFlashFromFile("FL_5Q0909144ABH2_1082.odx");
PrintLine($"Flashing Status: {isSuccess}");

Procedure: ListFlashDataBlocksFromContainer

void ListFlashDataBlocksFromContainer(string name)

Description:
List all flash data blocks available in the specified container.

Parameters:
- name: The name of the container that contains the flash data blocks.

Usage Example
1
2
3
string containerName = "FL_5Q0909144ABH2_1082.odx";
ListFlashDataBlocksFromContainer(containerName);
PrintLine($"Listed flash data blocks from: {containerName}");

Procedure: ListFlashDataBlocksFromFile

void ListFlashDataBlocksFromFile(string filename)

Description:
List all flash data blocks available in the specified file.

Parameters:
- filename: The name of the file that contains the flash data blocks.

Usage Example
1
2
3
string fileName = "FL_5Q0909144ABH2_1082.odx";
ListFlashDataBlocksFromFile(fileName);
PrintLine($"Listed flash data blocks from file: {fileName}");

SWaP/FoD

Function: EcuHasSwap

bool EcuHasSwap()

Description:
Check if the connected ECU supports the SWaP (Software as a Product) feature.

Return Value:
Returns true if the ECU supports SWaP, otherwise false.

Usage Example
1
2
3
if (!OpenEcu(0x19)) return;
bool isSupported = EcuHasSwap();
PrintLine($"ECU supports SWaP: {isSupported}");

Function: CheckSwap

bool CheckSwap(string fsid, out byte status)

Description:
Check the SWaP status for a given FSID (Feature Set ID).

Parameters:
- fsid: Feature Set ID to be checked.
- status: Output parameter returning the status byte corresponding to the given FSID.

Return Value:
Returns true if the FS ID code is unlocked, otherwise false.

Usage Example
1
2
3
4
if (!OpenEcu(0x19)) return;
byte swapStatus;
bool result = CheckSwap("00071700", out swapStatus);
PrintLine($"Apple Carplay V4 suppoted: {result}, Status: {swapStatus}");

Function: GetCompleteSwapList

(string code, string description, byte status)[] GetCompleteSwapList()

Description:
Retrieves a complete list of swap codes, along with their descriptions and statuses.

Parameters:
None

Return Value:
Returns an array of tuples, where each tuple consists of a swap code, its description, and its status.

Usage Example
1
2
3
4
5
6
7
8
if (!OpenEcu(0x19))
{
    PrintLine($"Error connecting to gateway: {GetUdsError()}");
    return;
}
var swapList = GetCompleteSwapList();
CloseEcu();
PrintLine(swapList);

Function: SendFscDataset

bool SendFscDataset(byte[] dataset)

Description:
Send the FSC (Feature Set Code) dataset to the ECU and starts the activation process.

Parameters:
- dataset: Byte array containing the FSC dataset.

Return Value:
Returns true if the dataset was successfully sent, otherwise false.

Usage Example
1
2
3
4
if (!OpenEcu(0x19)) return;
byte[] fscData = GetDataBytesFromContainer("fsc_data.bin");
bool isSuccess = SendFscDataset(fscData);
PrintLine($"FSC Dataset Sent: {isSuccess}");