FuzzyLuke / OBD2Kit

OBD-2 library for iPhone
218 stars 57 forks source link

How to get continuously OBD2 Infos with OBD2Kit #2

Open inargq opened 9 years ago

inargq commented 9 years ago

Hey Guys,
I'm developing an iPhone App which connect to my Wifi OBD2 Adapter an sends me the actual values to my Phone continuously. That means when I drive faster I also want to show this in my App. I'm using the OBD2Kit from Github and programming in Objective C.
My OBD2 Adapter is the vGate iCar2.

I'm using the Sample App from the OBD2Kit to get all my OBD2 Informations. When I use the Sample App I just get the data one time when I open the App. That means the values don't change while driving.

For now I try to start a new Connection to the OBD2 by pressing a Button which starts the [_scanTool startScan] method.

When I press the Button

  1. Time it works all perfectly
    but
  2. Time it doesn't walks through the "didReceiveResponse" delegates. And so it doesn't show my actual values.

So can someone help me the get the Data all the Time

dhalman commented 9 years ago

In my experience with bluetooth, you have 2 options:

Reconnect as necessary whenever an update is needed (as BLE was intended at low frequencies) Subscribe to the characteristic's updates to promote continuous connection (and callbacks for value changes)

steffex commented 8 years ago

I have an wifi dongle and that works perfectly with OBD2Kit, also the delegates keep receiving data.