gregyedlik / handshake

Understanding the challenge-response process used in Bosch e-bike systems, with the aim of producing compatible BMS boards.
40 stars 2 forks source link
authentication battery bosch can e-bike pedelec

Bosch handshakes on the CAN bus

This project is about understanding the challenge-response process used in Bosch e-bike systems, with the aim of producing compatible BMS boards. A compatible BMS would allow people to build custom batteries compatible with Bosch bikes, as well as to repair batteries with damaged BMS.

Status

I verified that:

I recorded a lot of handshakes, but I got stuck trying to learn how to generate an acceptable answer for the challenge. I would appreciate help from someone with more computer science background.

I also learned that the challenges are repeating, but it seems it takes a super long time to capture enough to be able to just ‘look up’ the right answer without understanding the process.

main.py

This program can be used to automatically record handshakes from a working system.

repetitions.py

The scripts in this file were used to quantify the progress in recording handshakes, and trying to recognise patterns.

crosscheck.py

This script is about comparing the data recorded from two different batteries. (Takes a long time to run!!)

crosscheck.txt

This is the output of crosscheck.py. It shows the differences in the answers to challanges between different batteries.

list_scott.csv

This file contains handshakes recorded from one battery.

list_badconnector.csv

This file contains handshakes recorded from another battery.