Hi folks,
This patch implements inquiry, periodic inquiry, role switch and cancel
periodic inquiry.
Suggestions and comments are welcome!
Regards,
Claudio
>>> Next action
1. move shared codes to common directory
2. fix the error code format for EFailed messages
3. handle multiple devices
4. develop other services
>>> Configuration file
location: /etc/dbus-1/system.d/hcid.conf
The D-Bus configuration file is required for security policies.
>>> How test
This is the easiest way to test the hcid D-Bus services. Another option is develop a "c" client
or a python client.
//Sending Get Device Request
$dbus-send --system --dest=org.bluez --type=method_call /org/bluez/hci org.bluez.hci.GetDevReq
//Sending Inquiry Request
1o. param: length
2o. param: num response
3o. param: flags (0 or 1)
$dbus-send --system --dest=org.bluez --type=method_call /org/bluez/hci org.bluez.hci.InquiryReq byte:4 byte:10 uint16:0
comment: We have develop a client to extract the reply message arguments
//Sending Periodic Inquiry Request
1o. param: length
2o. param: min period
3o. param: max period
$dbus-send --system --dest=org.bluez --type=method_call /org/bluez/hci org.bluez.hci.PeriodicInquiryReq byte:4 byte:27 byte:49
//Sending Cancel Periodic Inquiry Request
$dbus-send --system --dest=org.bluez --type=method_call /org/bluez/hci org.bluez.hci.CancelPeriodicInqReq
//Sending Role Switch Request
1o. param: Remote device
2o. param: Role
$dbus-send --system --dest=org.bluez --type=method_call /org/bluez/hci
org.bluez.hci.RoleSwitchReq string:00:20:E0:78:7F:7F byte:1
$dbus-send --system --dest=org.bluez --type=method_call /org/bluez/hci
org.bluez.hci.RoleSwitchReq string:00:20:E0:78:7F:7F byte:0