{"id":13740278,"url":"https://github.com/qnx425/ELM327SLCAN","last_synced_at":"2025-05-08T19:36:50.731Z","repository":{"id":46987777,"uuid":"167658192","full_name":"qnx425/ELM327SLCAN","owner":"qnx425","description":"ELM327 based vehicle's CAN bus sniffer","archived":false,"fork":false,"pushed_at":"2019-01-26T18:23:09.000Z","size":84,"stargazers_count":53,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-15T10:41:39.613Z","etag":null,"topics":["bus-monitoring","can","can-bus","elm327","lawicel","pic18f25k80","slcan","slcan-protocol","usbtin"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qnx425.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-26T06:35:29.000Z","updated_at":"2024-10-12T19:37:10.000Z","dependencies_parsed_at":"2022-09-08T16:52:16.436Z","dependency_job_id":null,"html_url":"https://github.com/qnx425/ELM327SLCAN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qnx425%2FELM327SLCAN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qnx425%2FELM327SLCAN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qnx425%2FELM327SLCAN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qnx425%2FELM327SLCAN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qnx425","download_url":"https://codeload.github.com/qnx425/ELM327SLCAN/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253135835,"owners_count":21859692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bus-monitoring","can","can-bus","elm327","lawicel","pic18f25k80","slcan","slcan-protocol","usbtin"],"created_at":"2024-08-03T04:00:45.548Z","updated_at":"2025-05-08T19:36:50.263Z","avatar_url":"https://github.com/qnx425.png","language":"C","funding_links":[],"categories":["Protocols"],"sub_categories":["OBD-II tools"],"readme":"### ELM327SLCAN\n\nThe cheap vehicle's CAN bus sniffer based on ELM327, special [bootloader](https://github.com/qnx425/PIC18F25K80-Bootloader), and [USBtin](https://fischl.de/usbtin/).\nWith this device you can monitor vehicle's CAN bus. Monitoring software – [CANHacker](https://cdn.hackaday.io/files/12644540960896/CANHackerV2.00.02.zip) or [similar](https://fischl.de/usbtin/#usbtinviewer).\n\n#### LEDs\n\n1. Red – power supply.\n2. Green – current connection status. If lights steady – connection is open. Flashes once in three seconds – connection is closed.\n3. Orange – error status.\n   - If lights steady – serial port buffer overflow error. This error occurs when the MCU does not have time to read the next command from PC. You can reset this error only by turning off the power supply.\n   - One flash in three seconds – CAN messages FIFO-buffer overflow in MCU. The depth of a FIFO-buffer is eight messages. Then the ninth message is received, this error is raised.\n   - Double flash in three seconds – internal text buffer overflow in MCU. This error is raised then the rate of incoming CAN-messages is very high and MCU does not have time to send them to PC.\n   - Triple flash in three seconds – internal text buffer overflow in MCU. This error is raised then the rate of incoming commands from PC is very high and MCU does not have time to process them all.\n\n\t\tThe last three errors could be reset with f2 command.\n\n\n#### Switch to Bootloader mode for firmware update:\n\n1.\tIssue the command B10[CR] in RS232 terminal software (for instance, [termite](https://www.compuphase.com/software_termite.htm)).\n2.\tDisconnect the COM port in RS232 terminal software.\n3.\tPress the red button 'Bootloader Mode' in [Serial Bootloader AN1310](http://ww1.microchip.com/downloads/en/AppNotes/Serial%20Bootloader%20AN1310%20v1.05r.zip) software.\n4.\tSwitching to Bootloader mode is reflected in the status bar.\n5.\tUpdate the firmware.\n6.\tTo start the updated application it is need to turn off and on the power.\n\n\n![](images/ELM327SLCAN.png)\n\n\n#### Filtering\n\nImplemented filtering 'Single filter mode' with three modifications as described in [SJA1000](https://www.nxp.com/docs/en/data-sheet/SJA1000.pdf) datasheet and [AN97076](https://www.nxp.com/docs/en/application-note/AN97076.pdf). The differences:\n\n1.\tRTR bit does not take part in filtering.\n2.\tTwo message's bytes do not take part in filtering. LSB ACR3 must be zero in case of work in CAN bus with 11-bit IDs.\n3.\tLSB ACR3 is copied to EXIDEN bit of RXF0SIDL. LSB AMR3 is copied to EXIDEN bit of RXM0SIDL. See the PIC18FXXK80 datasheet. One mask (RXM0) and one filter (RXF0) are used.\n\nTo activate the CANHacker Filter settings it is necessary that the connection has been already established (Connected to …). So - see the first Termite window:\n\n1.\tEstablish connection.\n2.\tClick Filter button.\n3.\tSet Mask Filter in the upper group box.\n4.\tClick OK button. As a result, we get ‘close’, ‘set mask’, ‘set filter’, ‘open’ commands.\n\nRange Filter filtering (lower group box) works in software. Issued command allows all incoming messages (mFFFFFF). \n\nIf you remove both checkboxes and press OK button, issued command allows all incoming messages (mFFFFFF). See the second Termite window.\n\n\n![](images/filtering.png)\n\n#### Bluetooth\n\nBluetooth name: OBDII  \nBluetooth PIN: 1234  \nSerial port settings: 38400, 8n1\n\n\n#### To build new firmware, it is need to install Microchip XC8 Compiler and MinGW.\n\n![](images/cmd.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqnx425%2FELM327SLCAN","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqnx425%2FELM327SLCAN","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqnx425%2FELM327SLCAN/lists"}