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

Error using nRF Master Control Panel - Error (0x8)

Hello, I'm using the nRF6310 board and tried the HID Keyboard Application (S110, ble_app_hids_keyboard) example.

The nRF51 SDK version is 6.1. I use IAR for ARM 7.1.

I downloaded the example code and tried to connect the board with the Master Control Panel app. I use LG Nexus 5 D821.

While connecting, a error message had appeared.

nRF Master Control Panel, 2015-01-07

 Nordic_Keyboard (F3:7C:22:93:EA:42)

 V 13:22:19.023 Connecting to F3:7C:22:93:EA:42...
 D 13:22:19.033 gatt = device.connectGatt(autoConnect = true)
 D 13:22:19.564 [Callback] Connection state changed with status: 0 and new state: 2 (CONNECTED)
 D 13:22:19.580 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
 I 13:22:19.666 Connected to F3:7C:22:93:EA:42
 V 13:22:20.303 Discovering Services...
 D 13:22:20.316 gatt.discoverServices()
 D 13:22:21.870 [Callback] Services discovered with status: 0
 I 13:22:21.897 Services Discovered
 V 13:22:21.949 Generic Access (0x1800)

 - Device Name [R W] (0x2A00)
 - Appearance [R] (0x2A01)
 - Peripheral Preferred Connection Parameters [R] (0x2A04)

 Generic Attribute (0x1801)
 Device Information (0x180A)
 - Manufacturer Name String [R] (0x2A29)
 - PnP ID [R] (0x2A50)

 Battery Service (0x180F)
 - Battery Level [N R] (0x2A19)
    Client Characteristic Configuration (0x2902)

 Human Interface Device (0x1812)
 - Protocol Mode [R WNR] (0x2A4E)
 - Report [N R W] (0x2A4D)
    Client Characteristic Configuration (0x2902)
    Report Reference (0x2908)
 - Report [R W WNR] (0x2A4D)
    Report Reference (0x2908)
 - Report Map [R] (0x2A4B)
 - Boot Keyboard Input Report [N R] (0x2A22)
    Client Characteristic Configuration (0x2902)
 - Boot Keyboard Output Report [R W WNR] (0x2A32)
 - HID Information [R] (0x2A4A)
 - HID Control Point [WNR] (0x2A4C)

 D 13:23:28.517 [Callback] Connection state changed with status: 8 and new state: 0 (DISCONNECTED)
 D 13:23:28.545 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
 E 13:23:28.571 Error (0x8): GATT INSUF AUTHORIZATION
 D 13:23:28.595 gatt.refresh()

After refreshing, it does not try to connect.

I did not change the example code. Why do I recieve the error?

E 13:23:28.571 Error (0x8): GATT INSUF AUTHORIZATION

Thank you for helping me!

custom.h

hid main.txt

  • Oh, it works. Using your keyboard.hex file, it seems to work fine. One more thing.

    As you said, I'm trying to run the examples\ble_peripheral\ble_app_hids_keyboard code which was in the SDK7.2.

    One problem is that while skipping to SDK 7.2, it seems the new keyboard example does not use

    nrf_gpio_cfg_output, APP_BUTTON_INIT(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY, true), void button_event_handler and more.

    It seems the new SDK replaced it with bsp.h and bsp.c MACROS.

    If I want to use the MACROS in bsp.h, do I have to define symbols at the preprocessor settings?

    For example, BUTTONS_NUMBER=2 BSP_BUTTON_0=5 BSP_BUTTON_1=9 BSP_LED_0_MASK=7

    Is there a brief explanation of the usages?

  • The BSP_BUTTON_0 and so on is defined in PCA10028.h. PCA10028 is our newest development kit. You could either modify it to the buttons and leds on the nRF6310, or create a new board file.

  • Thank you for replying Petter. Well, I think this is not related to the SDK problem.

    The keyboard hex file you gave me pairs well with the iOS devices. Also the SDK 7.2's HID keyboard examples works well with the iOS devices as well.

    Actually the problem is that I edited the HID report to add a volume control (Consumer Report).

    I think when I try to add the consumer report and test it to my custom board, the bonding keeps fails and causes problems (regardless of the SDK version).

    I'm sorry but can you check my report map codes? I posted at this post.

  • Thank you for sharing your code. I tried your code with my custom board. However, similar problem kept occurred. (The pairing / bonding did not went smoothly with the iOS devices. Also the Nexus 5 did not detect the device without connecting the board using the master control app.)

    Maybe I have to conclude that my custom board has some problems. Sorry to consume too many time on me.

    To summerize the outcome,

    1. The bonding did not went well between the board and the iOS devices. The reason could be my board's intrinsic (or undetected) problems or the connection parameters did not followed the rules. (my previous question link : link text )

      #define MIN_CONN_INTERVAL MSEC_TO_UNITS(7.5, UNIT_1_25_MS) (The minimun interval has to be equal or greater than 20ms.)

Related