This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WL1837MOD: RSSI for a connected device

Part Number: WL1837MOD

Hi,

I need to check the RSSI of a remote device that I maintain connection with by calling:

SPP_Open_Remote_Port.

After I establish the connection I need to monitor the RSSI.

the GAP_Perform_Inquiry does not work as the remote device stops advertising after I connect  to it, so the result is not sowing up with this call.

the HCI_Read_RSSI requires me to close SPP remote port, I cannot do that.

How can I do it without disconnecting?

Regards

Rafal Witelus

 

  • Hi Rafal,

    Have you tried using the HCI_VS_Read_RSSI (0xFDFC) command?

    Reference: WiLink 8.0 Bluetooth Vendor Specific HCI commands.

    Best regards,
    Vihang

  • Hi,

    Thanks for your help, I ma going in good direction.

    But the command 

    Byte_t Status;
    Byte_t ReturnBuffer[4];
    Byte_t Length = sizeof(ReturnBuffer);
    Byte_t OGF;
    Word_t OCF;
    Byte_t Params[1];

    Params[0] = TransceiverData[index].linkId;
    //Params[0] = 1;
    OGF = VS_COMMAND_OGF(0xFDFC);
    OCF = VS_COMMAND_OCF(0xFDFC);

    RSSI = HCI_Send_Raw_Command(BluetoothStackID, OGF, OCF, 1, Params, &Status, &Length, ReturnBuffer, TRUE);

    in the ReturnBuffer returns  

    [0] = 2

    [1] = 1

    [2] =  253

    [3] = 127

    in Status = 0

    [0] = 2 means  HCI_ERROR_CODE_NO_CONNECTION.

    BUt I have a SPP connection and I pass connection ID (1) as Params[0] .

    Does this mean I need to have HCI connection and need to disconnect SPP?

    Regards

    Rafal