I have worked since last day on this topic. I want to develop android application about obd-ii scanner. There are many open source project on Github or Google Codes. I have to find obd-ii simulator to developed this application without car or any odb-ii chip.
I found OBDSim to create sample data and answer the requests that send by my application. I encountered many problems and solved these problems by reading many documents and blog post. But I have last one problem and I need to your helps.
New version of OBDsim support Windows for Bluetooth connection now with using com0com. When I install com0com, I faced signature problem and I solved this problem to disable related windows feature. I have also set incoming port of Bluetooth to COM4. Everything are good so far. After that I want to create virtual ports by using com0com. It already create one pair when install. They are CNCA0 and CNCB0. I am only trying to change second port of this pair from CNCB0 to COM4. But windows gives error about COM4 is already using. Still I completed and assign COM4 instead of CNCB0. After that I run obdsim.exe and it start to create log like this;
SimPort name: CNCA0
Successfully initialised obdsim, entering main loop
10.046624 seconds. 0 samples, 0 queries. 0.00 s/s, 0.00 q/s
10.049810 seconds. 0 samples, 0 queries. 0.00 s/s, 0.00 q/s
10.049377 seconds. 0 samples, 0 queries. 0.00 s/s, 0.00 q/s
In this duration, I started to android application and press start live data button. I give and error on android phone about Bluetooth Connection Error - read failed, socket might closed or timeout. This is one scenario.
In second scenario, I removed the break com0com and I directly connect OBDsim to COM4. And I run obdsim.exe again. It also hava same output as before scenario. After I started t android application output change like this.
Echo disabled
Echo disabled
Echo disabled
10.066543 seconds. 0 samples, 6 queries. 0.00 s/s, 0.60 q/s
Echo disabled
Echo disabled
Echo disabled
Echo disabled
Echo disabled
10.030909 seconds. 0 samples, 5 queries. 0.00 s/s, 0.50 q/s
Echo disabled
Echo disabled
Echo disabled
Echo disabled
Echo disabled
Echo disabled
10.034040 seconds. 0 samples, 6 queries. 0.00 s/s, 0.60 q/s
Echo disabled
Echo disabled
Echo disabled
And I cant see any changes on my application.
If you know what is the problem or something that I made mistake or I forget, I am waiting or your help.
Thanks.
Okey. I solved my problem about this topic.
First of all, com0com is not necessary to communicate with OBDSim on Windows. I can successfully connect to my application and OBDSim and I can see values on my android phone screen.
My problem was about OBD Reader program on Android. I didn't understand the reason of this situation but OBDSim couldn't connect to all OBD readers. I suggest you to use torque lite android application when you try connect OBDSim. And you should be careful on order of process.
This solution works for me. You can try other application.
Thanks, M. Salih.