Close

Episode Three: Working prototype

A project log for Switching music with CAN bus

Summary of my struggles with automotive CAN bus sniffing and Bluetooth LE powered microcontrollers (nRF51)

Wiktor BurdeckiWiktor Burdecki 04/04/2021 at 12:220 Comments

Due to some free time during holidays I managed to get my hands dirty again in this project.

Pile of jumper wires and free hanging PCBs grew ever more since last time.

Because of a lot of stupid mistakes and copy-pasted code, writing MCP2515 driver was a real pain in the ass. Since functionality I need from the chip is not much extensive, I developed my own minimalistic solution heavily inspired by open-usb-can project and arduino library for MCP2515. 

Overall I'm only initializing the chip, masks and filters, and one receive buffer(for now I guess). At last I started receiving some valid CAN frames in my logs.

First time a song switched was pretty magical. Also I figured I might have overengineered a simple task of changing a song on my PC :D 

Code already got published to my GitHub, all I have to do now is design a proper PCB and give the software more polish. Maybe in not much time I could finally enjoy music while driving without distracting myself while driving. 

See ya later and hope Episode 4 will be the last. Also I'm dedicating this episode to Gabe Newell, you know we want it! :P

Discussions