Radio Code Calculator Online & SDK

Bartosz Wójcik
3 min readFeb 8, 2023

The Radio Code Calculator is an online solution that offers a Web API and SDK for popular programming languages like Python, JavaScript & PHP to generate unlock codes for car radios and navigation systems of popular automobile brands.

In case of a battery breakdown or disconnection, most vehicle radio and navigation units will require an unlocking code as a standard anti-theft measure.

Our Radio Code Calculator provides an efficient solution for generating 100% valid unlock codes for your car radio and navigation system, eliminating the need for costly services from authorized dealers.

Our service is accessible through a user-friendly online interface and a Web API, with various SDKs available for popular programming languages.

Simple online radio calculator

If you are not a programmer — don’t worry. Just use our online calculator.

Python SDK source codes

Python SDK package — https://pypi.org/project/radio-code-calculator/

Using our solution, you can develop mobile or web applications, or you can resell the radio codes yourself at various marketplaces like eBay, Craigslist etc.

Radio code generation from Python

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.

#!/usr/bin/env python

###############################################################################
#
# 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 : v1.1.0
# Language : Python
# Author : Bartosz Wójcik
# Project : https://www.pelock.com/products/radio-code-calculator
# Homepage : https://www.pelock.com
#
###############################################################################

#
# include Radio Code Calculator API module
#
from radio_code_calculator import *

#
# create Radio Code Calculator API class instance (we are using our activation key)
#
myRadioCodeCalculator = RadioCodeCalculator("ABCD-ABCD-ABCD-ABCD")

#
# generate radio code (using Web API)
#
error, result = myRadioCodeCalculator.calc(RadioModels.FORD_M_SERIES, "123456")

if error == RadioErrors.SUCCESS:
print(f'Radio code is {result["code"]}')
elif error == RadioErrors.INVALID_RADIO_MODEL:
print("Invalid radio model (not supported)")
elif error == RadioErrors.INVALID_SERIAL_LENGTH:
print(f'Invalid serial number length (expected {result["serialMaxLen"]} characters)')
elif error == RadioErrors.INVALID_SERIAL_PATTERN:
print(f'Invalid serial number regular expression pattern (expected {result["serialRegexPattern"]["python"]} regex pattern)')
elif error == RadioErrors.INVALID_SERIAL_NOT_SUPPORTED:
print("This serial number is not supported")
elif error == RadioErrors.INVALID_EXTRA_LENGTH:
print(f'Invalid extra data length (expected {result["extraMaxLen"]} characters)')
elif error == RadioErrors.INVALID_EXTRA_PATTERN:
print(f'Invalid extra data regular expression pattern (expected {result["extraRegexPattern"]["python"]} regex pattern)')
elif error == RadioErrors.INVALID_INPUT:
print("Invalid input data")
elif error == RadioErrors.INVALID_COMMAND:
print("Invalid command sent to the Web API interface")
elif error == RadioErrors.INVALID_LICENSE:
print("Invalid license key")
elif error == RadioErrors.ERROR_CONNECTION:
print("Something unexpected happen while trying to login to the service.")
else:
print(f'Unknown error {error}')

--

--

Bartosz Wójcik

Developer behind PELock software protection system, author of reverse engineering articles.