java obd,如何与OBD-II设备通信

There is OBD-II device like http://www.rczd.com/c/2015/Car_Diagnostic_Tools_0223/41193.html

this device provider does not have its web page or documentation source. We have short "quick start" in box and assurance that it support OBD-II PIDs.

The question is, if there are any general pattern how to communicate with this icar device.

Before I've used to connect with (freematics)dongle that has send the stream of data which I've parsed on fly.

Current one send only one value after one request we send to it (it is synchronous and can't handle more than one request per time).

I would like to get up-to-date OBD-II params to display them(frequently).

Any ideas ?

解决方案

If your device is compatible with the ELM327 you can use multiple PID requests but only if adapter is connected to the vehicle with CAN protocol. So it would work only with a subset of vehicles because not all vehicles support CAN.

Popular scan tools simply sends sequential requests. Maximum throughput you can gain with this approach is about 30-40 rps.

I don't know how freematics dongle works but I can see it has some SD card mounted - maybe it gives only emulation of parallelism and internally every request is sent sequentially?

If you are searching for reliable Java library for connecting to OBD II device I would recommend you https://github.com/pires/obd-java-api . You can also take a look at my library - https://github.com/devesion/java-obd-adapter

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值