This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Peripheral Device Knowing Bluetooth Type of connection.

Hello to everyone and thanks in advance.

First of all, im new at this and would i might be asking something stupid.

I have a development, that one of the features would be an adaptive transfer bitrate, depending on the bluetooth version that the central device supports. 

Is there a chance to know what type of bluetooth conection is the central trying to stablish and adjust the firmware to use that transfer speed, (because i have to read some sensors, and upscale the frequency of the reading to match the better data transfer).

I hope i had make myself clear.

thanks again.

Parents
  • Thanks Simon for your anwnser.

    May i ask another thing?

    is there a flag or something inside the NRF52832 that would allow me to change the behaviour of my nrf device to make it run faster if the bluetooth connection its 5.0 instead of 4.2. As you explained, if the central device its a 4.2 connection, it wont use the 2Mbps bandwidth. Therefor, it doesnt make any sense to read the sensor at a higher speed, since it wont be using that bandwidth.

    For example:

    If the central device has only 4.2, the peripheral device will only read 25 times the sensor, and make a string that fixes in the 1Mbps bandwidth.

    But if the central device uses 5.0, that means i have 2Mbps bandwidth and i could read the sensor 50 times.

    Thats why im asking if there is a way for the peripheral device to know what type of connection the central stablished, and change the way it sends data to use that extra bandwidth. I know that if there isnt, i can just send a command over uart that means use the 2Mbps bandwidth.

    thanks again for all the help and patience.

  • I took a closer look at this and I think I know how to go about this.

    In the peripheral, you can use the function sd_ble_gap_phy_update(..) after a connection is established, to update the speed to 2 Mbps. You will then get a response from the central whether the PHY is supported or not. If it is not supported you will receive the BLE event BLE_GAP_EVT_PHY_UPDATE with a status equal "Not Supported" (=BLE_HCI_UNSUPPORTED_REMOTE_FEATURE) and if it is supported you will receive this BLE event with status equal "Sucess" (=BLE_HCI_STATUS_CODE_SUCCESS). The Message Sequence Chart Peripheral PHY Update gives you a better overview of this.

    The example examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput might be helpful to take a look at if you are going to implement this in your application.

    Best regards,

    Simon

Reply
  • I took a closer look at this and I think I know how to go about this.

    In the peripheral, you can use the function sd_ble_gap_phy_update(..) after a connection is established, to update the speed to 2 Mbps. You will then get a response from the central whether the PHY is supported or not. If it is not supported you will receive the BLE event BLE_GAP_EVT_PHY_UPDATE with a status equal "Not Supported" (=BLE_HCI_UNSUPPORTED_REMOTE_FEATURE) and if it is supported you will receive this BLE event with status equal "Sucess" (=BLE_HCI_STATUS_CODE_SUCCESS). The Message Sequence Chart Peripheral PHY Update gives you a better overview of this.

    The example examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput might be helpful to take a look at if you are going to implement this in your application.

    Best regards,

    Simon

Children
No Data
Related