Custom BT LE config

Discussion related to external OBD sensors
Mateusz
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 48
Joined: Mon Jul 03, 2017 8:32 pm
Has thanked: 2 times

Custom BT LE config

Postby Mateusz » Mon Jul 03, 2017 8:41 pm

Has anyone managed to connect BT LE version of the infamous vgate icar3 dongle? The dongle works with iOS app CarDoctor, which has a specific profile for vgate, but I can't get the custom expert settings to work in Harry's. Log from the CarDoctor only lists ELM AT commands and responses, so it isn't very helpful for initialising the connection.

I set the ELM327 type to Request/Reply
Connection type BTLE (obviously)
BTLE Peripheral Name to IOS-Vlink (that's how it connects with another program)
BTLE Service UUID: e7810a71-73ae-499d-8c15faa9aef0c3f2
BTLE Characteristic UUID: BEF8D6C9-9c21-4c9e-b632-bd58c1009f9f (both the only ones that made sense in LightBlue and suggested and indicated in https://stackoverflow.com/questions/425 ... peripheral

In the connection process the dongle lights green (BT connection attempted), but never blue (OBD data).
I did get the log from OBD/GPS buddy, but don't really know what to look for. Also, I couldn't manually initialize the dongle sending ATZ command using LightBlue.

The log says:

Code: Select all

[size=85]SENSORCONNECT  0003678393@main  D 02     --> call to BTLESensor::connect ()
SENSORCONNECT  0003678393@main  D 03       --> call to BTLESensor::connectAndRetryIfNotSuccessful (reconnect: true)
SENSORCONNECT  0003678393@main  D 04         --> call to Sensor::connectAndRetryIfNotSuccessful (reconnect: true)
SENSORCONNECT  0003678393@main  D 05           --> sensor class: BTLEOBDSensor
SENSORCONNECT  0003678393@main  D 05           --> call to Sensor::setReconnect (reconnect: true)
SENSORCONNECT  0003678393@main  D 05           --> Sensor::setReconnect () returns
SENSORCONNECT  0003678393@main  D 04         --> Sensor::connectAndRetryIfNotSuccessful () returns
BLUETOOTHLE    0003678393@main  D 04         --> call to BTLESensor::startConnecting ()
BLUETOOTHLE    0003678393@main  D 05           --> triggering discovery of characteristics for peripheral 8A0F8251-562B-4188-9289-F16A703688B6 in state BTLEPeripheralStateAvailable...
BLUETOOTHLE    0003678393@main  D 05           --> ... for service 180A and characteristics (2A26,2A19)
BLUETOOTHLE    0003678393@main  D 05           --> ... for service <CBService: 0x17407ff80, isPrimary = YES, UUID = E7810A71-73AE-499D-8C15-FAA9AEF0C3F2> skipped
BLUETOOTHLE    0003678393@main  D 04         --> BTLESensor::startConnecting () returns[/size]

And elsewhere

Code: Select all

[size=85]OBDSENSORS     0003676469@main  D 00 --> call to StreamSensor::stream:handleEvent: (stream: inputstream, eventcode: NSStreamEventErrorOccurred)
OBDSENSORS     0003676469@main  E 01   --> error #64: "The operation couldn’t be completed. Host is down" detected...
OBDSENSORS     0003676469@main  E 01   --> error reported twice ignored...
OBDSENSORS     0003676469@main  D 00 --> StreamSensor::stream:handleEvent: () returns
OBDSENSORS     0003676469@main  D 00 --> call to StreamSensor::stream:handleEvent: (stream: outputstream, eventcode: NSStreamEventErrorOccurred)
OBDSENSORS     0003676469@main  E 01   --> error #64: "The operation couldn’t be completed. Host is down" detected...
SENSORCONNECT  0003676469@main  E 01   --> disconnecting due to stream error: The operation couldn’t be completed. Host is down
SENSORCONNECT  0003676469@main  D 01   --> call to WifiOBDSensor::closeAndReconnect (reconnect: true)
OBDSENSORS     0003676469@main  D 02     --> setting initializing = true
OBDSENSORS     0003676469@main  D 02     --> call to OBDStimulator::updateOBDRequests (resetNumReplies: true)
OBDSENSORS     0003676469@main  D 03       --> reset 0 numReplies
OBDSENSORS     0003676469@main  D 03       --> OBD protocol initialization selected: ATSPA0
OBDSENSORS     0003676469@main  D 03       --> adaptive timing selected: ATAT0
OBDSENSORS     0003676469@main  D 03       --> request timeout set to: ATSTFF (from 1.02)
OBDSENSORS     0003676469@main  D 03       --> throttle PID selected: TPS
OBDSENSORS     0003676469@main  D 03       --> baud rate AT command selected: NULL
OBDSENSORS     0003676469@main  D 02     --> OBDStimulator::updateOBDRequests () returns
OBDSENSORS     0003676469@main  D 02     --> call to OBDParser::expectNextMessageWithStatus (startState: OBDStatusPIDExpected, mode: 0, pid: 0)
OBDSENSORS     0003676469@main  D 03       --> changeOBDStatus (newOBDStatus: OBDStatusPIDExpected) changes lastSequenceHadErrors to false
OBDSENSORS     0003676469@main  D 02     --> OBDParser::expectNextMessageWithStatus () returns[/size]

I couldn't find characteristic UUID I entered anywhere in the log.

Are the UUIDs wrong? Should I enter some funny ASCII initialisation string?


Mateusz
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 48
Joined: Mon Jul 03, 2017 8:32 pm
Has thanked: 2 times

Re: Custom BT LE config

Postby Mateusz » Tue Jul 18, 2017 12:48 pm

Code: Select all

--> ... for service <CBService: 0x17407ff80, isPrimary = YES, UUID = E7810A71-73AE-499D-8C15-FAA9AEF0C3F2> skipped


The above line seems to be the issue - can't really understand why the UUID I set manually is "skipped" in the discovery process, and the LapTimer never tries to communicate with the characteristic UUID when talking to the dongle.


User avatar
Harry
Site Admin
Site Admin
Posts: 8592
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Has thanked: 97 times
Been thanked: 354 times
Contact:

Re: Custom BT LE config

Postby Harry » Sun Jul 23, 2017 10:32 am

This means the service is not part of the BT LE configuration as transferred from custom settings. You may want to re-check if you have entered the services' UUID correctly. I will add another trace output to BT LE sensor configurations for the next update (next one after 21.0.7). This will allow checking where the problem is.

- Harry


Image Image Image Image
Mateusz
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 48
Joined: Mon Jul 03, 2017 8:32 pm
Has thanked: 2 times

Re: Custom BT LE config

Postby Mateusz » Sat Jul 29, 2017 7:09 pm

Great thanks for this. Service name was double checked (pasted from LightBlue to be certain), so something else must be a problem - length? dashes. Looking forward to the expanded logging down the line.


User avatar
Harry
Site Admin
Site Admin
Posts: 8592
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Has thanked: 97 times
Been thanked: 354 times
Contact:

Re: Custom BT LE config

Postby Harry » Tue Aug 01, 2017 7:26 am

In case you have Petrolhead (or Petrolhead upgraded to GP), the latest version has addition logging added.

Harry


Image Image Image Image
Mateusz
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 48
Joined: Mon Jul 03, 2017 8:32 pm
Has thanked: 2 times

Re: Custom BT LE config

Postby Mateusz » Tue Aug 01, 2017 8:53 am

I went for GP straight away. There seem to be no logging options in 21.0.7 here...


User avatar
Harry
Site Admin
Site Admin
Posts: 8592
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Has thanked: 97 times
Been thanked: 354 times
Contact:

Re: Custom BT LE config

Postby Harry » Wed Aug 02, 2017 9:45 am

Drilling into a specific problem, I'm working on Petrolhead updates only currently. Once this is stable again, I will release all editions. Either this or next week.

- Harry


Image Image Image Image
Mateusz
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 48
Joined: Mon Jul 03, 2017 8:32 pm
Has thanked: 2 times

Re: Custom BT LE config

Postby Mateusz » Sat Sep 23, 2017 2:51 pm

Just to confirm, the vgate icar3 obd dongle does work with Harry's on Android (checked with GPS Buddy) without any issues. 5-6hz connection is reported.
I am assuming the connection there is made via regular BT, so the custom BT LE issue remains unresolved, as is the possibility of using the dongle with iOS version of the LapTimer.


User avatar
Harry
Site Admin
Site Admin
Posts: 8592
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Has thanked: 97 times
Been thanked: 354 times
Contact:

Re: Custom BT LE config

Postby Harry » Tue Sep 26, 2017 5:51 pm

This area has received a rework already (which will get available publicly with v22). Please read the announcement on Harrys Developer Program.

- Harry


Image Image Image Image
Mateusz
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 48
Joined: Mon Jul 03, 2017 8:32 pm
Has thanked: 2 times

Re: Custom BT LE config

Postby Mateusz » Tue Oct 10, 2017 7:09 pm

Thank you! The new version works flawlessly. Proper settings are:
"IOS-Vlink",
service UUID: 18F0,
read Characteristic: 2AF0,
write Characteristic 2AF1.

...which is moot, as the dongle is now found automatically anyway. I've got to 7-8hz on an IOS, 09 Ford Galaxy Mk3, MultiRequests at 3 Adaptive (still have not checked adaptive timing options).



Return to “OBD”

Who is online

Users browsing this forum: No registered users and 3 guests