Does anyone know where (registry perhaps) or how can I find list of currently available bluetooth devices?
My problem is following. I have to print to serial port (bluetooth SPP device, e.g. COM6).
It works fine if device is connected when I start my application, but for all other cases I cannot continue printing:
- if I "accidentaly" power off the device, I don't know how to get response and be informed of new device status (I can get exception, but not immediatelly after power off of the device)
- if I power on the device again, I cannot successfully connect to it (even though it is paired with winCE device, setup as default outgoing SPP etc.)
So, basically what I need is some kind of discovery whether certain device is present and ready or not.
(I tried simple file and stream access to COM port, tried miniComm library as someone suggested, but with no success. In all cases I can print when device is ready in moment I enter my app, but after first power off I cannot get it back without leaving app and entering again - I don't connect on device in onCreate or similar but rather on every print try, so that this issue is quite frustrating - initially I wanted to connect once and repeat connect if neccessary - it is faster, but I can't make it work)