Диагностика авто программа питон

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Python 3 interface to ELM327 Devices

License

tpltnt/pyELM327

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Читайте также:  Set string java android

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

Readme.md

pyELM327 — A Python 3 interface to Generic OBD2 Devices

Frustrated with the quality of free OBD2 software, I decided to write my own. This involved learning how the ELM327 interface works, and in the meantime I figured I’d simply provide an API to access the ELM327 device programmatically, which I can then wrap a UI around.

Note: This is a work in progress, please don’t expect it to be complete.

It’s also very poorly tested, using only the platforms and vehicles I had available. At this stage, that consists of:

  • ELM327 device — Generic devices vary vastly in quality, so compatibility is not guaranteed.
  • Python 3.x
  • pySerial

pyELM327 supports Python’s Context Manager, so you can do stuff like this:

import elm327 with elm327.ELM327(2) as elm: print(elm.fetchBatteryLevel()) 

The argument 2 is the port, per the pySerial specifications (COM3 in this case). On Linux replace 2 with ‘/dev/ttyUSB0’. You can also specify the baud rate and other serial port options.

Other examples can be found in examples/

  • We don’t cope with changing baudrates terribly well at all — need support for polling the baudrate so we can reset a device with a non-default baud rate. It works as long as nothing goes wrong.
  • Haven’t tested DTC retrieval, because I haven’t yet managed to throw a code on any of my cars. I might just unplug the MAF.
  • Need to implement proper exceptions.
  • Documentation is appalling.

Источник

PyRen Android Расширенная диагностика Renault

Приложение PyRen для диагностики и обслуживания автомобилей Renault обладает максимальной функциональностью. Возможности программы сопоставимы с дилерским сканером. Заменяет дорогой профессиональный сканер — Renault CAN CLIP.

Кроме прочего, в PyRen есть возможность проверить на подлинность адаптер ELM327, узнать реальный пробег и создавать PIDы для Torque. Но за такие способности придётся немного повозиться с установкой.

Тому, кто не хочет возиться с установкой или кому не нужны дополнительные функции лучше обратить внимание на почти полный аналог PyRen — программу Pyclip.

блоки управления в pyren

PyRen корректно работает на Android 4.4 и выше. На смартфонах с Андроид 4.2 часто возникает проблема доступа к адаптеру. На планшетах такой проблемы нет.

Как скачать и установить

1. Разрешаем установку приложений из неизвестных источников.

включение разрешения установки из неизв. источников

2. Устанавливаем приложения SL4A и Python.

3. Скачиваем в память телефона архив со скриптами. Рядом с этим архивом должны быть папки «sl4a», «DCIM», «Download». Распаковываем его здесь же. При работе с файлами и архивами удобно пользоваться файловым менеджером, например, ES Explorer. У кого нет — скачиваем.

Установка-Pyren

Таким образом, у вас в корне памяти телефона будет папка «sl4a» и «com.googlecode.pythonforandroid». В папке «com.googlecode.pythonforandroid» находятся файлы для Python: python_scripts_r26.zip, python_extras_r29.zip и python_r29.zip.

4. Запускаем ранее установленное приложение PythonForAndroid. Нажимаем Local Install, затем Run Local Install. При установке питон проверяет актуальную версию у себя на сайте, нам она не подходит, устанавливаем локальную. Проверьте, чтобы установилась правильная версия — Version Installed: Bin: 29 Extra: 29 Scripts: 26.

установка-python

5. Удаляем ненужные скрипты из папки /sl4a/scripts/. Эта папка должна остаться пустой.

Удаляем ненужные скрипты

6. Скачиваем архив Pyren Master и распаковываем его в папку /sl4a/scripts/.

7. Скачиваем базу данных CLIP, распаковываем туда же в /sl4a/scripts/. Должна получится следующая структура папок в /sl4a/scripts/:
/EcuRenault/
/Location/
/pyren/
/Vehicles/
_pyren_launcher.py
busmon_4a_launcher.py
cmdr_4a_launcher.py
make_torque_pids.py
pyren_4a_launcher.py

структура-папок-в-sl4a

Можно использовать базу данных 192, не требующую распаковки. Для этого нужно скачать файл и просто поместить его по указанному пути.

8. Включаем приложение SL4A, а в нём запускаем _pyren_launcher.py.

Запускаем-pyren

9. Запуститься оболочка Pyren. Нужно выбрать тип используемого адаптера BT или Wi-Fi. Для адаптера Wi-Fi нужно указать адрес и порт для подключения (для WiFi чаще всего используются адрес 192.168.0.1:35000, либо 192.168.1.1:35000). После этого нажимаем кнопочку START.

Работа-pyren

Размер текста на экране изменяется кнопками громкости на телефоне «+» и «−».

10. Кнопка SCAN позволяет подключаться скрипту к автомобилю, игнорируя сохраненный ранее savedEcus.p, т. е. проводя опрос всех блоков управления автомобиля. При включении режима логирования, в папке logs/ появится два файла, необходимых для проверки работы скрипта и адаптера.

11. При обновлении версии скрипта нужно удалить только скрипты лаунчеров, оставив базу CLIP и старую версию PyRen с сохраненным вашим savedEcus.p файлом:
/scripts/EcuRenault/
/scripts/Location/
/scripts/Vehicles/
/scripts/pyren/

После этого можно распаковывать новую версию PyRen.

Видео о том, как установить Pyren На Андроид:

Опрос пробега автомобиля по всем доступным блокам

Запускаем лаунчер cmdr_4a_launcher.py и скрипт опросит все блоки на наличие информации в них о пробеге. Однако следует помнить, что подделать пробег можно в любом блоке. Сложнее подделать в системе впрыска, когда параметр пробега там присутствует. Чаще он есть на машинах с противосажевым фильтром.

опрос блоков управления на пробег автомобиля

Скачать скрипты и базы данных можно с Яндекс.Диска.

Смотрите также видео как работать с программой:

Источник

Welcome

Python-OBD is a library for handling data from a car’s On-Board Diagnostics port (OBD-II). It can stream real time sensor data, perform diagnostics (such as reading check-engine codes), and is fit for the Raspberry Pi. This library is designed to work with standard ELM327 OBD-II adapters.

NOTE: Python-OBD is below 1.0.0, meaning the API may change between minor versions. Consult the GitHub release page for changelogs before updating.

Installation

Install the latest release from pypi:

Note: If you are using a Bluetooth adapter on Linux, you may also need to install and configure your Bluetooth stack. On Debian-based systems, this usually means installing the following packages:

$ sudo apt-get install bluetooth bluez-utils blueman 

Basic Usage

import obd connection = obd.OBD() # auto-connects to USB or RF port cmd = obd.commands.SPEED # select an OBD command (sensor) response = connection.query(cmd) # send the command, and parse the response print(response.value) # returns unit-bearing values thanks to Pint print(response.value.to("mph")) # user-friendly unit conversions 

OBD connections operate in a request-reply fashion. To retrieve data from the car, you must send commands that query for the data you want (e.g. RPM, Vehicle speed, etc). In python-OBD, this is done with the query() function. The commands themselves are represented as objects, and can be looked up by name or value in obd.commands . The query() function will return a response object with parsed data in its value property.

Module Layout

import obd obd.OBD # main OBD connection class obd.Async # asynchronous OBD connection class obd.commands # command tables obd.Unit # unit tables (a Pint UnitRegistry) obd.OBDStatus # enum for connection status obd.scan_serial # util function for manually scanning for OBD adapters obd.OBDCommand # class for making your own OBD Commands obd.ECU # enum for marking which ECU a command should listen to obd.logger # the OBD module's root logger (for debug) 

License

GNU General Public License V2

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

OBD-II serial module for reading engine data

License

brendan-w/python-OBD

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

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.

import obd connection = obd.OBD() # auto-connects to USB or RF port cmd = obd.commands.SPEED # select an OBD command (sensor) response = connection.query(cmd) # send the command, and parse the response print(response.value) # returns unit-bearing values thanks to Pint print(response.value.to("mph")) # user-friendly unit conversions

Here are a handful of the supported commands (sensors). For a full list, see the docs

note: support for these commands will vary from car to car

  • 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)

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:

This library is forked from:

Источник

Оцените статью