Hi Marcel,
What are the requirements to use inquiry with rssi? My
kernel version is 2.6.10 with bluez-utils.2.21.
Why it is not working? The periodic inquiry is working, but without
return an inquiry with rssi event.
Regards,
Claudio
if((dev_id = hci_get_route(NULL)) < 0) {
syslog(LOG_ERR, "Bluetooth device is not available");
result = RESULT_ADAPTER_NOT_FOUND;
goto cleanup;
}
if((sock = hci_open_dev(dev_id)) < 0) {
syslog(LOG_ERR, "HCI device open failed");
result = RESULT_ADAPTER_NOT_FOUND;
goto cleanup;
}
...
inq_mode.mode = 1; //INQUIRY_WITH_RSSI;
if (hci_send_cmd(sock, OGF_HOST_CTL, OCF_WRITE_INQUIRY_MODE,
WRITE_INQUIRY_MODE_CP_SIZE, &inq_mode) < 0) {
syslog(LOG_ERR, "Can't set inquiry mode:%s.", strerror(errno));
goto cleanup;
}
if (hci_send_cmd(sock, OGF_LINK_CTL, OCF_PERIODIC_INQUIRY,
PERIODIC_INQUIRY_CP_SIZE, &inq_param) < 0) {
syslog(LOG_ERR, "Can't send HCI commands:%s.", strerror(errno));
goto cleanup;
}
...
Hi Marcel,
I am sending the initial patch that implementing the skeleton
of the hcid D-Bus services.
Run hcid with a non-daemon option to see the output
Send the following messages to see the message handling.
dbus-send --system --type=method_call --dest=org.bluez /org/bluez/hci org.bluez.hci.PeriodicInqReq byte:1 byte:2 byte:3
dbus-send --system --type=method_call --dest=org.bluez /org/bluez/hci org.bluez.hci.CancelPeriodicInqReq
dbus-send --system --type=method_call --dest=org.bluez /org/bluez/hci org.bluez.hci.InquiryReq byte:1
dbus-send --system --type=method_call --dest=org.bluez /org/bluez/hci org.bluez.hci.RoleSwitchReq string:panu byte:1
Suggestions are welcome!
Regards,
Claudio.