Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
609 commits
Select commit Hold shift + click to select a range
a67a945
bumped up the min CAN frame size to allow for 12 bit PCI lengths
Jun 29, 2016
350e826
using byte literals for commands
Apr 24, 2016
d76acea
started implemention auto baud rate
Jun 16, 2016
3e96a65
first test with python native logging tools
Jun 29, 2016
9a2241f
fixed indentation error in new baud rate code
Jun 29, 2016
bb4ade4
added new logging to elm327.py
Jun 29, 2016
b91d9d5
added logging to remaining files
Jun 29, 2016
c496b35
added logging to protocol files
Jun 29, 2016
3e0d321
removed old debug system, wrote docs
Jun 29, 2016
44d03cc
fixed logging note on troubleshooting page
Jun 29, 2016
c0c4f25
organized command list
Jun 29, 2016
89fb379
confirmed CAN DTC count byte
Jun 29, 2016
4a3b0c2
added debug output for the ECU map
Jun 29, 2016
8790148
implemented units using pint
Jun 29, 2016
1d03abf
fixed tests for new Pint units
Jun 29, 2016
125ea38
fixed obdsim test for change to Pint quantities
Jun 29, 2016
edb55ba
added a new unit property for backwards compatibility
Jun 29, 2016
171c0a6
documented pint units
Jun 29, 2016
0611a71
wrote up the mode 06 table with drop decoder
Jun 30, 2016
8d16793
use pid decoder for MID getters
Jun 30, 2016
2b58457
fixed tests for None reserved commands, and mode_int -> mode
Jun 30, 2016
a644015
added TID table
Jun 30, 2016
1abddb8
started implementing monitor decoders and UAS system
Jun 30, 2016
0a227c0
started filling in the UAS ID table
Jun 30, 2016
0d3dcfb
special handling for mode 6 in CAN protocol
Jun 30, 2016
e78045e
implemented __str__ for monitors
Jun 30, 2016
c492272
simplified __str__ code
Jun 30, 2016
4a37c7b
moved UnitRegistry to the UAS file
Jun 30, 2016
000095c
finished first pass of UAS ID table
Jun 30, 2016
d826a21
finished remaining conversions
Jun 30, 2016
6ced0a2
finished intial implementation of mode 06 decoder, fixed tests
Jun 30, 2016
04c4905
initial test of monitor decoder
Jun 30, 2016
29ab768
better implemenation and lookup tools for MonitorTests
Jun 30, 2016
4a4a783
wrote basic tests for monitor decoder
Jun 30, 2016
f90302d
check that undefined tests are null
Jun 30, 2016
26ef462
wired up all mode 06 commands to the monitor decoder
Jun 30, 2016
00359ca
added test for special handling of mode 06 in CAN
Jun 30, 2016
2bc60d6
decided the old groups (by PID GET) was better
Jul 1, 2016
9d104ef
use existing DTC decoder to report the freeze DTC
Jul 1, 2016
0af16ea
removed unsupported warning from docs for FREEZE_DTC
Jul 1, 2016
7adcd1a
implemented bit-encoded O2 sensor decoders
Jul 1, 2016
e7725ca
updated docs
Jul 1, 2016
697c126
implemented aux input status
Jul 1, 2016
1d8f5f0
updated docs
Jul 1, 2016
ec048ad
removed old bitstring util
Jul 1, 2016
3fa53d0
removed old unhex util
Jul 3, 2016
be9bd8f
fixed case where all correctly sized messages were running the paddin…
Jul 3, 2016
a323ad4
replaced as many decoders as possible with calls to the UAS table
Jul 3, 2016
dd28a3d
removed test for removed decoders
Jul 3, 2016
9e3dc4b
formatting and comments in decoders
Jul 3, 2016
09bfe42
tweaked logging in elm327
Jul 3, 2016
b0f0403
forgot to bump up the version in __version__
Jul 3, 2016
56b642d
read data in blocks, not single characters
Jul 3, 2016
58d01d0
decreased wait time in obdsim test
Jul 3, 2016
303e6be
skip obdsim tests if no port was specified
Jul 3, 2016
449099b
removed unused test file
Jul 3, 2016
a4752be
updated docs on custom obd commands
Jul 3, 2016
10b660f
condensed custom commands unsupported handling
Jul 3, 2016
4a1e9ee
simplified debug enable into a oneliner
Jul 3, 2016
dc157a3
tweaked serial code for modern pyserial API
Jul 3, 2016
0b5ad60
added debug statements, increased timeout
Jul 4, 2016
594f545
don't bother with auto-baud when connecting to a pts
Jul 4, 2016
dcc99ec
bump to 0.5.1
Jul 4, 2016
b8535d4
set async to auto-baud by default
Jul 4, 2016
eec3bb5
removed commands that were deprecated in v0.5.0
Jul 4, 2016
2f360d5
added command validation function, check for mode 06 over non-CAN
Jul 4, 2016
52e33a9
fixed syntax error retrieving port status
Jul 4, 2016
73b1d2f
return empty strings instead of sentences
Jul 4, 2016
46cf2a5
renamed OBD.port --> OBD.interface
Jul 4, 2016
178e1a5
added tests for unsigned units
Jul 4, 2016
6f7894d
added tests for signed units
Jul 5, 2016
8ad96ee
skip mode 02 PID getters, added MID getters
Jul 5, 2016
2f6ecca
simplified PID getter enumeration
Jul 5, 2016
b11cc23
don't bother type checking everything
Jul 5, 2016
70deb94
corrected name/description for mode 07
Jul 5, 2016
bbd14e4
updated command docs
Jul 5, 2016
dd6dbd8
added response value column to commands docs
Jul 5, 2016
1ea15ba
use empty tuple to bank-align O2 sensor presence
Jul 5, 2016
818dd65
documented O2 sensor presence
Jul 5, 2016
e5bbb67
return full DTC tuple in FREEZE_DTC, use "" for unknown DTC, fixed tests
Jul 5, 2016
9810b4d
fixed single_dtc decoder
Jul 5, 2016
f4788a6
adding more links and response value descriptions
Jul 5, 2016
5de345a
added usage example to O2 sensors present
Jul 5, 2016
52ab6b8
added module layout, updated basic usage code
Jul 5, 2016
0ef0ee4
removed old set_supported() function
Jul 5, 2016
55eaad0
upcase TID names, lookup tests by string name
Jul 5, 2016
ba3c3d4
doc'd mode 06 responses
Jul 5, 2016
30d79f2
lists are only used on certain DTC commands
Jul 5, 2016
43af43e
started writing tests for/tweaking status decoder
Jul 6, 2016
b3c801f
wrote quick and dirty bitarray class
Jul 6, 2016
976775a
added __str__ for easy debugging
Jul 6, 2016
37cb763
using bitarray in PID decoder
Jul 6, 2016
6331a7f
simplified status decoder
Jul 6, 2016
0cc539f
reimplemented status, wrote test
Jul 6, 2016
5d1c502
wrote docs for status command
Jul 6, 2016
de288cb
link from commands table to status response description
Jul 6, 2016
44c1896
removed old bit utils
Jul 6, 2016
69fc042
rewrote fuel status, using bitarrays, read second system
Jul 6, 2016
7d039a3
added fuel and air status links
Jul 6, 2016
669827d
simplified air status decoder with bitarray
Jul 6, 2016
e267691
removed lingering bit-handling functions
Jul 6, 2016
1a54674
removed old reference to OBDResponse.unit
Jul 6, 2016
b90d274
responce --> response
Jul 6, 2016
a81c5b2
reorganized module layout
Jul 6, 2016
96ac20d
more links and edits
Jul 6, 2016
a709860
added example for adding support for OBDCommands
Jul 6, 2016
2a5e9bd
replaced retry with higher timeout
Jul 6, 2016
7f2488c
altered basic usage, placed red warnings for backwards compat and bel…
Jul 6, 2016
9cd77c9
bytearray now
Jul 7, 2016
5574775
deactivated mode 9 commands until they're implemented
Jul 7, 2016
0279782
enable STATUS_DRIVE_CYCLE
Jul 7, 2016
8e7a7c1
enable CONTROL_MODULE_VOLTAGE
Jul 7, 2016
aa9f8c1
enable COMMANDED_EQUIV_RATIO
Jul 7, 2016
40f16d5
enable ABSOLUTE_LOAD
Jul 7, 2016
9a147fc
fixed copy/paste typo
Jul 7, 2016
cc8ce34
added mkdocs patch for RTFD
Jul 7, 2016
b491a17
return empty list instead of empty string
Jul 11, 2016
b120b81
port_name now returns empty strings when no connection
Jul 11, 2016
9b92715
added CAN txid for the transmission
Jul 11, 2016
7261a35
moved command tables into their own page
Jul 21, 2016
237f89f
enable ECU tagging for the transmission
Jul 22, 2016
d76dae3
more debug info
Jul 22, 2016
a47ade5
more debug tweaking
Jul 22, 2016
5f1c9aa
prettier ECU map debug output
Jul 22, 2016
0c1f164
log baud/protocol in the correct places
Jul 22, 2016
70ecdb5
return early if set_baudrate fails
Jul 26, 2016
a22c161
added UAS to the control flow diagram
Jul 26, 2016
d9d7ff8
added notes on files that aren't in the diagram
Jul 26, 2016
348e5cf
elevated debug level to warning
Jul 27, 2016
b4fcfaa
silence test_cmd output when scanning PID support
Jul 27, 2016
266eb29
Merge branch 'devel'
Jul 27, 2016
8ae8f44
fixed custom command example code
Jul 28, 2016
c11ed0d
fixed comment to reflect new decoder format
Jul 28, 2016
4638a1b
added utf-8 coding marks so I can use unicode in my comments
Aug 2, 2016
2e2116e
fixed link to command tables
Aug 2, 2016
fd1a26e
bumped to v0.6.1
Aug 2, 2016
108726b
pegged dependency versions
Aug 8, 2016
4336e20
fixed arg names for fuel_type and obd_compliance, added tests
Aug 19, 2016
4d1baf9
OBDCommands use bytestrings now
Aug 26, 2016
dcd6b78
check commands for hex content before reporting integer mode/PID
Aug 26, 2016
b94dfad
allow OBDCommands to return mode/PID of None
Aug 26, 2016
6dd6b84
added travis
Aug 26, 2016
36784bf
response limit is frame-based, not ecu-based
Aug 26, 2016
f664264
clarity in order
Sep 4, 2016
82bc585
CAN protocol no longer removes mode/PID bytes
Sep 11, 2016
3c66e89
tweaked legacy protocol to mimic CAN responses
Sep 11, 2016
3ea8a57
retain the processing of CAN's DTC_Count handling
Sep 11, 2016
ec62a38
fixed protocol tests for CAN
Sep 11, 2016
341cc77
fixed protocol tests for legacy
Sep 11, 2016
14bbb0f
added mode/PID bytes in decoder tests
Sep 11, 2016
bee7ed7
fixed OBDCommand tests for byte trimming
Sep 11, 2016
2764db6
updated protocol readme with expanded data field
Sep 11, 2016
7d4e624
Message.data, not Frame.data
Sep 11, 2016
cf88cbd
dropping support for python 3.2
Sep 14, 2016
022a81b
Make connection timeout configurable
jlmcgehee21 Nov 24, 2017
1713ee1
change to
jlmcgehee21 Jun 2, 2018
3018278
update docs
jlmcgehee21 Jun 2, 2018
fb81192
Changed line to use pyserial's "serial_for_url" instead of "Serial" for
Jun 24, 2018
65fc42a
Merge pull request #97 from jlmcgehee21/fix/osx_failure_to_connect
Jun 24, 2018
e530ef8
Timeout has a unit of seconds
Jun 24, 2018
a9eb5af
Fixed test_obdsim.py failure
Jun 25, 2018
0aa8f73
Merge pull request #109 from brunoproduit/wifi
Jun 25, 2018
98d996c
Updated custom command docs to reflect the presence of the mode/PID b…
Jun 25, 2018
81fc7e5
Ignore non-decodeable data from the interface
adamnovak Sep 1, 2018
faaee8b
Merge pull request #116 from adamnovak/fix-unicode-decode
alistair23 Nov 1, 2018
cc674d4
obd: protocols: Itterate over ECU frames in ECU order
alistair23 Nov 2, 2018
5fee803
Fix the async problems with Python 3.7
alistair23 Nov 1, 2018
f82c381
travis.yml: Add Python 3.6 and 3.7 testing
alistair23 Nov 1, 2018
88af33c
obd/commands.py: Remove isinstance(...unicode) for Python 3
alistair23 Nov 4, 2018
7b6bcd3
obd/commands.py: Improve new multiversion isinstance()
alistair23 Nov 5, 2018
cc36562
bumped to v0.7.0
Nov 5, 2018
4a2ece5
Use the new long_description param in setup.py for a prettier PyPi page
Nov 5, 2018
66e15e3
obd: decoders: Ensure we don't exceed FUEL_STATUS array
alistair23 Nov 7, 2018
b568829
Add support for ELM_VOLTAGE responding with a 'V'
studioj Nov 11, 2018
58a3b5d
tests/test_decoders.py: Convert ' to "
alistair23 Nov 17, 2018
ba3c89b
obd/elm327.py: Change ELM327 command terminating characters to \r
apecone Nov 17, 2018
31a035c
Catch 'UNABLE TO CONNECT' when first querying protocol 0100
Ircama Dec 1, 2018
fad0702
Add support of custom headers
Ircama Nov 22, 2018
f9f14ee
Merge pull request #126 from Ircama/connect-check
alistair23 Dec 2, 2018
a372044
Merge pull request #125 from Ircama/headers
alistair23 Dec 8, 2018
d454521
check_voltage argument on OBD and Async
Ircama Dec 3, 2018
64109ec
Merge pull request #128 from Ircama/check_voltage
alistair23 Dec 16, 2018
684a5e4
Better Async management
Ircama Dec 29, 2018
6bb6a4a
Merge pull request #129 from Ircama/manage_exceptions
alistair23 Dec 31, 2018
bd8e644
docs: Fix incorrect whitespace according to PEP8 rules
Feb 28, 2019
596cc70
obd: Fix some incorrect whitespace according to PEP8 rules
Feb 28, 2019
e3be503
obd: Fix incorrect whitespace according to PEP8 rules
Feb 28, 2019
f574c28
tests: Fix incorrect whitespace according to PEP8 rules
Feb 28, 2019
36fe50d
travis: Add tox test coverage
Feb 28, 2019
c3a3042
Merge pull request #141 from alistair23/kamichal-pep8
alistair23 Mar 2, 2019
f21444b
elm327: Add low power mode support
alistair23 Feb 26, 2019
6e5564d
obd: Expose low power mode functions
alistair23 Feb 26, 2019
d2c9291
obd: Allow starting OBD with low power enabled
alistair23 Feb 27, 2019
3af3b2d
Merge pull request #138 from alistair23/alistair/low-power
alistair23 Mar 7, 2019
280a932
Avoiding Async exception on serial port failure
Ircama Mar 10, 2019
c2b8353
Merge pull request #142 from Ircama/ircama_async_init_fail
alistair23 Mar 13, 2019
9a08d54
adding __repr__
LightSoar Mar 17, 2019
7197b7f
Merge pull request #145 from LightSoar/patch-1
alistair23 Mar 18, 2019
45692a7
Fix 'toy-command' class type used for testing
Ircama Mar 18, 2019
de81b2b
Merge pull request #146 from Ircama/ircama-fix-toy-command
alistair23 Mar 20, 2019
1d4a0de
Fix bugs related to header management
Ircama Mar 10, 2019
1e8490b
Merge pull request #144 from Ircama/ircama-header-fix
alistair23 Mar 23, 2019
2f3349b
revise __repr__ to produce a working function
Ircama Mar 23, 2019
480fd79
Merge pull request #147 from Ircama/ircama-repr-improvement
alistair23 Apr 6, 2019
b430412
Better message size error
Ircama Apr 7, 2019
5e3ec36
Merge pull request #148 from Ircama/ircama-msg-sz-err
alistair23 Apr 7, 2019
1d5813a
Fix small typo in custom commands docs
May 15, 2019
73855df
bumped to v0.7.1
May 15, 2019
bbcacae
Minor change to the protocol values
cyrax6 Jun 24, 2019
90921a3
Merge pull request #152 from cyrax6/patch-1
alistair23 Jun 25, 2019
c96ae07
README: Add a common issue section
alistair23 Jul 31, 2019
64fae4a
Merge pull request #156 from alistair23/alistair/bluetooth-readme
alistair23 Aug 6, 2019
b799dd6
Fix send delay for bluetooth/Raspberry Pi
zaneclaes Oct 29, 2019
b2d65f6
Merge pull request #162 from zaneclaes/zkc-send-speed
alistair23 Nov 3, 2019
069f6aa
Patch invalid protocol error.
Dec 11, 2019
55c7926
Merge pull request #172 from lbl-anp/quick-log-fix
alistair23 Dec 11, 2019
2f5d2fd
Add support for Mode 9 PIDS
alistair23 Dec 8, 2019
2b6d1de
Merge pull request #171 from alistair23/vin-support
alistair23 Mar 6, 2020
74ba2bc
travis: Drop support for Python2
alistair23 Feb 27, 2020
c6af7e1
travis: Test Python 3.8
alistair23 Feb 27, 2020
8f4a55c
Merge pull request #183 from alistair23/python2
alistair23 Mar 6, 2020
c14db6a
Fix ECU ID for legacy protocol
gmaniak Jul 10, 2020
d5a0fcd
Support slow OBD adapters
Ircama Mar 12, 2021
a36cfcc
Fix protocol auto detect on BT Elm 327
gmaniak Jun 21, 2021
fe6f472
Fix broken anchor link in connection docs
sapkra Jan 1, 2022
a61b3de
Define CI pipeline using Github Actions
nyukhalov Apr 14, 2022
a08424d
Fix test_populate_ecu_map test
nyukhalov Apr 27, 2022
dbfd379
Only treat "OK" as a response terminator when appropriate
interfect May 20, 2022
d64064d
Update pint version to 0.19.*
nyukhalov Apr 11, 2022
c7be924
Update the python version range to 3.8-3.10
nyukhalov Jun 2, 2022
c55a7a9
tox.ini: Bump the python and pypi versions
alistair23 Jan 24, 2023
7642ad6
setup.py: Bump pint version
alistair23 Jan 24, 2023
e952b91
Fixed printing with brackets
Mario2407 Mar 7, 2023
d95554a
bumped to v0.7.2
Jul 10, 2023
7d5cd05
Proper `obd.Unit.percent`
green-green-avk Jul 9, 2023
eb8679e
Added readthedocs yaml config file before config files are enforced
Aug 14, 2023
3ecbf6f
Fixed mkdocs pages -> nav config
Aug 14, 2023
d7aad00
Revert docs updates: This is more finicky than I anticipated
Aug 14, 2023
d7c781a
Added readthedocs yaml config file before config files are enforced
Aug 14, 2023
e0304c3
Several spelling and grammatical fixes.
ion-mironov Feb 20, 2024
0c9abbc
Fix escaped serial port label string
dkg Feb 6, 2025
a47d791
Included note mentioning which OBD it will work with.
ion-mironov Feb 20, 2024
0c01901
Uprev pint to 0.24.* for python 3.13+ support
Apr 7, 2025
c30cfc3
Uprev tox.ini to test python 3.13
Apr 7, 2025
75a8820
Merge pull request #289 from brendan-w/user/brendan/uprev-pint
brendan-w Apr 7, 2025
630f0be
setup.py -> pyproject.toml
Apr 7, 2025
3d1beba
Updated the testing docs with modern build commands
Apr 7, 2025
289a889
Merge pull request #290 from brendan-w/user/brendan/pyproject.toml
brendan-w Apr 7, 2025
b53cbcb
bumped to 0.7.3
Apr 7, 2025
a378bdd
Merge pull request #291 from brendan-w/user/brendan/0.7.3
brendan-w Apr 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI Pipeline

on:
push:
branches: 'master'
pull_request:
branches: '*'

jobs:
build:
runs-on: ubuntu-18.04
strategy:
max-parallel: 4
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
56 changes: 56 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
env2/
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage*
.cache
nosetests.xml
coverage.xml
.pytest_cache

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/
14 changes: 14 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

python:
install:
- requirements: docs/requirements.txt

mkdocs:
configuration: mkdocs.yml
fail_on_warning: false
46 changes: 23 additions & 23 deletions COPYING → LICENSE
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble
Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Expand All @@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.

When we speak of free software, we are referring to freedom, not
Expand Down Expand Up @@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE

GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains
Expand Down Expand Up @@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
Expand Down Expand Up @@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
Expand Down Expand Up @@ -225,7 +225,7 @@ impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
Expand Down Expand Up @@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

NO WARRANTY
NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
Expand All @@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
Expand All @@ -290,8 +290,8 @@ to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
{description}
Copyright (C) {year} {fullname}

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -303,10 +303,9 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

Expand All @@ -330,11 +329,12 @@ necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.

<signature of Ty Coon>, 1 April 1989
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

130 changes: 62 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,92 +1,86 @@
pyobd
=====
python-OBD
==========

<pre>OBD-Pi: Raspberry Pi Displaying Car Diagnostics (OBD-II) Data On An Aftermarket Head Unit
A python module for handling realtime sensor data from OBD-II vehicle
ports. Works with ELM327 OBD-II adapters, and is fit for the Raspberry
Pi.

In this tutorial you will learn how to connect your Raspberry Pi to a Bluetooth OBD-II adapter and display realtime engine data to your cars aftermarket head unit.
Installation
------------

Hardware Required:
1. Raspberry Pi
2. Aftermarket head unit (Note: Must support Auxiliary input)
3. Plugable USB Bluetooth 4.0 Low Energy Micro Adapter
4. 2A Car Supply / Switch or Micro USB Car Charger
5. ELM327 Bluetooth Adapter or ELM327 USB Cable
6. RCA cable
7. Keyboard (*optional)
```Shell
$ pip install obd
```

What is OBD-II?
OBD stands for On-Board Diagnostics, and this standard connector has been mandated in the US since 1996. Now you can think of OBD-II as an on-board computer system that is responsible for monitoring your vehicle’s engine, transmission, and emissions control components.
Basic Usage
-----------

Vehicles that comply with the OBD-II standards will have a data connector within about 2 feet of the steering wheel. The OBD connector is officially called a SAE J1962 Diagnostic Connector, but is also known by DLC, OBD Port, or OBD connector. It has positions for 16 pins.
```Python
import obd

pyOBD?
pyOBD (aka pyOBD-II or pyOBD2) is an open source OBD-II (SAE-J1979) compliant scantool software written entirely in Python. It is designed to interface with low-cost ELM 32x OBD-II diagnostic interfaces such as ELM-USB. It will basically allow you to talk to your car's ECU, display fault codes, display measured values, read status tests, etc.
connection = obd.OBD() # auto-connects to USB or RF port

I took a fork of pyOBD’s software from their GitHub repository, https://github.com/peterh/pyobd, and used this as the basis for my program.
cmd = obd.commands.SPEED # select an OBD command (sensor)

The program will connect through the OBD-II interface, display the gauges available dependent on the particular vehicle and display realtime engine data to the cars aftermarket head unit in an interactive GUI.
Software Installation
Before you start you will need a working install of Raspbian with network access.
response = connection.query(cmd) # send the command, and parse the response

We'll be doing this from a console cable connection, but you can just as easily do it from the direct HDMI/TV console or by SSH'ing in. Whatever gets you to a shell will work!
print(response.value) # returns unit-bearing values thanks to Pint
print(response.value.to("mph")) # user-friendly unit conversions
```

Note: For the following command line instructions, do not type the '#', that is only to indicate that it is a command to enter.
Documentation
-------------

Before proceeding, run:
# sudo apt-get update
# sudo apt-get upgrade
# sudo apt-get autoremove
# sudo reboot
Available at [python-obd.readthedocs.org](http://python-obd.readthedocs.org/en/latest/)

Install these components using the command:
# sudo apt-get install python-serial
# sudo apt-get install bluetooth bluez-utils blueman
# sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev
# sudo apt-get install git-core
# sudo reboot
Commands
--------

Next, download the OBD-Pi Software direct from GitHub (https://github.com/Pbartek/pyobd-pi.git)
Here are a handful of the supported commands (sensors). For a full list, see [the docs](http://python-obd.readthedocs.io/en/latest/Command%20Tables/)

Or using the command:
# cd ~
# git clone https://github.com/Pbartek/pyobd-pi.git
*note: support for these commands will vary from car to car*

Vehicle Installation
The vehicle installation is quite simple.
- Calculated Engine Load
- Engine Coolant Temperature
- Fuel Pressure
- Intake Manifold Pressure
- Engine RPM
- Vehicle Speed
- Timing Advance
- Intake Air Temp
- Air Flow Rate (MAF)
- Throttle Position
- Engine Run Time
- Fuel Level Input
- Number of warm-ups since codes cleared
- Barometric Pressure
- Ambient air temperature
- Commanded throttle actuator
- Time run with MIL on
- Time since trouble codes cleared
- Hybrid battery pack remaining life
- Engine fuel rate
- Vehicle Identification Number (VIN)

1. Insert the USB Bluetooth dongle into the Raspberry Pi along with the SD card.
Common Issues
-------------

2. Insert the OBD-II Bluetooth adapter into the SAE J196216 (OBD Port) connector.
### Bluetooth OBD-II Adapters

3. Connect you RCA cable to the back of your aftermarket head unit and plug the other end into your Raspberry Pi.
There are sometimes connection issues when using a Bluetooth OBD-II adapter with some devices (the Raspberry Pi is a common problem). This can be fixed by setting the following arguments when setting up the connection:

4. Install your 2A Car Supply / Switch or Micro USB Car Charger.
```Python
fast=False, timeout=30
```

5. Finally turn your key to the ON position and navigate your head unit to Auxiliary input.
License
-------

6. Enter your login credentials and run:
# startx
GNU GPL v2

7. Launch BlueZ, the Bluetooth stack for Linux. Pair + Trust your ELM327 Bluetooth Adapter and Connect To: SPP Dev. You should see the Notification "Serial port connected to /dev/rfcomm0"
This library is forked from:

Note: Click the Bluetooth icon, bottom right (Desktop) to configure your device. Right click on your Bluetooth device to bring up Connect To: SPP Dev.
- <https://github.com/peterh/pyobd>
- <https://github.com/Pbartek/pyobd-pi>

8. Open up Terminal and run:
# cd pyobd-pi
# sudo su
# python obd_gui.py

Use the Left and Right arrow key to cycle through the gauge display.
Note: Left and Right mouse click will also work

To exit the program just press Control and C or Alt and Esc.
Update:
Data Logging
If you would like to log your data run:
# cd pyobd-pi
# python obd_recorder.py

The logged data file will be saved under:
/home/username/pyobd-pi/log/

Enjoy and drive safe!</pre>
Enjoy and drive safe!
Binary file removed bg_black.jpg
Binary file not shown.
Binary file removed cowfish.png
Binary file not shown.
5 changes: 0 additions & 5 deletions debian/changelog

This file was deleted.

1 change: 0 additions & 1 deletion debian/compat

This file was deleted.

Loading