简体   繁体   中英

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

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?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM