-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Hi,
I am creating a graphing app based off your library. The first time I connect to a device it works perfectly (Other than I had to remove the "replies" part of the string that gets added to the Queue. It seems like it always appends a 1 to every PID which would just make my ELM Simulator return nothing. Removing this makes it work.
However back to the issue, once I disconnect and reconnect it seems there are really weird concatenated messages being sent to the BT device.
Seems like something weird goes on after a disconnect that doesn't properly clean up. I have a hunch it is something to do with the intervalWriter which may go deeper into the way the btSerial lib is handling the buffers. But am struggling to debug that. I've tried just adding all the functions I could find that detach listeners, detach pollers, clear queue,etc..etc. None of it helped. If you disconnect again and reconnect the problem only compounds. See my 3rd screenshot.
Screenshot of Good Calls on first connect on OBD Device

Screenshot of Data receieved back in front end from OBD Device

Screenshot of calls being sent after disconnect and reconnect.

Screenshot of Data receieved back in front end from OBD Device after disconnect and reconnect.

After second disconnect and reconnect

You can find my project here which should demonstrate the issue.
https://github.com/Reiss-Cashmore/obdii-grapher
I am using Mac OSX if that helps.