Projects / linesoft2 Arduino Nano Fork

linesoft2 Arduino Nano Fork

💰 Budget

Cheapest build: Arduino Nano + MCP2515 for ~$3. Chinese docs. Best for budget HW3.

🔗 View on GitHub
🔧 Arduino Nano + MCP2515 📱 HW3 ✅ Active 📄 2 files 🕐 Updated Apr 1, 2026

⚠️重要警告

自2026.3.31晚9:00左右开始,中国国内的车辆会被远程下发配置从芯片底层(aka Gateway)禁用FSD相关功能,本项目已失效。

说明

本项目为https://gitlab.com/Starmixcraft/tesla-fsd-can-mod的fork,进行了一些修改以适配自己购买的开发板和国内车机。

遵循原项目和相关协议要求,本项目继续以GPL-3.0协议开源。

所用开发板和配件:

  1. ARDUINO NANO

  2. MCP2515 CAN总线模块

  3. 若干根母对母杜邦线

连线参考:

MCP2515模块 Arduino Nano
VCC 5V
GND GND
CS D10
SO (MISO) D12
SI (MOSI) D11
SCK D13
X179 Pin MCP2515模块
13 CAN-H
14 CAN-L

使用步骤:

  1. 连线
  2. 使用Arduino IDE烧录修改后的代码
  3. 用杜邦线一头接到车上的X179的13,14针脚,另一头接入MCP2515模块

CanFeather – Tesla FSD CAN Bus Enabler

Why is this public? Some sellers charge up to 500 € for a solution like this. In our opinion, that is massively overpriced. The board costs around 20 €, and even with labor factored in, a fair price is no more than 50 €. This project exists so nobody has to overpay.

📌 Prerequisites

You must have an active FSD package on the vehicle — either purchased or subscribed. This board enables the FSD functionality on the CAN bus level, but the vehicle still needs a valid FSD entitlement from Tesla.

If FSD subscriptions are not available in your region, you can work around this by:

  1. Creating a Tesla account in a region where FSD subscriptions are offered (e.g. Canada).
  2. Transferring the vehicle to that account.
  3. Subscribing to FSD through that account.

This allows you to activate an FSD subscription from anywhere in the world.

🛠️ What It Does

This firmware runs on an Adafruit CAN Bus FeatherWing (MCP25625/MCP2515-based). It intercepts specific CAN bus messages to enable and configure Full Self-Driving (FSD).

🚗 Core Function

  • Intercepts specific CAN bus messages
  • Re-transmits them onto the vehicle bus

🧠 FSD Activation Logic

  • Listens for Autopilot-related CAN frames
  • Checks if "Traffic Light and Stop Sign Control" is enabled in the Autopilot settings Uses this setting as a trigger for Full Self-Driving (FSD)
  • Adjusts the required bits in the CAN message to activate FSD

⚙️ Additional Behavior

  • Reads the follow-distance stalk setting
  • Maps it dynamically to a speed profile

Supported Hardware Variants

Select your hardware in CanFeather.ino via the #define HW directive:

Define Target Listens on CAN IDs Notes
LEGACY HW3 Retrofit 1006 Sets FSD enable bit and speed profile
HW3 HW3 vehicles 1016, 1021 Adds speed-offset control via follow-distance
HW4 HW4 vehicles 1016, 1021 Extended speed-profile range (5 levels)

Note: HW4 vehicles on firmware older than 2026.2.3 do not use FSDV14. If your vehicle is on an earlier firmware version, compile with HW3 even if your vehicle has HW4 hardware.

How to Determine Your Hardware Variant

  • Legacy — Your vehicle has a portrait-oriented center screen and HW3. This applies to older Model S and Model X vehicles retrofitted with HW3.
  • HW3 — Your vehicle has a landscape-oriented center screen and HW3. You can check your hardware version under Controls → Software → Additional Vehicle Information on the vehicle's touchscreen.
  • HW4 — Same as above, but the Additional Vehicle Information screen shows HW4.

Key Behaviour

  • FSD enable bit is set when "Traffic Light and Stop Sign Control" is enabled in the vehicle's Autopilot settings.
  • Speed profile is derived from the scroll-wheel offset or follow-distance setting.
  • Nag suppression — clears the hands-on-wheel nag bit.
  • Debug output is printed over Serial at 115200 baud when enablePrint is true.

Hardware Requirements

  • Adafruit Feather M4 CAN (or compatible board with MCP25625/MCP2515)
  • The board must expose these pins (defined at the top of the sketch):
    • PIN_CAN_CS — SPI chip-select for the MCP2515
    • PIN_CAN_INTERRUPT — interrupt pin (unused; polling mode)
    • PIN_CAN_STANDBY — CAN transceiver standby control
    • PIN_CAN_RESET — MCP2515 hardware reset
  • CAN bus connection to the vehicle (500 kbit/s)

Installation

1. Install the Arduino IDE

Download from https://www.arduino.cc/en/software.

2. Add the Adafruit Board Package

  1. Open File → Preferences.
  2. In Additional Board Manager URLs, add:
    https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
    
  3. Go to Tools → Board → Boards Manager, search for Raspberry PI Pico/RP2040 (or the appropriate family for your Feather), and install it.
  4. Select Adafruit Feather RP2040 CAN as the Board.

3. Install Required Libraries

Install the following library via Sketch → Include Library → Manage Libraries… or the Arduino Library Manager:

  • MCP2515 by autowp — CAN controller driver (mcp2515.h)

4. Select Your Hardware Target

Near the top of CanFeather.ino, change the HW define to match your vehicle:

#define HW HW3  // Change to LEGACY, HW3, or HW4

5. Upload

  1. Connect the Feather via USB.
  2. Select the correct board and port under Tools.
  3. Click Upload.

6. Wiring

The recommended connection point is the X179 connector:

Pin Signal
13 CAN-H
14 CAN-L

Connect the Feather's CAN-H and CAN-L lines to pins 13 and 14 on the X179 connector.

The recommended connection point for legacy Model 3 (2020 and earlier) is the X652 connector if the vehicle is not equipped with the X179 port (varies depending on production date):

Pin Signal
1 CAN-H
2 CAN-L

Connect the Feather's CAN-H and CAN-L lines to pins 1 and 2 on the X652 connector.

Important: Cut the onboard 120 Ω termination resistor on the Feather CAN board. The vehicle's CAN bus already has its own termination, and adding a second resistor will cause communication errors.

Speed Profiles

The speed profile controls how aggressively the vehicle drives under FSD. It is configured differently depending on the hardware variant:

Legacy (HW3 Retrofit)

Because the Legacy variant transmits follow distance differently, it uses a speed offset value (in km/h) to select the profile:

Speed Offset (km/h) Profile
28 Chill
29 Normal
30 Hurry

HW3 & HW4 Profiles

Distance Profile (HW3) Profile (HW4)
2 ⚡ Hurry 🔥 Max
3 🟢 Normal ⚡ Hurry
4 ❄️ Chill 🟢 Normal
5 ❄️ Chill
6 🐢 Sloth

Serial Monitor

Open the Serial Monitor at 115200 baud to see live debug output showing FSD state and the active speed profile. Disable logging by setting enablePrint = false.

Disclaimer

Use this project at your own risk. Modifying CAN bus messages on a vehicle can lead to unexpected or dangerous behavior. The authors accept no responsibility for any damage to your vehicle, injury, or legal consequences resulting from the use of this software. This project may void your vehicle warranty and may not comply with road safety regulations in your jurisdiction. Always keep your hands on the wheel and stay attentive while driving.

License

This project is licensed under the GNU General Public License v3.0 — see the GPL-3.0 License for details.