About Inquiry_with_RSSI

Marcel Holtmann marcel at holtmann.org
Mon Apr 24 10:06:18 UTC 2006


Hi Carlos,

> Firsly, the command packets and constants:
> 
> #define NG_HCI_EVENT_INQUIRY_RESULT_WITH_RSSI    0x22
> 
> *typedef* *struct* {
>         u_int8_t        num_responses;      //* number of responses *//
> } __attribute__ ((packed)) ng_hci_inquiry_result_with_rssi_ep;
> 
> *typedef* *struct* {
>         bdaddr_t        bdaddr;
>         u_int8_t        pagescan_rep_mode;
>         u_int8_t        pagescan_period_mode;
>         u_int8_t        uclass[NG_HCI_CLASS_SIZE];
>         u_int16_t       clock_offset;
>         char 	        rssi;
> } __attribute__ ((packed)) ng_hci_inquiry_response_with_rssi;

and don't forget ng_hci_inquiry_response_with_rssi_and_pagescan_mode.

There exists buggy Bluetooth 1.2 devices from some companies that also
return the pagescan_mode field with this response even if it has been
removed from the specification.

To differentiate between these two events, you need to check the length
of the event and the num_responses. Use BlueZ as a reference on how to
do it.

Regards

Marcel




More information about the freebsd-bluetooth mailing list