RadioCodeCalculator 1.0.1
dotnet add package RadioCodeCalculator --version 1.0.1
NuGet\Install-Package RadioCodeCalculator -Version 1.0.1
<PackageReference Include="RadioCodeCalculator" Version="1.0.1" />
<PackageVersion Include="RadioCodeCalculator" Version="1.0.1" />
<PackageReference Include="RadioCodeCalculator" />
paket add RadioCodeCalculator --version 1.0.1
#r "nuget: RadioCodeCalculator, 1.0.1"
#:package RadioCodeCalculator@1.0.1
#addin nuget:?package=RadioCodeCalculator&version=1.0.1
#tool nuget:?package=RadioCodeCalculator&version=1.0.1
Radio Code Calculator Online & SDK for C#
Radio Code Calculator is an online service along with Web API & SDK for generating car radio unlock codes for popular vehicle brands.
Following a breakdown or a disconnection of the car battery, most of the vehicle radio & navigation units will ask for an unlocking code. It's standard anti-theft protection.
Our car Radio Code Calculator allows you to generate 100% valid radio codes to unlock car radios & navigation without the need to use the expensive service of authorized dealers.

The service is available through a simple online interface and Web API, with multiple SDK development libraries for popular programming languages.
Thanks to our solution, you can create, for instance, mobile or web applications that allow for easy generation of radio codes.
Supported car models and radios
Our service is being continuously developed and new algorithms are gradually added for new car models and their radios.
If a new algorithm is added, you will get automatic and free access to it as part of your current license.
Individual calculators are available on our site as a paid service for end customers. You can verify them and see lists of supported radios on the relevant subpages:
- Renault & Dacia
- Toyota ERC
- Jeep Cherokee
- Ford M Serial
- Ford V Serial
- Ford TravelPilot EX, FX & NX
- Chrysler Panasonic TM9
- Chrysler Dodge Ram VP2
- Fiat Stilo & Bravo Visteon
- Fiat DAIICHI MOPAR
- Fiat Continental 250 & 500 VP1/VP2
- Nissan Glove Box Immobiliser PIN
- Eclipse ESN Unlock Code Calculator
- Jaguar Alpine
Use of radio code calculator
Where and who can use the radio code generation service and make money from code generation?
App developers
The main audience for our software is clearly developers and programmers, either of mobile or desktop applications.
Online stores
If you run an online e-commerce store, you can sell radio codes through it using our software solutions.
Auto repair shops
We also encourage car repair shops whose customers often use car radio unlocking services.
Private individuals
Private individuals will also profit from our solution by generating codes and selling them on car forums or auction sites such as eBay, Craigslist.
No limits!
You can generate codes without limitation with your purchased one-year license.
Set your own price for generating a single code and start earning by using tried and tested algorithms from a programming language you know.
If you are not a programmer - don't worry. Just use our online calculator.
Installation
The preferred way of installing the Web API client library is via NuGet.
Run:
dotnet add package RadioCodeCalculator
Or add a PackageReference to your .csproj file:
<PackageReference Include="RadioCodeCalculator" Version="1.0.1" />
This repository does not publish the package to nuget.org automatically. To consume the library from a local build, create a package with dotnet pack (see the project under src/RadioCodeCalculator) and add it using a local feed folder, or reference the project directly with a ProjectReference.
The package ID is RadioCodeCalculator and targets .NET Standard 2.0 (usable from modern .NET and .NET Framework with NuGet support).
To run the integration tests in this repository, set the environment variable RADIO_CODE_CALCULATOR_KEY to a valid activation key and execute dotnet test. Without it, tests that call the live API are skipped.
Packages for other programming languages
The installation packages have been uploaded to repositories for several popular programming languages and their source codes have been published on GitHub:
| Repository | Language | Installation | Package | GitHub |
|---|---|---|---|---|
![]() |
PHP | Add the following line to require section of your composer.json file "pelock/radio-code-calculator": "*" |
Packagist | Sources |
![]() |
Python | Run pip install radio-code-calculator |
PyPi | Sources |
![]() |
JavaScript, TypeScript | Run npm i radio-code-calculator or add the following to dependencies section of your package.json file "dependencies": { "radio-code-calculator": "latest" }, |
NPM | Sources |
| C#, .NET | Run dotnet add package RadioCodeCalculator or add <PackageReference Include="RadioCodeCalculator" Version="1.0.1" /> to your .csproj |
NuGet listing (after you publish) | Sources | |
![]() |
Rust | Run cargo add radio-code-calculator or add radio-code-calculator = "1.0.0" to [dependencies] in Cargo.toml |
crates.io | Sources |
Usage examples
Radio code generation
This example demonstrates code generation for a selected radio model. All input parameter validation is done on the server side and if the radio serial number has an invalid length or pattern - the service will return an error.
/******************************************************************************
*
* Radio Code Calculator API - WebApi interface usage example
*
* In this example, we will demonstrate how to generate a code for a specific
* type of car radio.
*
* Version : v.1.0.0
* Language : C#
* Dependencies : RadioCodeCalculator (NuGet / project reference)
* Author : Bartosz Wójcik (support@pelock.com)
* Project : https://www.pelock.com/products/radio-code-calculator
* Homepage : https://www.pelock.com
*
* @link https://www.pelock.com/products/radio-code-calculator
* @copyright Copyright (c) 2021-2024 PELock LLC
* @license Apache-2.0
*
******************************************************************************/
using PELock;
var myRadioCodeCalculator = new RadioCodeCalculator("ABCD-ABCD-ABCD-ABCD");
try
{
var result = await myRadioCodeCalculator.CalcAsync(RadioModels.FordMSeries, "123456");
Console.WriteLine("Radio code is " + result["code"]?.ToString());
}
catch (RadioApiException ex)
{
switch (ex.ErrorCode)
{
case RadioErrors.InvalidRadioModel:
Console.WriteLine("Invalid radio model (not supported)");
break;
case RadioErrors.InvalidSerialLength:
Console.WriteLine("Invalid serial number length (expected " + ex.Response["serialMaxLen"] + " characters)");
break;
case RadioErrors.InvalidSerialPattern:
Console.WriteLine("Invalid serial number regular expression pattern (expected " +
ex.Response["serialRegexPattern"]?["php"] + " regex pattern)");
break;
case RadioErrors.InvalidSerialNotSupported:
Console.WriteLine("This serial number is not supported");
break;
case RadioErrors.InvalidExtraLength:
Console.WriteLine("Invalid extra data length (expected " + ex.Response["extraMaxLen"] + " characters)");
break;
case RadioErrors.InvalidExtraPattern:
Console.WriteLine("Invalid extra data regular expression pattern (expected " +
ex.Response["extraRegexPattern"]?["php"] + " regex pattern)");
break;
case RadioErrors.InvalidInput:
Console.WriteLine("Invalid input data");
break;
case RadioErrors.InvalidCommand:
Console.WriteLine("Invalid command sent to the Web API interface");
break;
case RadioErrors.InvalidLicense:
Console.WriteLine("Invalid license key!");
break;
default:
Console.WriteLine($"Something unexpected happen while trying to login to the service (error code {ex.ErrorCode}).");
break;
}
}
Radio code generation with additional offline validation
Radio codes are generated based on input parameters such as the radio's serial number, among others.
Radio serial numbers are different for different radios, they have different lengths and different patterns, some may consist of just digits e.g. 1234, while others may consist of digits and letters e.g. AB1234XYZ.
Validation of this data is done on the server side. However, to make things more efficient, we can use the information about available limits and patterns of particular serial numbers to, for example, set these limits in controls in our own applications without unnecessary calls to the Web API.
/******************************************************************************
*
* Radio Code Calculator API - WebApi interface usage example
*
* In this example, we will demonstrate how to generate a code for a specific
* type of car radio. This example shows how to use an extended offline
* validation.
*
* Version : v.1.0.0
* Language : C#
* Dependencies : RadioCodeCalculator (NuGet / project reference)
* Author : Bartosz Wójcik (support@pelock.com)
* Project : https://www.pelock.com/products/radio-code-calculator
* Homepage : https://www.pelock.com
*
* @link https://www.pelock.com/products/radio-code-calculator
* @copyright Copyright (c) 2021-2024 PELock LLC
* @license Apache-2.0
*
******************************************************************************/
using PELock;
var myRadioCodeCalculator = new RadioCodeCalculator("ABCD-ABCD-ABCD-ABCD");
var serial = "123456";
var extra = "";
var radioModel = RadioModels.FordMSeries;
Console.WriteLine(
$"Radio model {radioModel.Name} expects a serial number of {radioModel.SerialMaxLen} length and {radioModel.SerialRegexPattern()} regex pattern<br>");
if (radioModel.ExtraMaxLen > 0)
{
Console.WriteLine(
$"Additionally an extra field is required with {radioModel.ExtraMaxLen} and {radioModel.ExtraRegexPattern()} regex pattern<br>");
}
var error = radioModel.Validate(serial, extra);
if (error != RadioErrors.Success)
{
if (error == RadioErrors.InvalidSerialLength)
Console.WriteLine($"Invalid serial number length (expected {radioModel.SerialMaxLen} characters<br>");
else if (error == RadioErrors.InvalidSerialPattern)
Console.WriteLine(
$"Invalid serial number regular expression pattern (expected {radioModel.SerialRegexPattern()} regex pattern)<br>");
else if (error == RadioErrors.InvalidSerialNotSupported)
Console.WriteLine("This serial number is not supported");
else if (error == RadioErrors.InvalidExtraLength)
Console.WriteLine($"Invalid extra data length (expected {radioModel.ExtraMaxLen} characters)<br>");
else if (error == RadioErrors.InvalidExtraPattern)
Console.WriteLine(
$"Invalid extra data regular expression pattern (expected {radioModel.ExtraRegexPattern()} regex pattern)<br>");
Environment.Exit(1);
}
try
{
var result = await myRadioCodeCalculator.CalcAsync(radioModel, serial);
Console.WriteLine("Radio code is " + result["code"]?.ToString());
}
catch (RadioApiException ex)
{
switch (ex.ErrorCode)
{
case RadioErrors.InvalidRadioModel:
Console.WriteLine("Invalid radio model (not supported)");
break;
case RadioErrors.InvalidSerialLength:
Console.WriteLine("Invalid serial number length (expected " + ex.Response["serialMaxLen"] + " characters)");
break;
case RadioErrors.InvalidSerialPattern:
Console.WriteLine("Invalid serial number regular expression pattern (expected " +
ex.Response["serialRegexPattern"]?["php"] + " regex pattern)");
break;
case RadioErrors.InvalidSerialNotSupported:
Console.WriteLine("This serial number is not supported");
break;
case RadioErrors.InvalidExtraLength:
Console.WriteLine("Invalid extra data length (expected " + ex.Response["extraMaxLen"] + " characters)");
break;
case RadioErrors.InvalidExtraPattern:
Console.WriteLine("Invalid extra data regular expression pattern (expected " +
ex.Response["extraRegexPattern"]?["php"] + " regex pattern)");
break;
case RadioErrors.InvalidInput:
Console.WriteLine("Invalid input data");
break;
case RadioErrors.InvalidCommand:
Console.WriteLine("Invalid command sent to the Web API interface");
break;
case RadioErrors.InvalidLicense:
Console.WriteLine("Invalid license key!");
break;
default:
Console.WriteLine($"Something unexpected happen while trying to login to the service (error code {ex.ErrorCode}).");
break;
}
}
Download list of supported radio code calculators
If you would like to download information about all supported radio models and their parameters such as serial number length and pattern - you can do so.
/******************************************************************************
*
* Radio Code Calculator API - WebApi interface usage example
*
* In this example we will list all the available calculators and, their
* parameters like name, maximum length of the radio serial number and its
* regex pattern.
*
* Version : v.1.0.0
* Language : C#
* Dependencies : RadioCodeCalculator (NuGet / project reference)
* Author : Bartosz Wójcik (support@pelock.com)
* Project : https://www.pelock.com/products/radio-code-calculator
* Homepage : https://www.pelock.com
*
* @link https://www.pelock.com/products/radio-code-calculator
* @copyright Copyright (c) 2021-2024 PELock LLC
* @license Apache-2.0
*
******************************************************************************/
using PELock;
var myRadioCodeCalculator = new RadioCodeCalculator("ABCD-ABCD-ABCD-ABCD");
try
{
var (radioModels, _) = await myRadioCodeCalculator.ListAsync();
Console.WriteLine("Supported radio models " + radioModels.Count + "<br>");
foreach (var radio_model in radioModels)
{
Console.WriteLine("Radio model name - " + radio_model.Name + "<br>");
Console.WriteLine("Max. length of the radio serial number - " + radio_model.SerialMaxLen + "<br>");
Console.WriteLine("Regex pattern for the radio serial number - " + radio_model.SerialRegexPattern() + "<br>");
if (radio_model.ExtraMaxLen > 0)
{
Console.WriteLine("Max. length of the radio extra data - " + radio_model.ExtraMaxLen + "<br>");
Console.WriteLine("Regex pattern for the radio extra data - " + radio_model.ExtraRegexPattern() + "<br>");
Console.WriteLine("<br>");
}
}
}
catch (RadioApiException ex)
{
if (ex.ErrorCode == RadioErrors.InvalidLicense)
Console.WriteLine("Invalid license key!");
else
Console.WriteLine($"Something unexpected happen while trying to login to the service (error code {ex.ErrorCode}).");
}
Downloading the parameters of the selected radio calculator
You can download the parameters of the selected calculator.
/******************************************************************************
*
* Radio Code Calculator API - WebApi interface usage example
*
* In this example, we will demonstrate how to get information about the
* specific radio calculator and its parameters (max. length & regex pattern).
*
* Version : v.1.0.0
* Language : C#
* Dependencies : RadioCodeCalculator (NuGet / project reference)
* Author : Bartosz Wójcik (support@pelock.com)
* Project : https://www.pelock.com/products/radio-code-calculator
* Homepage : https://www.pelock.com
*
* @link https://www.pelock.com/products/radio-code-calculator
* @copyright Copyright (c) 2021-2024 PELock LLC
* @license Apache-2.0
*
******************************************************************************/
using PELock;
var myRadioCodeCalculator = new RadioCodeCalculator("ABCD-ABCD-ABCD-ABCD");
try
{
var (radio_model, _) = await myRadioCodeCalculator.InfoAsync("ford-m-series");
Console.WriteLine("Radio model name - " + radio_model.Name + "<br>");
Console.WriteLine("Max. length of the radio serial number - " + radio_model.SerialMaxLen + "<br>");
Console.WriteLine("Regex pattern for the radio serial number - " + radio_model.SerialRegexPattern() + "<br>");
if (radio_model.ExtraMaxLen > 0)
{
Console.WriteLine("Max. length of the radio extra data - " + radio_model.ExtraMaxLen + "<br>");
Console.WriteLine("Regex pattern for the radio extra data - " + radio_model.ExtraRegexPattern() + "<br>");
Console.WriteLine("<br>");
}
}
catch (RadioApiException ex)
{
if (ex.ErrorCode == RadioErrors.InvalidLicense)
Console.WriteLine("Invalid license key!");
else
Console.WriteLine($"Something unexpected happen while trying to login to the service (error code {ex.ErrorCode}).");
}
Checking activation key
By checking the activation key status, we will get information about the license owner, license type and license expiration date.
/******************************************************************************
*
* Radio Code Calculator API - WebApi interface usage example
*
* In this example we will verify our activation key status.
*
* Version : v.1.0.0
* Language : C#
* Dependencies : RadioCodeCalculator (NuGet / project reference)
* Author : Bartosz Wójcik (support@pelock.com)
* Project : https://www.pelock.com/products/radio-code-calculator
* Homepage : https://www.pelock.com
*
* @link https://www.pelock.com/products/radio-code-calculator
* @copyright Copyright (c) 2021-2024 PELock LLC
* @license Apache-2.0
*
******************************************************************************/
using PELock;
var myRadioCodeCalculator = new RadioCodeCalculator("ABCD-ABCD-ABCD-ABCD");
try
{
var result = await myRadioCodeCalculator.LoginAsync();
//
// result holds the information about the license
//
// result["license"]["activationStatus"] - True if license is active, False on invalid/expired keys
// result["license"]["userName"] - user name/company name of the license owner
// result["license"]["type"] - license type (0 - Personal License, 1 - Company License)
// result["license"]["expirationDate"] - license expiration date (in YYYY-MM-DD format)
//
var license = result["license"];
var activation = license?["activationStatus"]?.GetValue<bool>() ?? false;
var type = license?["type"]?.GetValue<int>() ?? 0;
Console.WriteLine("License activation status - " + (activation ? "True" : "False") + "<br>");
Console.WriteLine("License owner - " + license?["userName"]?.ToString());
Console.WriteLine("License type - " + (type == 0 ? "Personal" : "Company") + "<br>");
Console.WriteLine("Expiration date - " + license?["expirationDate"]?.ToString() + "<br>");
}
catch (RadioApiException ex)
{
if (ex.ErrorCode == RadioErrors.InvalidLicense)
Console.WriteLine("Invalid license key!");
else
Console.WriteLine($"Something unexpected happen while trying to login to the service (error code {ex.ErrorCode}).");
}
Got questions?
If you are interested in the Radio Code Calculator Web API or have any questions regarding radio code generator SDK packages, technical or legal issues, or if something is not clear, please contact me. I'll be happy to answer all of your questions.
Bartosz Wójcik
- Visit my site at — https://www.pelock.com
- Twitter — https://twitter.com/PELock
- GitHub — https://github.com/PELock
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Text.Json (>= 8.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.



