can-bus-modules
CAN Bus interfacing for automotive/industrial networks using MCP2515 over SPI, baud rates, reading OBD-II frames.
v2026.11.13-21cd5683 התקנות+3 ב-7 ימים39 כוכביםסונכרן לפני 10 שעות
התקנה
עדיין אין לכם את ה-CLI של NotHoly? התקינו אותו קודם.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install aeondave/can-bus-modulesנכתב אל ~/.notholy/skills אחרי בדיקת החתימה וה-SHA-256.
חתימהחתום, ed25519
חבילה3cd32375…c5ad6f2f
3cd32375f1af…7647c5ad6f2fקובץ אחד · 1.3 KBסריקהבינוניממצא אחד
- לא נמצא רישיון
מקורgithub.com/AeonDave/malskill/tree/main/hardware/can-bus-modules@21cd568
הפריט הזה עדיין לא נכתב בעברית, ולכן הוא מוצג בשפה אחרת: English.
בעמוד הזה
Goal: Interface microcontrollers with automotive and industrial Controller Area Networks (CAN) using transceivers to read and spoof packets.
1. Hardware Stack
- MCU: e.g., Arduino or ESP32.
- Controller: MCP2515 (Translates SPI from MCU into CAN format). Maintains transmit buffers and acceptance filters.
- Transceiver: TJA1050 or MCP2551 (Translates logic-level CAN from the MCP2515 into the differential
CAN_HandCAN_Lanalog voltages required by the physical bus). - Physical Bus:
CAN_HandCAN_Ltwisted pair. Requires 120-ohm termination resistors at both ends of the bus.
2. Setting Baud Rates & Oscillators
The CAN bus relies entirely on timing. Connecting with the wrong speed brings down the bus (Error Passive).
- Standard OBD-II in vehicles uses 500 kbps.
- Slower comfort buses (doors, windows) might use 125 kbps or 250 kbps.
- Make sure you initialize the library with the exact crystal oscillator speed attached to your MCP2515 board (commonly 8 MHz or 16 MHz).
3. Standard vs Extended Frames
- Standard Frame: 11-bit ID. (e.g.,
0x7DF). Used heavily in standard automotive. - Extended Frame: 29-bit ID. (e.g.,
0x18DAF100). Often seen in heavy duty (J1939) or specialized sensors. - Payload is always 0 to 8 bytes.
4. Code Snapshot (mcp_can library)
#include <SPI.h>
#include <mcp_can.h>
const int spiCSPin = 10;
MCP_CAN CAN(spiCSPin);
void setup() {
Serial.begin(115200);
// Initialize exactly for 500k baud and 8MHz crystal
while (CAN_OK != CAN.begin(CAN_500KBPS, MCP_8MHz)) {
Serial.println("CAN init fail, retry...");
delay(100);
}
Serial.println("CAN init ok!");
}
void loop() {
long unsigned int rxId;
unsigned char len = 0;
unsigned char rxBuf[8];
if (CAN_MSGAVAIL == CAN.checkReceive()) {
CAN.readMsgBuf(&rxId, &len, rxBuf);
Serial.print("ID: "); Serial.print(rxId, HEX);
Serial.print(" Data: ");
for(int i = 0; i<len; i++) {
Serial.print(rxBuf[i], HEX); Serial.print(" ");
}
Serial.println();
}
}הקבצים בגרסה הזו
- SKILL.md2.3 KB
הרשאות
| הרשאה | הוצהר | נמצא בסריקה |
|---|---|---|
| קורא קבצים | לא | לא |
| כותב קבצים | לא | לא |
| מריץ פקודות shell | לא | לא |
| משתמש ברשת | לא | לא |
| משתמש במחברים | לא | לא |
| שולט בדפדפן | לא | לא |
ממצאי הסריקה
נבדק ב-13 בנוב׳ 2026
- בינוניתרישיון · לא נמצא רישיון
סריקה נקייה מורידה את הסיכון, אבל לא מוכיחה שהחבילה בטוחה. כדאי לקרוא מה מתקינים.
| גרסה | פורסמה | Commit | SHA-256 | חתימה | שינוי בהרשאות |
|---|---|---|---|---|---|
| v2026.11.13-21cd568 | 13 בנוב׳ 2026 | 21cd568 | 3cd32375 | חתומה | – |
עוד מ-AeonDave
הכול מהמפרסם הזהעוד בקטגוריה מובייל, קושחה וחומרה
לקטגוריהשאלו כל מה שהסקופ מאפשר.
יוצרים חשבון, מוסיפים קרדיטים ושואלים את השאלה הראשונה בצ׳אט או בטרמינל.
- 1/3
יצירת חשבון
פרטי או חברה. אפשר לעבור לחשבון חברה אחר כך בלי לאבד יתרה או מפתחות.
פרטיחברה - 2/3
הוספת קרדיטים
בכרטיס אשראי. תשלום לפי טוקן, בלי מנוי.
$5.00טעינה מינימלית - 3/3
שאלה ראשונה
בצ׳אט, או להתקין את ה-CLI ולהריץ notholy login בטרמינל.
$ notholy login