1

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?

Flame of udun
  • 2,136
  • 7
  • 35
  • 79
  • Good question, but I don't know if this is possible the way you want it. My first idea would be to send an AT command to each device, and check if you receive an 'OK' reply or something like that. Problem is, you have to be paired to communicate like that. So you have to skip all unpaired devices, including unpaired OBD-devices. – Eric Smekens Aug 26 '13 at 07:39

2 Answers2

1

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

0

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).

Eric Smekens
  • 1,602
  • 20
  • 32