GithubHelp home page GithubHelp logo

dante383 / gkflasher Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 1.0 526 KB

Flashing tool for SIMK43/41-based vehicles

License: GNU General Public License v3.0

Python 100.00%
hyundai kwp2000 simk41 simk43 tiburon can canbus ecu flashing iso9141

gkflasher's Introduction

GKFlasher

CLI flashing tool for SIMK41/43-based vehicles. This project is a result of research gathered by black-box reverse engineering

GUI interface Reading over CANbus

Installation

Clone the repository

git clone https://github.com/Dante383/GKFlasher

Install Python 3.10 for your specific operating system https://www.python.org/downloads/release/python-31011/

Install required packages

python3 -m pip install -r requirements.txt

Confirm that no errors ocurred

Running the command pip list should show the following packages -about-time -alive-progress -crcmod -gkbus -grapheme -pyftdi -PyQt5 -PyQt5-Qt5 -PyQt5-sip -pyserial -pyusb -PyYAML -setuptools

Usage

Connect your K-line or CANbus adapter to your computer and the vehicle (or ECU for bench setup). Pinouts for the Tiburon can be found on https://opengk.org.

GUI

Launch python3 gui.py

CLI

Launch python3 gkflasher.py --protocol {canbus/kline} --interface {can0//dev/ttyUSB0}. If it detects EEPROM size and calibration - all is good, you can proceed!

Reading

Add --read to the parameters. By default the output will be saved to output_{address start}_to_{address stop}.bin. You can use --output {filename} to override that

You can use --address_start and --address_stop to only read a certain portion.

Be aware that GKFlasher will always pad the output with 0xFF's to match the EEPROM size. For example, reading 16384 bytes from 0x090000 to 0x094000 (calibration zone) on an 8mbit EEPROM will still result in a 1mb output file.

Flashing

Add --flash {filename} to the parameters. GKFlasher will attempt to detect current ECU calibration version and the calibration version of the file you're trying to flash before asking you for confirmation.

You don't need to flash the whole bin at once. You can also use --flash-calibration {filename} and --flash-program {filename}

You can use --address_start and --address_stop to only overwrite a certain portion. Be aware that input file offsets must match with intended EEPROM offset. For example, if you want to flash only the calibration zone (0x090000 - 0x094000 on 8mbit eeprom) the calibration zone must be located at 0x090000 - 0x094000 in the input file. This behaviour is followed by default by GKFlasher's --read command.

Parameters

-c --config {filename} - Load the config file (default: gkflasher.yml). You could use this for example to prepare different configurations for different vehicles you're working on.

-p --protocol {protocol} - Currently supported: canbus and kline

-b --baudrate {baudrate}

--desired-baudrate {baudrate identifier} - See ecu_definitions.py

-i --interface {interface}

-r --read

--read-calibration - Read just the calibration zone. You can always use --address-start and --address-stop manually - this just adjusts the offset based on the ECU for you

--read-program - Read just the program zone.

--id - display ECU identification parameters (KWP service 0x1A)

--correct-checksum {filename}

--clear-adaptive-values

-o --output {filename} - Filename to save the EEPROM dump

-f --flash {input filename}

--flash-calibration {input filename}

--flash-program {input filename}

-s --address_start {offset} - Offset to start reading/flashing from

-e --address_stop {offset} - Offset to stop reading/flashing at

gkflasher's People

Contributors

dante383 avatar dmg210 avatar murphykyle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dmg210

gkflasher's Issues

Problem with python execution

Hello,
I've tinkered with the canbus of our cars a fair bit. by miself.
I was really interested to try your code but I have no background in Python ( Only C# )

I've followed your instruction on woth my Linux and Windows PC , getting the same error on both.

While reading anything, even the ECU ID ( My serial to OBD cable is showing ) , I'm getting this error in the console

File "/usr/local/lib/python3.9/dist-packages/gkbus/interface/Interface.py", line 58, in InterfaceABC
    def set_timeout (self, timeout: int | None = None):
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

I understand you're time is valuable, but if it's a common error can you try pointing me in the right direction ?

Thanks

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.