I have an application in which I connect to a bluetooth device with a known address and password. If for some reason my application should crash while still connected, the connection remains active for approximately 5 minutes before I can reconnect.
I would like to reset the bluetooth dongle programmatically in this situation. I've found one example that shows opening the "BTD0:" device as a file and sending a command, however, this doesn't work, or I can't get the example to work.
I know there is SOME way to make this happen, because I can mouse over to the Bluetooth tray icon, right click, stop the dongle, and then start it again.
Do you know of a way I can reset the dongle programmatically? And if not, is there a way my application can regain control of the connected device when the application starts back up?
Thanks much
Steve