Loss of contact with a paired Bluetooth device notification

Doctor_E

New Member
Hi there,
I would like to ask if there is a way to use serial2 library in order to create an application (probably run in the background) which notifies the user (with an msgbox or a sound notification) when a paired bluetooth device looses the contact with the smartphone.

Thanx in advance ;)

PS: Not necessarily restricted to serial2 library, if there is another way (registry getvalue + timer or something) please let me know :cool:
 

Doctor_E

New Member
Thanks a lot Erel! One last question. Does anybody know if there is any value in the registry which changed in real-time when a device is paired or unpaired?

I know there are some keys in HKLM\Software\Microsoft\Bluetooth\ which may be related.

Thanks again, I really appreciate your help. :icon_clap:
 
Last edited:

taximania

Well-Known Member
Licensed User
Im going to spend a bit of time on this one.

Watch this space . . . . . .
 

taximania

Well-Known Member
Licensed User
ConnectionBluetoothCount always returns::confused: Invalid.
 

taximania

Well-Known Member
Licensed User
I now have a working basic4ppc.dll that can show all bluetooth devices in range :)

What I don't have yet, is the ability to detect if they are connected,
or connect to them :sign0137:

Half way there :cool:
 
Last edited:

taximania

Well-Known Member
Licensed User
Hi there,
I would like to ask if there is a way to use serial2 library in order to create an application (probably run in the background) which notifies the user (with an msgbox or a sound notification) when a paired bluetooth device looses the contact with the smartphone.
I've found a registry key that sort of works.

rtLocalMachine("System\State\Hardware\","Handsfree")
This key is 0 when my BT headset is 'not' connected, and '1' when it is.

I've attached a small example program.
Switch your headset on and press the 'monitor' button in the app.
If the connection is lost you get a notification.
If the connection is re-established you get another notification.
 

Attachments

Last edited:

pinoy_ako

Member
Licensed User
when connected to a device, try continously sending byte with a timer to bt serial port, it will generate error if connection lost. or, other device send byte, poll it with a timer. timer reset when when byte arrives. if byte stops arriving, timer will tick. notification is faster than with this.
 
Top