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

Q : Bluetooth Accessory Design for Apple Products

Hello, I'm using the nRF51822 and tried the HID Keyboard Application (S110, ble_app_hids_keyboard) example. (Nordic\nrf51822\Board\nrf6310\ble\ble_app_hids_keyboard )

The nRF51 SDK version is 6.1. I use IAR for ARM 7.1 and I use J-Link to download the code.

I'm a novice developer so please, I apologize if this question is silly or obsolete.

I am making a iPhone Shutter. I'm testing with iPhone 5S with iOS 8.1.2 (12B440). The phone has paired the board perfectly. Also when I press the button, the message hello appeared on the phone.

So I changed the report to activate the volume button by adding the consumer report.

My_report.txt

Sending the volume key worked.

However, my concern is that pairing with the phone is quite unstable.

I'm trying to change the connection parameters, following this document.

ref : developer.apple.com/.../BluetoothDesignGuidelines.pdf

//////////////////////////////

Thus, my questions are

image description

As the picture shows, I tried to added the TX power level at the advertising_init function. Also, I changed the flag BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE to BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE.

advertising.txt

However, the connection has become more unstable, and Android products cannot discover the board without connecting with the Master control app.

Is this not the proper way to add the TX power level?

Also, some codes did not added the TX power level but worked. Is this mandatory?

  1. As, the second picture shows,

image description

I tried to changed the parameters. At the example code, I think the parameters do not satisfy the condition.

//These settings are from the HID Keyboard Example

#define MIN_CONN_INTERVAL                MSEC_TO_UNITS(7.5, UNIT_1_25_MS)               /**< Minimum connection interval (7.5 ms) */
#define MAX_CONN_INTERVAL                MSEC_TO_UNITS(15, UNIT_1_25_MS)                /**< Maximum connection interval (30 ms). */
#define SLAVE_LATENCY                    25                                              /**< Slave latency. */
#define CONN_SUP_TIMEOUT                 MSEC_TO_UNITS(3000, UNIT_10_MS)                 /**< Connection supervisory timeout (300 ms). */ 

I tried to change these like this.

//My settings
#define MIN_CONN_INTERVAL               MSEC_TO_UNITS(20, UNIT_1_25_MS)             /**< Minimum acceptable connection interval (20ms, setting for iOS). */
#define MAX_CONN_INTERVAL               MSEC_TO_UNITS(40, UNIT_1_25_MS)             /**< Maximum acceptable connection interval (40ms). */
#define SLAVE_LATENCY                   50
#define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(4000, UNIT_10_MS)

However, this does not work either.

May I ask you how to change these parameters?

-Regards, Mango922

Related