none
Bluetooth RSSI signal strength value Issue

    Question

  •  

    BthReadRSSI (http://msdn2.microsoft.com/en-us/library/aa916821.aspx)
    is supported on my Device and returns a value in range 0-255. 

    How can i map this value correctly to the Bluetooth specification which

    defines the signal strength in  -127 - 128 range !

     

    If the RSSI is within the Golden Receiver Range, HCI_Read_RSSI returns the zero.
    If the RSSI is below the Golden Receiver Range lower limit, HCI_Read_RSSI returns a negative value.
    If the RSSI is above the Golden Receiver Range upper limit, HCI_Read_RSSI returns a positive value.

     

    Is it right to convert the byte in sbyte ???  How was converted initially ushort to int !!!

    Wednesday, October 31, 2007 6:19 PM

Answers

  • The MSDN documentation is confusing on

    BthReadRSSI:  

    "Pointer to a USHORT type that specifies the

    signal strength as a value within the range of

    -127 and 128"


    The value returned is always positive 0-255.

    After testing with my device, i realised that
    to get a bluetooth specification conform value
    within the range -127 and 128,i had to convert
    to sbyte.

    In my tests,i was getting values in range of
    -16 (240)  to  +24(24). This behaviour looks now
    to be OK since the hardware manufacturers are
    free in implementing the negative and positive
    scaling of the RSSI values out of the Golden
    Receiver Range.

     

    Thursday, November 01, 2007 4:10 PM