Skip to content

brandonrc/bosch-ebike

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ebike

Reverse Engineering: Bosch eBike System with "Performance Line Speed" (Gen4) and "Kiox Sporty Connectivity"

CAN - BUS

Pedelecs until 2013

GREEN: CAN-H

YELLOW: CAN-L

BLACK: Ground

RED: 12V, max. 1A

CPC-USB Pinout

The CAN interface connector (D­Sub 9 male) for the standardversion complies to CiA Standard DS 102.

Pin Name
1 RTL
2 CAN_L
3 GND
4 -
5 -
6 -
7 CAN_H
8 RTH
9 -

CAN Interface

SuperCAN

A cheap way to get a USB CAN Bus interface is the Adafruit Feather M4 CAN Express board. The SuperCAN project support it sice firmware release v1.0.14. After build and install the linux driver set it up like a common CAN USB interface. SuperCAN also supports CAN FD may be interesting for the new BOSCH Smart System.

A big thanks to Jean Gressmann

CLI CAN-Bus Tools

can-utils

can-utils - github

INSTALL on linux

sudo apt install can-utils

Find CAN-BUS Interface

ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
...
...
...
5: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP group default qlen 10
link/can

Init CAN-Bus Interface

For USB2CAN Adapter like CPC­-USB

ip link set can0 type can bitrate 500000
ip link set up can0

Start/Stop Bosch eBike

# can0 = CAN-Bus Interface
cansend can0 061#00

python-can

python-can - readthedocs.io

Install

python3 -m pip install python-can

can_viewer

Use can_viewer.py to get an overview of CAN-Bus activity

can_viewer.py -i socketcan -b 500000 -c can0

cannelloni

With cannelloni you can stream CAN Bus over UDP

Build cannelloni

# sudo apt install cmake git libsctp-dev lksctp-tools
# sudo ldconfig

git clone https://github.com/mguentner/cannelloni
cd cannelloni
cmake -DCMAKE_BUILD_TYPE=Release -DSCTP_SUPPORT=ON
make

Install cannelloni

sudo make install
sudo ldconfig

VCAN Interface

# sudo apt install linux-modules-extra-$(uname -r)


sudo modprobe vcan
sudo ip link add name vcan0 type vcan
sudo ip link set dev vcan0 up

KIOX

Teardown

||||

Teardown - Pedelecforum

Hardware

Chip Info Part No. Datasheet
CPU STM32F469IIH6 Hardware - Pedelecforum STM32F4 series ST
FLASH 512M-BIT, SPI W25M512JV Winbond
RAM DRAM 64Mb, SDR SDRAM, x16, 166MHz W9864G6KH Winbond

Error Codes

Code Cause Corrective measures
410 One or more buttons ofthe on-board computerare disabled. Check whether any buttons are stuck,e.g. as a result of dirt finding its way in.Clean the buttons if need be.
414 Operating unit connec-tion problem Operating unit connec-tion problem
418 One or more buttons onthe operating unit aredisabled Check whether any buttons are stuck,e.g. as a result of dirt finding its way in.Clean the buttons if need be.
419 Configuration error Restart the system. If the problem per-sists, contact your Bosch eBike dealer.
422 Drive unit connectionproblem Have the connections checked
423 eBike battery connectionproblem Have the connections checked
424 Communication problembetween components Have the connections checked
426 Internal time-out error Restart the system. If the problem per-sists, contact your Bosch eBike dealer.With this error, it is not possible to bringup the wheel circumference in the basicsettings menu or to adjust it.
430 Internal battery of the onboard computer is flat (does not apply toBUI350) Charge the on-board computer (in theholder or via the USB port)
431 Software version error Restart the system. If the problem persists, contact your Bosch eBike dealer.
440 Internal drive unit fault Restart the system. If the problem persists, contact your Bosch eBike dealer.
450 Internal software error Restart the system. If the problem per-sists, contact your Bosch eBike dealer.
460 Error at USB port Remove the cable from the USB port ofthe on-board computer. If the problempersists, contact your Bosch eBikedealer.
490 Internal fault of the on-board computer Have the on-board computer checked

Android App

Appium

Install io.appium.settings https://github.com/appium/io.appium.settings

Sources

stackexchange

Links

Bosch

Bosch Manuals

Bosch eBike Manual Kiox Online

Bosch eBike Manual DriveUnit Active Line Active

Bosch Source Software licenses

Kiox Open Source Software licenses

Overview Open Source Software licences

Youtube

Diagnosis SW System Test at Bosch eBike Systems (German/Deutsch)

Slides

Car Hacking

Car Hacking 101: Practical Guide to Exploiting CAN-Bus

Tools

can-utils (https://github.com/mguentner/cannelloni) CPC­USB/ARM7 User Maual

Pedelecforum.de (German)

Arduino Project

Challenge-Response

Bosch active can data

Bosch actice IDs Bosch USB COM Bosch USB COM/PDF

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages