DEV Community

Cover image for Nissan Glove Box PIN Code Calculator
Bartosz Wójcik for PELock LLC

Posted on

Nissan Glove Box PIN Code Calculator

To generate a PIN code for immobiliser programming in Nissan vehicles, the glove box compartment serial number can be used.

This serial number can be obtained by removing the glove box and locating the sticker with the number.

Image description

Once the serial number is obtained, a PIN code can be generated using Radio Code Calculator SDK.

It can be done from Python, JS and PHP

#!/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}')
Enter fullscreen mode Exit fullscreen mode

You can also obtain it online using Nissan Glove Box PIN Code Calculator

Top comments (1)

Collapse
 
grachevalexey profile image
GrachevAlexey

I have owned a Toyota for several years now and I want to say that I am immensely pleased with my car. I bought it from the official dealer toyota-ua.com/... in Ukraine and I only had good impressions from the customer service, as well as from the technical maintenance service. So if you want to buy a high-quality and reliable car, contact the Toyota Center.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.