obd-ii

android bluetooth can't connect

夙愿已清 提交于 2019-12-02 16:25:03
I've been having this problem for a while and haven't been able to figure it out. I have a android application that puts all paired devices in a listview. When you click one of the list items, it will initiate a request to connect to that bluetooth device. I can get the list of devices with their addresses no problem. The problem is that once I try to connect I get an IOException on socket.connect(); The error message is as follows: "connect read failed, socket might closed or timeout, read ret: -1" Here is my code. ANY suggestions would be appreciated. I'm pretty stuck on this. fyi: the

Python .readline()

蹲街弑〆低调 提交于 2019-12-02 12:27:18
First let me preface with I am new to python, no ego here. I have this code I cobbled together from various sites the ultimate goal of which being that it would output a hex code to an OBD-II chip and wait for a response. This response, also HEX, is converted to decimal processed and sent to the output. Pretty simple right? Well, there are two problems. One of which being that .readline() removes the first letter of the response. For instance if I wanted ">Elm327" I would get back ">lm327". The other problem the bigger of the two is when I use .readline() I only get the request that I sent for

Which GATT Profile and Services are used by OBD BLE Adapters like LELink, Automatic, Carista?

本小妞迷上赌 提交于 2019-12-02 03:43:30
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 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

Unable to Get VIN Number response from OBD-2 Device

帅比萌擦擦* 提交于 2019-11-30 11:53:47
I need to fetch VIN number from car's controller using plxKiwi-2 wifi obd2 device. I am getting other information like car rpm,speed,throttle position,etc. in correct format. But when I request for VIN Number it gives me below response. 014 0: 49 02 01 FF FF FF 1: FF FF FF FF FF FF FF 2: FF FF FF FF FF FF FF which is invalid.In Hyundai's EON car, I got proper response for VIN Number,but in almost all other cars, I got above mentioned response. So is there any specific 'AT' command to get the proper VIN response ?? Please help. After lot of searching, I came to the conclusion that it is not

Converting Hex answer to Dec?

删除回忆录丶 提交于 2019-11-30 09:31:31
问题 I need some help in converting the answers I get from my OBD adapter in my car to decimal and then later adding whatever value comes out of the conversion to a formula and printed out. private class ConnectedThread extends Thread { private final InputStream mmInStream; private final OutputStream mmOutStream; private BluetoothSocket mmSocket; private ObdMultiCommand multiCommand; public ConnectedThread(BluetoothSocket socket) { connectionStatus = true; mmSocket = socket; InputStream tmpIn =

Converting Hex answer to Dec?

南楼画角 提交于 2019-11-29 15:52:39
I need some help in converting the answers I get from my OBD adapter in my car to decimal and then later adding whatever value comes out of the conversion to a formula and printed out. private class ConnectedThread extends Thread { private final InputStream mmInStream; private final OutputStream mmOutStream; private BluetoothSocket mmSocket; private ObdMultiCommand multiCommand; public ConnectedThread(BluetoothSocket socket) { connectionStatus = true; mmSocket = socket; InputStream tmpIn = null; OutputStream tmpOut = null; try { tmpIn = socket.getInputStream(); tmpOut = socket.getOutputStream(

Flow control message while receiving CAN message with ELM327

三世轮回 提交于 2019-11-29 12:34:08
I am trying to make a software, which runs under Windows and communicates with an ELM327 device. I created the first version and I went in my SMART ForTwo (SMART 451) vehicle and I managed to connect with the Instrument Cluster (Transmit CAN ID is 782, Receive CAN ID is 783). However I have a huge problem with Flow Control. Here is the log: TX: ATI RX: ELM327 v1.5a TX: ATE0 RX: ATE0 OK TX: ATSP6 RX: OK TX: ATH1 RX: OK TX: ATL1 RX: OK TX: ATCFC1 RX: OK TX: ATFCSM0 RX: OK TX: ATAL RX: OK TX: ATSH782 RX: OK TX: ATCRA783 RX: ? TX: ATST64 RX: OK TX: 1092 RX: 783 02 1A 87 TX: 1A87 RX: 783 10 16 5A

Send multiple OBD commands together and get response simultaneously

岁酱吖の 提交于 2019-11-28 19:44:59
I'm working on application which connects OBD2 adapter and getting the real time data like speed,rpm,throttle position etc..When I read one command at a time, it works fine like by sending command "010C\r", I get current RPM. I think that sending multiple commands in one request is not possible.But in other applications like EngineLink HD ,Dashcommand, we found that multiple components are updated at a time like if we are driving the car and check the RPM,Sped and Throttle then they are updating at every 1 second. It looks like real time data. I'm surprised that how is it possible ? We have

Unable to send ATZ command to ELM 327 after establishing connection with ELM327 in android

我只是一个虾纸丫 提交于 2019-11-28 12:29:50
I have written a code which is successfully able to find the paired OBD and establish the connection with ELM327 but when i am trying to send ATZ command the application gets crash. Here's the code snippet, I may have done wrong public HashMap<String, String> startOBDCommunicator( BluetoothSocket btSocketConnected, String paramClassName, String methodName) { HashMap<String, String> dataRetriever = new HashMap<String, String>(); sendDataToOBD(btSocketConnected, "ATZ\r"); dataRetriever.put("Reset", readDataFromOBD(btSocketConnected)); sendDataToOBD(btSocketConnected, "ATS0\r"); dataRetriever.put

Flow control message while receiving CAN message with ELM327

老子叫甜甜 提交于 2019-11-28 06:36:25
问题 I am trying to make a software, which runs under Windows and communicates with an ELM327 device. I created the first version and I went in my SMART ForTwo (SMART 451) vehicle and I managed to connect with the Instrument Cluster (Transmit CAN ID is 782, Receive CAN ID is 783). However I have a huge problem with Flow Control. Here is the log: TX: ATI RX: ELM327 v1.5a TX: ATE0 RX: ATE0 OK TX: ATSP6 RX: OK TX: ATH1 RX: OK TX: ATL1 RX: OK TX: ATCFC1 RX: OK TX: ATFCSM0 RX: OK TX: ATAL RX: OK TX: