User Manual

Table Of Contents
202
CATC MERLINS WAND 1.22 APPENDIX C
Users Manual Merlin’s Wand Scripting Commands
HCIRoleDiscovery()
HCIRoleDiscovery(Address)
Return value
“Master”
“Slave”
“Failure”
“Failed: Device not found”
“Not connected”
Comments
Attempts to discover the role of our device relative to the specified device.
Example
result = HCIRoleDiscovery('6E8110AC0108');
if(result != "Success")
{
MessageBox(result, "Failed to get role!");
}
else
{
Trace("Our role is: ", result, "\n\n");
}
HCISetConnectionEncryption()
HCISetConnectionEncryption(Address, SetEncryption)
Parameter Meaning Default Value Comments
Address Bluetooth
address of
device rela-
tive to which
we want to
know our role
A connection must exist with this address for
Role Discovery to work.
Parameter Meaning Default Value Comments
Address Bluetooth
address of
device whose
encryption to
enable or dis-
able