Package: Bluez
Version: 5.50
I have implemented a GATT server in CPP which communicates to Bluez stack over
DBUS APIs. I am able to advertise, expose characteristics and have clients
connect with me. My reference is the doc and test folder in the bluez folder.
I would like to make my characteristic accessible only on secure (not legacy)
pairing. So I have added 'secure-write' and 'secure-read' flags to my
characteristic. When I try to read and write them using the nRF connect tool I
see that bluez is not forcing for pairing requests and I am able to read/write
the characteristic.
My app does not register any agent with the bluez since my peripheral has
NoInputOutput capability.
static int GetHandlerGattChar(sd_bus* bus, const char* path, const char*
interface, const char* prop, sd_bus_message* reply,
void* userdata, sd_bus_error* error) {
.....
if (property == "UUID") {
ret = sd_bus_message_append(reply, "s",
"12345678-1234-5678-1234-56789abcdef1");
} else if (property == "Service") {
ret = sd_bus_message_append(reply, "o",
DBUS_OBJECT_SERVICE0_NAME.c_str());
} else if (property == "Flags") {
ret = sd_bus_message_append(reply, "as", 3, "write-without-response",
"secure-write", "secure-read");
} else {
ret = sd_bus_error_set(error, SD_BUS_ERROR_UNKNOWN_PROPERTY, "" /*
message*/);
}
......
}
I don't understand what I am missing. Any help/support would be really
appreciated.
Rohit PAI
Project Design Lead, Connected Systems
Global Technology Organization,
Energy Management Business
Schneider Electric
D +91 (80) 45540171 x 40171
M +91 9008728855
F +91 (80) 45542000
E [email protected]<mailto:[email protected]>
Bearys Global Research Triangle (BGRT)
7th Floor, Tower-C, #63/3B, Gorvigere Village, Whitefield Ashram Road,
Bangalore - 560067, India
[cid:[email protected]]<http://www.schneider-electric.com/b2b/en/campaign/innovation/overview.jsp#xtor=CS4-204-[Display]--->