LEBD,自动,Carista等OBD BLE适配器使用哪些GATT配置文件和服务? [英] Which GATT Profile and Services are used by OBD BLE Adapters like LELink, Automatic, Carista?

查看:214
本文介绍了LEBD,自动,Carista等OBD BLE适配器使用哪些GATT配置文件和服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究为支持BLE(蓝牙低功耗)的车载OBD2适配器构建应用程序(Android和iOS).为了使该应用程序能够与来自不同供应商的此类适配器一起使用,我假设将有一组标准的GATT配置文件,即这些适配器将用于标准功能(例如发动机RPM,燃油水平等)的服务和特性.可以在构建移动应用程序时参考的地方找到此信息吗?

I am exploring building apps (Android & iOS) for Car OBD2 Adapters that support BLE (Bluetooth Low Energy). In order for the app to be able to work with such adapters from different vendors, I presume there would be a standard set of GATT profile i.e. Services and Characteristics that these adapters would be using for standard features like engine RPM, Fuel level etc. Is this info available somewhere that I can refer while building the mobile app?

推荐答案

OBD2 BLE适配器不使用任何固定的GATT配置文件.大多数(如果不是全部)BLE OBD2适配器的工作方式是,它们提供一种或两种特性的服务:

OBD2 BLE adapters don't use any fixed GATT profiles. The way most (if not all) BLE OBD2 adapters work, is that they offer one service with one or two characteristics:

  1. 一个 write 特征.移动设备可以在此位置上写入其AT命令(例如ELM327)和PID.
  2. 一个通知特征.这是从汽车(ECU)返回结果的地方.
  1. A write characteristic. This one is where the mobile device can write its AT commands (in the case of, e.g., an ELM327) and PIDs to.
  2. A notify characteristic. This is the one where the results from the car (ECUs) are returned.

一旦获得了这些特性,就可以实现OBD2串行协议(例如,使用写入并等待响应的命令队列,然后将完成的命令传输到应用层).

Once you have access to these characteristics, you can implement the OBD2 serial protocol (e.g. using a command queue that writes and waits for the response, before transmitting the finished command to the application layer).

某些BLE适配器将这两者合并为一个特征.如果要支持任意适配器,则必须添加选择适配器"屏幕,在该屏幕中探查找到的适配器,记住其特征,然后进行通信.

Some BLE adapters merge these two into one characteristic. If you want to support arbitrary adapters, you will have to add a 'select your adapter' screen where you probe the found adapters, remember the characteristics, and then communicate.

这样,就可以编写适用于各种BLE OBD2适配器的应用程序,并且不仅支持少数几个选定的供应商,例如

That way it's possible to write apps that work with all kinds of BLE OBD2 adapters, and not only support a selected handful of vendors, e.g., such as OBD2 Expert (Disclaimer: I'm the author of that software).

希望有帮助!

这篇关于LEBD,自动,Carista等OBD BLE适配器使用哪些GATT配置文件和服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆