Bluetooth Low Energy Connection Parameters for Android, iOS and Win8

前端 未结 3 1981
后悔当初
后悔当初 2020-12-23 23:02

I\'ve been looking all over the place for the required bluetooth connection parameters that will work for all three of these operating platforms. I\'m using the HOGP (Bluet

3条回答
  •  温柔的废话
    2020-12-23 23:31

    I believe that this characteristic is only meant to provide information to the Central device. That is why it is generally read-only (for me, and cxphong). Bingen's answer does not universally work, and I am not certain it is meant to work that way. Has anybody actually got it to work on a specific device?

    It appears that Android and iOS do not consult the information in this read-only characteristic, and so I am not certain that it is very useful.

    What works for me is described below, for Cypress peripheral and Android central. A similar approach should work with other devices.

    1. On peripheral, define the preferred connection parameters in a CYBLE_GAP_CONN_UPDATE_PARAM_T structure "params".
    2. After GATT connection, in CYBLE_EVT_GATT_CONNECT_IND event handler (for example), call CyBle_L2capLeConnectionParamUpdateRequest(connHandle, ¶ms).

    On the central side, there is nothing to do. After it receives the request, it will initiate the parameter update a bit later.

    Cheers,

    David

提交回复
热议问题