Coder Social home page Coder Social logo

niscan's Introduction

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

niscan's People

Contributors

rampage128 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.