Canbus

=== github ===
https://github.com/pierremolinaro/acan2517 from https://news.ycombinator.com/item?id=35452963 CAN network by its nature is supposed to be a "trusted network" with no external Inputs available (Air Gapped). But yeah, because headlights and blinkers needllessly complicated, cough er, need data uplinks.... totally NOT to check with Toyota if you've subscribed to their monthly "safety package" for $7.99, yeah, we've sort violated the Air Gap principal. Here's the problem everyone needs to pay attention to: If you demand Encrypted OR Signed CAN Bus, you will ABSOLUTELY get it from the manufacturers in the name of security. They will _gladly_ lock out the CAN bus so no third party accessories or diagnostic tools can work with your car.
https://github.com/commaai/opendbc
https://github.com/rbei-etas/busmaster, https://github.com/bri3d/simos18_sboot , https://github.com/bri3d/VW_Flash , https://github.com/commaai/openpilot/discussions/19932
=== canbus ===
https://forum.arduino.cc/index.php?topic=555608.0 canbus is a multi-master system where are all nodes are equal with each message being priority based. Any node can transmit a message at any time with the highest priorty message getting thru CAN only has masters. One node transmits at a time - if multiple nodes being a transmission at approximately the same time, they will collide, and the node transmitting the lowest ID will win arbitration. The other nodes will listen to the winning node's message and then after some backoff time re-try their own transmissions. Are you trying to get remote sensor readings at specific points in time or intervals in time? If so there are strategies that don't involve the request/response cycle of a polled system. Essentially you configure one node to broadcast a clock to which all the other synchronise their activity.
Each node does'nt have an Unique Address ID like I2C, they messages with any id and react to any message ID's as per the logic you apply in the MCU code you write.
https://electronics.stackexchange.com/questions/106715/is-the-can-bus-protocol-a-master-and-slave-protocol A CAN bus is multi-master and automatically arbitration free. The whole point is that you don't need a single master or main controller to take care of everything. Each message that is sent has a priority, and higher priority messages trump lower priority ones (a lower priority message will wait until there isn't a high priority message being sent). So there are no slaves. It's kind of similar to a peer to peer network, in that it's decentralized. The reason this is done is to reduce failure points. If a single main controller failed, so would the entire network. If there is no central controller, a single component can fail and the rest of the system will keep going. For your network, you should assign priorities to each command sent depending on what's most important. The Wikipedia article is actually quite good. https://en.wikipedia.org/wiki/CAN_bus
* https://alselectro.wordpress.com/2020/04/29/sensor-data-on-can-bus-arduino-with-can2515/ CANBUS
* https://github.com/autowp/arduino-mcp2515
=== canable ===
https://canable.io/ The CANable is a small low-cost open source USB to CAN adapter. The CANable shows up as a virtual serial port on your computer and acts as a serial-line to CAN bus interface. With the alternative candleLight firmware, the CANable enumerates as a native CAN interface on Linux. The CANable Pro is a galvanically isolated version of the CANable with enhanced ESD protection and breakaway mounting holes. from http://selfracingcars.com/
=== raspberry ===
https://www.raspberrypi.org/forums/viewtopic.php?t=141052 links to https://github.com/saper-2/pi-can-mcp2515-qg and https://www.youtube.com/watch?v=44Purrk3-74
https://www.fischl.de/usbtin/ usb to can
https://www.fischl.de/usbtin/ usb to can
https://www.waveshare.com/2-ch-can-hat.htm can hat
CAN bus module SN65HVD230 Waveshare
=== Blackpill ===
https://github.com/nopnop2002/Arduino-STM32-CAN
https://github.com/WeActTC/MiniF4-STM32F4x1 list of aliexpress pirate stm32
=== caraca ===
http://caraca.sourceforge.net/ The core of the NODE is the AVR AT90S4433 micro controller provided by Atmel.
The AVR is surrounded by the CANBus driver PCA82C250, the relay driver ULN2003, the Ir receiver TSOP1836 and the temperature sensor/thermostat DS1621.
The node is powered by a 12V dc from the bus.
NODE Schematics
http://www.youtube.com/watch?v=xt6_GWLTxN4
http://blackrynius.wordpress.com/category/can-bus/
http://diydrones.com/profiles/blogs/uavcan-can-bus-for-uav-preliminary-release
https://github.com/Seeed-Studio/CAN_BUS_Shield
https://github.com/watterott/CANdiy-Shield
http://uavcan.org/UAVCAN
http://www.canbushack.com/blog/index.php ,, http://opengarages.org/handbook/ Car Hacker's Handbook
=== links ===
Arduino code#Serial lib
Category:Microcontroller
Category:CAN bus
Category:Rs485
Category:Home automation
Category:Tsop1838
Category:Electronics
Category:Arduino
Category:Ycombinator