Skip to content
/ niscan Public
forked from rampage128/niscan

nissan canbus interface for arduino uno

Notifications You must be signed in to change notification settings

radensb/niscan

 
 

Repository files navigation

Niscan

CAN-Bus to USB-Serial interface for Arduino

This is an Arduino (Nano) firmware to allow a serial device to connect to a car. It provides a translation layer between CAN-Bus of the car and USB-Port of another device.

Selected CAN-Bus packets are read from the car's CAN-Bus. Then the gathered data is grouped logicallly and translated into small USB-Serial binary packets.

Please make sure to read the requirements!

Background

Niscan is an interface to allow the app CarDroid to communicate with a nissan 370z. Main goal was to replace the cars entertainment system with an Android device, while keeping the climate controls functional.

Requirements

Installation

Releases

Currently no releases, you have to build the project From source

From source

  1. Get your favourite Arduino IDE
  2. Clone the repository into your sketch directory
    git clone https://github.com/rampage128/niscan.git
    
  3. Compile and upload to your Arduino

Usage

  1. Install on your Arduino
  2. Hook up your Arduino to the MCP2515 via SPI.
  3. Connect to the CAN-Bus of your car (also possible via OBD-Port)

The Arduino sends and receives serial packets to the USB-Serial interface.

Easiest way to make real use of the data is to connect an Android device to the Arduino's USB-Port and get CarDroid.

The hard way is to read the packets from the serial connection. The protocol is custom and subject to change. Generally data is sent in frames. Each frame contains one single packet.

Please see the table below for a general idea:

Index Length Possible values Description
0 1 0x7b Start of a frame
1 1 0x00 - 0xFF Packet type to indicate purpose
2 1 0x00 - 0xFF Packet id to indicate request
3 1 0x01 - 0x7c Payload length (L) (only if payload present)
4 (1 - 124) L 0x01 - 0xFF Payload (only if present)
3 + L 1 0x7d End of a frame

For more information, please refer to the source.

Contribute

Feel free to open an issue or submit a PR

Also, if you like this or other of my projects, please feel free to support me using the Link below.

Buy me a beer

Dependencies

About

nissan canbus interface for arduino uno

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 94.9%
  • C 5.1%