Isolating obd scan tool from other bluetooth devices during bluetooth device search

354 Views Asked by At

I am creating a java program to communicate with a bluetooth ELM 327 . I want the program to provide the user with a list of obd adapters in the area after device search and exlude other devices such as cell phones etc. I believed it could be done by isolating obd adapters from others using Bluetooth Device Class. However I cannot find the device class of an obd adapter.(I am using JSR 82 and an ELM327 bluetooth if it helps).

Can anyone tell me which device class an obd adapter conforms to OR an alternate method to isolate obd adapters?

2

There are 2 best solutions below

0
On

Try what @Erik Smekens suggested. You can connect to OBD-2 without pairing via insecure RFCOMM.

0
On

As I suggested in my comment, it's not possible to identify a OBD-client. ( As far as I know. It still has mysteries for me). The service is just a rfcomm/serial port over bluetooth and from the outside it looks as any other OBD adapter.

Your best shot will be connecting to each device, and send an AT command for each OBD-II device and check what the answer is. If you want to isolate all ELM327 devices, you can use this list:

https://www.sparkfun.com/datasheets/Widgets/ELM327_AT_Commands.pdf

The first 2 commands (@1, @2) are probably going to help you out. Otherwise just send a AT Command and checks if it responds with 'OK'. (SP 00 might be a good one).