1
votes

I'm trying to use a Bluetooth OBDII (on-board diagnosis) to connect with a Bluetooth dongle connected to my computer (My OS is windows 7). The dongle connects to the device and assigns it 2 virtual com ports (COM4 for incoming and COM5 for outgoing), But unfortunately I couldn't communicate with this device over the virtual com port. I also attempted to work with winsock library but I didn't find any example for working with Bluetooth OBD and send and receive the instruments. I just found one Bluetooth API for android but it's not useful for me because I want to implement it inside the visual C++ and for PC. and right now I have 2 questions about that : 1. which method is better, Virtual com port or winsock and how ? 2. Do you have any sample code for working with Bluetooth OBD ?

1

1 Answers

0
votes

1: Has your device a ELM327 chip? If so, you can setup a serial port over bluetooth, and communicate with that port. I don't know winsock very much, but I think a serial port is better suited for this job. To set it up, have a look here: http://windows.microsoft.com/en-us/windows7/choose-a-com-port-for-a-bluetooth-enabled-device Maybe if you can pair with the device, windows 7 will automagically set it up?

2: You might want to have a look at: http://icculus.org/obdgpslogger/

It's open-source, so you can have a peek how it works. There's also a simulator in the package, which could help you developing/testing. Mostly is Linux based, but it should give you hints where to go. There are also windows installers available for the simulator.