简体   繁体   English

如何使用iphone使用蓝牙或wifi与OBD II进行通信

[英]How to communicate with OBD II using bluetooth or wifi using iphone

I like to create a simple application for iOS, which read data from car through ODB II Wifi/bluetooth device and display in iPhone screen. 我喜欢为iOS创建一个简单的应用程序,它通过ODB II Wifi /蓝牙设备从汽车读取数据并在iPhone屏幕上显示。 But i don't know where to start. 但我不知道从哪里开始。 Please somebody help me to achieve below results. 请有人帮我实现以下结果。

I have both Bluetooth and wifi dongle. 我有蓝牙和wifi加密狗。

Step 1 : Pair the bluetooth or Wifi dongle and iPhone. 第1步:配对蓝牙或Wifi加密狗和iPhone。

Step 2 : Read the details through dongles 第2步:通过加密狗阅读详细信息

Please refer any tutorial or sample code which i can understand easily. 请参阅我能够轻松理解的任何教程或示例代码。 I want to understand the these process in-depth and want to code by myself. 我想深入了解这些过程,并希望自己编写代码。 So please help. 所以请帮忙。

Thanks in advance. 提前致谢。

As David mentioned, on iOS you can use WiFi OBD interface only. 正如David所说,在iOS上你只能使用WiFi OBD接口。 Standard Bluetooth (not BTLE) will not work. 标准蓝牙(不是BTLE)不起作用。 Bluetooth devices should be approved by Apple to be able to transfer data to/from iOS. Apple应批准蓝牙设备,以便能够向iOS传输数据。 AFAIK there is no such a OBD's. AFAIK没有这样的OBD。

Probably your OBD dongle is based on ELM327 chip. 可能你的OBD加密狗基于ELM327芯片。 Good starting point is this doc . 这个文档很好的出发点。 Read it carefully. 仔细阅读。 This is everything what you need. 这就是您需要的一切。 Interesting things starts at page 7. 有趣的事情从第7页开始。

On iOS you should open TCP connection with your OBD IP address(for example using NSInputStream , NSOutputStream ), then configure OBD using AT commands. 在iOS上,您应该使用OBD IP地址打开TCP连接(例如使用NSInputStreamNSOutputStream ),然后使用AT命令配置OBD。 Rest is described in section "Talking to the Vehicle" (page 30) in ELM link. 休息在ELM链接的“与车辆通话”(第30页)一节中介绍。 Enjoy reading :) 享受阅读 :)

If you need more help- just ask. 如果您需要更多帮助 - 请问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM