Nissan Glove Box PIN Code Calculator

Bartosz Wójcik
3 min readMar 12, 2023

--

One can use the 12-digit code located within the glove box compartment to generate a PIN code for Nissan vehicle immobiliser programming.

Nissan Glove Box Serial Number

This PIN code is essential for programming immobilizer keys and ensuring that only authorized individuals can operate the vehicle.

What is an immobiliser?

An immobilizer is a vehicle security system to prevent unauthorized access and theft. It works by preventing the engine from starting unless a valid key or electronic code is present.

Immobiliser System

The system typically uses an electronic key or transponder that sends a unique code to the vehicle’s immobilizer system when inserted or brought near the ignition. The immobilizer system then checks the code for authenticity and only allows the engine to start if the code matches the one programmed in the system.

Immobilizers are becoming increasingly common in modern vehicles as they provide an effective deterrent against theft and can significantly reduce the risk of car theft.

Generate Nissan immobiliser PIN code from Python

You can generate a single PIN code using Nissan PIN code calculator or you can generate an unlimited number of PIN codes using Radio Code Calculator SDK and do it from Python, JavaScript and PHP.

Python example

#!/usr/bin/env python

###############################################################################
#
# Radio Code Calculator API - WebApi interface usage example for Nissan
# Glove Box Immobiliser PIN Code Calculator
#
# In this example, we will demonstrate how to generate a code for a specific
# type of car radio.
#
# Version : v1.1.2
# 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.NISSAN_GLOVE_BOX, "E9AB99568498")

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}')

How to program Nissan keys with the PIN code?

Once you have the PIN code generated from the glove box compartment serial number, you will need specialized software & hardware to finish the process.

--

--

Bartosz Wójcik

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