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

Discovering a VS UUID Characterisic, but it shows UUID as 0

Hi,

I am running SDK15, and using the example ble_app_interactive in ble_central and peripheral. I am trying to discover services and characteristic from a peripheral device, using NRF52 DK as a central device. There is a lot of services and VS services and characteristic in the peripheral. I can discover the services, and see the VS UUID services. As seen on picture:

But when i try to discover the characteristics in the VS services, it writes out the UUID as 0. I have also made it print out it handles and it does have it's handles Both things is shown in pictures below.

The UUID is 0. This is by using gatt characteristics <address> 2EAF.

If i then try to write gatt characteristics <address> AE62. I still don't get UUID, but my progam also crashes and gives me error code 11, but this is in the CCCD descriptor, as seen on picture:

I have made extra logging. I have also increased NRF_SDH_BLE_VS_UUID_COUNT in sdk_config. I have also increased my maximum characterstics and services. Hope you can help.

Regards Andreas 

Parents
  • Hi Dresse, 

    Please post a full log of your test, including the commands you type in. I don't see the part where you find the VS services I would suggest you also test first with connecting to ble_app_uart, just to test if it would work with a simple custom profile. 

  • Alright, I now have the full log. I have added some extra text to the program, so I know where it is, hope you can see past that. The first log file, show the communation between the hearingaid, and the Nordic.

     

    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2018.11.20 11:16:30 =~=~=~=~=~=~=~=~=~=~=~=
    
      advertiseballocbonded_devicesclear
      clear_devicescliconnectconnected_devices
      device_namedevicesdisconnectgatt
      historykey_replylogmpu
      numericpairparametersprivacy
      queueremove_bondresizescan
    uart_cli:~$ conn    scvan on      an onScan started
    uart_cli:~$ <info> app: Scanning
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device E2:4E:06:F7:E3:BC tkr
    Device 7D:20:E7:E5:49:8D 24:31:41:5a:1a:14
    Device 00:16:94:28:DF:13 MB 660 MS
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device E2:4E:06:F7:E3:BC tkr
    Device 7D:20:E7:E5:49:8D 24:31:41:5a:1a:14
    Device 00:16:94:28:DF:13 MB 660 MS
    Device 08:DF:1F:DB:08:A2 LE-B35C
    Device 00:16:94:28:4F:D3 MB 660 MS
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device A0:6F:AA:46:31:D1 612MANJ6A687 UW341C
    Device C8:0A:9C:09:3E:38 Tile
    Device F0:DF:FB:66:20:1F Tile
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device E2:4E:06:F7:E3:BC tkr
    Device 7D:20:E7:E5:49:8D 24:31:41:5a:1a:14
    Device 00:16:94:28:DF:13 MB 660 MS
    Device 08:DF:1F:DB:08:A2 LE-B35C
    Device 00:16:94:28:4F:D3 MB 660 MS
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device A0:6F:AA:46:31:D1 612MANJ6A687 UW341C
    Device C8:0A:9C:09:3E:38 Tile
    Device F0:DF:FB:66:20:1F Tile
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device E2:4E:06:F7:E3:BC tkr
    Device 7D:20:E7:E5:49:8D 24:31:41:5a:1a:14
    Device 00:16:94:28:DF:13 MB 660 MS
    Device 08:DF:1F:DB:08:A2 LE-B35C
    Device 00:16:94:28:4F:D3 MB 660 MS
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device A0:6F:AA:46:31:D1 612MANJ6A687 UW341C
    Device C8:0A:9C:09:3E:38 Tile
    Device F0:DF:FB:66:20:1F Tile
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device E2:4E:06:F7:E3:BC tkr
    Device 7D:20:E7:E5:49:8D 24:31:41:5a:1a:14
    Device 00:16:94:28:DF:13 MB 660 MS
    Device 08:DF:1F:DB:08:A2 LE-B35C
    Device 00:16:94:28:4F:D3 MB 660 MS
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device A0:6F:AA:46:31:D1 612MANJ6A687 UW341C
    Device C8:0A:9C:09:3E:38 Tile
    Device F0:DF:FB:66:20:1F Tile
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device E2:4E:06:F7:E3:BC tkr
    Device 7D:20:E7:E5:49:8D 24:31:41:5a:1a:14
    Device 00:16:94:28:DF:13 MB 660 MS
    Device 08:DF:1F:DB:08:A2 LE-B35C
    Device 00:16:94:28:4F:D3 MB 660 MS
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device A0:6F:AA:46:31:D1 612MANJ6A687 UW341C
    Device C8:0A:9C:09:3E:38 Tile
    Device F0:DF:FB:66:20:1F Tile
    Device 7E:E7:30:C3:9F:96 ac_hi_test_hi_ECC5
    Device 6C:E2:A9:F8:EE:29 [LG] webOS TV UJ634V
    uart_cli:~$ connect ac_hi_test_hi_ECC5uart_cli:~$ uart_cli:~$ <info> app: CENTRAL: Connecting...
    uart_cli:~$ Connected to address: uart_cli:~$ 7E uart_cli:~$ E7 uart_cli:~$ 30 uart_cli:~$ C3 uart_cli:~$ 9F uart_cli:~$ 96 uart_cli:~$ 
    uart_cli:~$ <info> app: CENTRAL: Connected, handle: 0.
    uart_cli:~$ <info> app: Data length updated to 27 bytes.
    uart_cli:~$ Current MTU: 158
    uart_cli:~$ MTU changed successfully
    uart_cli:~$ pair LESC 7E:E7:30:C3:9F:96 Start pairing
    uart_cli:~$ <info> app: PERIPHERAL: BLE_GAP_EVT_AUTH_STATUS: status=0x0 bond=0x1 lv4: 0
    uart_cli:~$ <info> peer_manager_handler: Connection secured: role: Central, conn_handle: 0, procedure: Bonding
    uart_cli:~$ gatt 
      characteristicsindicationnotificationread
      serviceswrite
    uart_cli:~$ gatt 
      characteristicsindicationnotificationread
      serviceswrite
    uart_cli:~$ gatt services 7E:E7:30:C3:9F:96 uart_cli:~$ <info> app: GATT Services
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Services count: 9
    uart_cli:~$ Found service UUIDs: 
    uart_cli:~$ UUID: 1800 type: 0x1
    uart_cli:~$ UUID: 1801 type: 0x1
    uart_cli:~$ UUID: 180A type: 0x1
    uart_cli:~$ UUID: 180F type: 0x1
    uart_cli:~$ UUID: 0 type: 0x2
    uart_cli:~$ UUID: 0 type: 0x3
    uart_cli:~$ UUID: 0 type: 0x4
    uart_cli:~$ UUID: 0 type: 0x5
    uart_cli:~$ UUID: 0 type: 0x6
    uart_cli:~$ gatt services 7E:E7:30:C3:9F:96uart_cli:~$ <info> app: GATT Services
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Services count: 9
    uart_cli:~$ Found service UUIDs: 
    uart_cli:~$ UUID: 1800 type: 0x1
    uart_cli:~$ UUID: 1801 type: 0x1
    uart_cli:~$ UUID: 180A type: 0x1
    uart_cli:~$ UUID: 180F type: 0x1
    uart_cli:~$ UUID: F4BD type: 0x2
    uart_cli:~$ UUID: F2B4 type: 0x3
    uart_cli:~$ UUID: 3049 type: 0x4
    uart_cli:~$ UUID: 2EAF type: 0x5
    uart_cli:~$ UUID: AE62 type: 0x6
    uart_cli:~$ gatt characteristics 7E:E7:30:C3:9F:96 2EAFuart_cli:~$ <info> app: Count: 7
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 5C
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 5D
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 5E
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 5F
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 60
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 61
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 62
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 63
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 64
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 65
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 66
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 67
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 68
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 69
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 0 uart_cli:~$ write_wo_resp: 1 uart_cli:~$ write: 1 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 1 uart_cli:~$ notify: 1
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Number of characteristics: 7
    uart_cli:~$ <info> app: Discovers Descriptors
    uart_cli:~$ <info> app: err_code: 0
    uart_cli:~$ <info> app: Count in descriptor: 1
    uart_cli:~$ <info> app: Count in descriptor: 0
    uart_cli:~$ No descriptors for characteristic, notifications and indications not possible
    uart_cli:~$ gatt characteristics 7E:E7:30:C3:9F:96 2EAF    AE62uart_cli:~$ <info> app: Count: 4
    <info> app: m_srv_char.char_decl.handle: 93
    <info> app: m_srv_char.char_value_handle: 94
    <info> app: m_srv_char.char_data.uuid: 0
    <info> app: m_srv_char.char_decl.handle: 95
    <info> app: m_srv_char.char_value_handle: 96
    <info> app: m_srv_char.char_data.uuid: 0
    <info> app: m_srv_char.char_decl.handle: 98
    <info> app: m_srv_char.char_value_handle: 99
    <info> app: m_srv_char.char_data.uuid: 0
    <info> app: m_srv_char.char_decl.handle: 9B
    <info> app: m_srv_char.char_value_handle: 9C
    <info> app: m_srv_char.char_data.uuid: 0
    Characteristic UUID: 0
    Parameters:
    broadcast: 0 read: 0 write_wo_resp: 1 write: 0 notify: 0
    indicate: 0 auth_signed_wr: 0
    Characteristic UUID: 0
    Parameters:
    broadcast: 0 read: 0 write_wo_resp: 0 write: 0 notify: 1
    indicate: 0 auth_signed_wr: 0
    Characteristic UUID: 0
    Parameters:
    broadcast: 0 read: 1 write_wo_resp: 1 write: 1 notify: 1
    indicate: 0 auth_signed_wr: 0
    Characteristic UUID: 0
    Parameters:
    broadcast: 0 read: 0 write_wo_resp: 1 write: 1 notify: 0
    indicate: 0 auth_signed_wr: 0
    Number of characteristics: 4
    <info> app: Discovers Descriptors
    <info> app: err_code: 0
    <info> app: Discovers Descriptors
    <info> app: err_code: 11
    <error> app: Fatal error
    <warning> app: System reset
    
    
    uart_cli:~$ BLE app with command line interface example started.
    uart_cli:~$ Press Tab to view all available commands.
    uart_cli:~$ co  connect 0uart_cli:~$ uart_cli:~$ <info> app: Scanning
    uart_cli:~$ Connected to address: uart_cli:~$ 40 uart_cli:~$ 4F uart_cli:~$ 0C uart_cli:~$ 33 uart_cli:~$ 57 uart_cli:~$ 2E uart_cli:~$ 
    uart_cli:~$ <info> app: CENTRAL: Connected, handle: 0.
    uart_cli:~$ <info> peer_manager_handler: Connection secured: role: Central, conn_handle: 0, procedure: Encryption
    uart_cli:~$ Current MTU: 158
    uart_cli:~$ MTU changed successfully
    uart_cli:~$ <info> app: Data length updated to 27 bytes.
    uart_cli:~$ gatt services 40:4F:0C:33:57:2E uart_cli:~$ <info> app: GATT Services
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Services count: 9
    uart_cli:~$ Found service UUIDs: 
    uart_cli:~$ UUID: 1800 type: 0x1
    uart_cli:~$ UUID: 1801 type: 0x1
    uart_cli:~$ UUID: 180A type: 0x1
    uart_cli:~$ UUID: 180F type: 0x1
    uart_cli:~$ UUID: 0 type: 0x2
    uart_cli:~$ UUID: 0 type: 0x3
    uart_cli:~$ UUID: 0 type: 0x4
    uart_cli:~$ UUID: 0 type: 0x5
    uart_cli:~$ UUID: 0 type: 0x6
    uart_cli:~$ gatt services 40:4F:0C:33:57:2Euart_cli:~$ <info> app: GATT Services
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Services count: 9
    uart_cli:~$ Found service UUIDs: 
    uart_cli:~$ UUID: 1800 type: 0x1
    uart_cli:~$ UUID: 1801 type: 0x1
    uart_cli:~$ UUID: 180A type: 0x1
    uart_cli:~$ UUID: 180F type: 0x1
    uart_cli:~$ UUID: F4BD type: 0x2
    uart_cli:~$ UUID: F2B4 type: 0x3
    uart_cli:~$ UUID: 3049 type: 0x4
    uart_cli:~$ UUID: 2EAF type: 0x5
    uart_cli:~$ UUID: AE62 type: 0x6
    uart_cli:~$ gatt che aracteristics 40:4F:0C:33:57:2E 180Fuart_cli:~$ <info> app: Count: 1
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 1C
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 1D
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 2A19
    uart_cli:~$ Characteristic UUID: 2A19
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 1
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Number of characteristics: 1
    uart_cli:~$ <info> app: Discovers Descriptors
    uart_cli:~$ <info> app: err_code: 0
    uart_cli:~$ <info> app: Count in descriptor: 0
    uart_cli:~$ No descriptors for characteristic, notifications and indications not possible
    uart_cli:~$ 

    I also did a test where I try to connect, to my phone, and setting up my GATT server on my phone with a custom service UUID, and custom characteristic UUID. And that worked perfectly:

    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2018.11.20 11:21:45 =~=~=~=~=~=~=~=~=~=~=~=
    
      advertiseballocbonded_devicesclear
      clear_devicescliconnectconnected_devices
      device_namedevicesdisconnectgatt
      historykey_replylogmpu
      numericpairparametersprivacy
      queueremove_bondresizescan
    uart_cli:~$ scan onScan started
    uart_cli:~$ <info> app: Scanning
    uart_cli:~$ devicesDevice 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device 74:AB:5C:BE:02:E0 Galaxy S9
    Device 00:16:94:1E:2F:51 MB 660 MS
    uart_cli:~$ connect Galaxy S9uart_cli:~$  uart_cli:~$ connect Galaxy S9uart_cli:~$  uart_cli:~$ scan onScan started
    uart_cli:~$ <info> app: Scanning
    uart_cli:~$ deivcesdeivces: command not found
    uart_cli:~$ v devicesDevice 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device 74:AB:5C:BE:02:E0 Galaxy S9
    Device 00:16:94:1E:2F:51 MB 660 MS
    Device C8:0A:9C:09:3E:38 Tile
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    uart_cli:~$ connect Galaxy S9uart_cli:~$  uart_cli:~$ connect 74:AB:5C. :BE:02:E0uart_cli:~$ uart_cli:~$ <info> app: CENTRAL: Connecting...
    uart_cli:~$ Connected to address: uart_cli:~$ 74 uart_cli:~$ AB uart_cli:~$ 5C uart_cli:~$ BE uart_cli:~$ 02 uart_cli:~$ E0 uart_cli:~$ 
    uart_cli:~$ <info> app: CENTRAL: Connected, handle: 1.
    uart_cli:~$ Current MTU: 247
    uart_cli:~$ MTU changed successfully
    uart_cli:~$ <info> app: Data length updated to 251 bytes.
    uart_cli:~$ <info> nrf_ble_lesc: Calling sd_ble_gap_lesc_dhkey_reply on conn_handle: 1
    uart_cli:~$ <info> app: PERIPHERAL: BLE_GAP_EVT_PASSKEY_DISPLAY: passkey=402446 match_req=1
    uart_cli:~$ <info> app: Type /numeric accept/ to confirm, /numeric reject/ to reject
    uart_cli:~$ Connection parameters update success
    uart_cli:~$ gatt services 
      40:4F:0C:33:57:2E74:AB:5C:BE:02:E0
    uart_cli:~$ gatt services 74:AB:5C:BE:02:E0 uart_cli:~$ <info> app: GATT Services
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Services count: 5
    uart_cli:~$ Found service UUIDs: 
    uart_cli:~$ UUID: 1801 type: 0x1
    uart_cli:~$ UUID: 1800 type: 0x1
    uart_cli:~$ UUID: 0 type: 0x7
    uart_cli:~$ UUID: 181C type: 0x1
    uart_cli:~$ UUID: 180F type: 0x1
    uart_cli:~$ <info> app: PERIPHERAL: BLE_GAP_EVT_AUTH_STATUS: status=0x1 bond=0x0 lv4: 0
    uart_cli:~$ <info> peer_manager_handler: Connection security failed: role: Central, conn_handle: 0x1, procedure: Bonding, error: 1
    uart_cli:~$ <info> app: CENTRAL: Disconnected, handle: 1, reason: 0x13
    uart_cli:~$ connect 1uart_cli:~$ uart_cli:~$ <info> app: Try again with correct peer ID.
    uart_cli:~$ bonded_devices Peers count: 1 
    ID: 0  address: 40:4F:0C:33:57:2E
    uart_cli:~$ connectr          devicesDevice 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device 74:AB:5C:BE:02:E0 Galaxy S9
    Device 00:16:94:1E:2F:51 MB 660 MS
    Device C8:0A:9C:09:3E:38 Tile
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    Device D1:43:9F:52:61:E0 tkr
    Device DB:AB:F6:1A:AE:D9 Tile
    Device 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device 00:16:94:28:DB:DD MB 660 MS
    uart_cli:~$ s clear_devices uart_cli:~$ devicesuart_cli:~$ scan ion   onScan started
    uart_cli:~$ <info> app: Scanning
    uart_cli:~$ deivce    vicesDevice 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device 63:E6:16:87:34:95 DUT-SLAVE
    uart_cli:~$ devicesDevice 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device 63:E6:16:87:34:95 DUT-SLAVE
    Device 76:96:79:E1:F2:69 Galaxy S9
    Device DB:AB:F6:1A:AE:D9 Tile
    Device 5E:55:46:9F:0C:D3 32:c8:53:30:31:30
    uart_cli:~$ connect Galaxyuart_cli:~$ uart_cli:~$ <info> app: Device not found
    uart_cli:~$ connect Galaxy      76:96:79:E1:F2:69uart_cli:~$ uart_cli:~$ <info> app: CENTRAL: Connecting...
    uart_cli:~$ Connected to address: uart_cli:~$ 76 uart_cli:~$ 96 uart_cli:~$ 79 uart_cli:~$ E1 uart_cli:~$ F2 uart_cli:~$ 69 uart_cli:~$ 
    uart_cli:~$ <info> app: CENTRAL: Connected, handle: 1.
    uart_cli:~$ Current MTU: 247
    uart_cli:~$ MTU changed successfully
    uart_cli:~$ pair LESC 
      40:4F:0C:33:57:2E76:96:79:E1:F2:69
    uart_cli:~$ pair LESC <info> app: Data length updated to 251 bytes.
    uart_cli:~$ pair LESC 76:96:79:E1:F2:69 
      mitmoob
    uart_cli:~$ pair LESC 76:96:79:E1:F2:69 Start pairing
    uart_cli:~$ <info> nrf_ble_lesc: Calling sd_ble_gap_lesc_dhkey_reply on conn_handle: 1
    uart_cli:~$ Connection parameters update success
    uart_cli:~$ <info> app: PERIPHERAL: BLE_GAP_EVT_AUTH_STATUS: status=0x0 bond=0x1 lv4: 0
    uart_cli:~$ <info> peer_manager_handler: Connection secured: role: Central, conn_handle: 1, procedure: Bonding
    uart_cli:~$ Connection parameters update success
    uart_cli:~$ gatt e services 
      40:4F:0C:33:57:2E76:96:79:E1:F2:69
    uart_cli:~$ gatt services 76:96:79:E1:F2:69 uart_cli:~$ <info> app: GATT Services
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Services count: 5
    uart_cli:~$ Found service UUIDs: 
    uart_cli:~$ UUID: 1801 type: 0x1
    uart_cli:~$ UUID: 1800 type: 0x1
    uart_cli:~$ UUID: AAA0 type: 0x7
    uart_cli:~$ UUID: 181C type: 0x1
    uart_cli:~$ UUID: 180F type: 0x1
    uart_cli:~$ gatt characteristics 
      40:4F:0C:33:57:2E76:96:79:E1:F2:69
    uart_cli:~$ gatt characteristics 76:96:79:E1:F2:69 AAA0uart_cli:~$ <info> app: Count: 2
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 29
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 2A
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: AAA1
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 2F
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 30
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: AAA2
    uart_cli:~$ Characteristic UUID: AAA1
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 1
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: AAA2
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 0 uart_cli:~$ write_wo_resp: 1 uart_cli:~$ write: 1 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 1 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Number of characteristics: 2
    uart_cli:~$ <info> app: Discovers Descriptors
    uart_cli:~$ <info> app: err_code: 0
    uart_cli:~$ <info> app: Count in descriptor: 1
    uart_cli:~$ gatt read 
      40:4F:0C:33:57:2E76:96:79:E1:F2:69
    uart_cli:~$ gatt read 76:96:79:E1:F2:69 AAA1uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ Read data:
    uart_cli:~$ 0x1E uart_cli:~$ 0x0 uart_cli:~$ 
    uart_cli:~$ 

    I think it has to do with some settings in the config file or where ever. The hearing aid have 5 custom VS UUID services and quite a few VS UUID characteristics. I have already turned up NRF_SDH_BLE_VS_UUID_COUNT, but perhaps I have to turn another setting up?

Reply
  • Alright, I now have the full log. I have added some extra text to the program, so I know where it is, hope you can see past that. The first log file, show the communation between the hearingaid, and the Nordic.

     

    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2018.11.20 11:16:30 =~=~=~=~=~=~=~=~=~=~=~=
    
      advertiseballocbonded_devicesclear
      clear_devicescliconnectconnected_devices
      device_namedevicesdisconnectgatt
      historykey_replylogmpu
      numericpairparametersprivacy
      queueremove_bondresizescan
    uart_cli:~$ conn    scvan on      an onScan started
    uart_cli:~$ <info> app: Scanning
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device E2:4E:06:F7:E3:BC tkr
    Device 7D:20:E7:E5:49:8D 24:31:41:5a:1a:14
    Device 00:16:94:28:DF:13 MB 660 MS
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device E2:4E:06:F7:E3:BC tkr
    Device 7D:20:E7:E5:49:8D 24:31:41:5a:1a:14
    Device 00:16:94:28:DF:13 MB 660 MS
    Device 08:DF:1F:DB:08:A2 LE-B35C
    Device 00:16:94:28:4F:D3 MB 660 MS
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device A0:6F:AA:46:31:D1 612MANJ6A687 UW341C
    Device C8:0A:9C:09:3E:38 Tile
    Device F0:DF:FB:66:20:1F Tile
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device E2:4E:06:F7:E3:BC tkr
    Device 7D:20:E7:E5:49:8D 24:31:41:5a:1a:14
    Device 00:16:94:28:DF:13 MB 660 MS
    Device 08:DF:1F:DB:08:A2 LE-B35C
    Device 00:16:94:28:4F:D3 MB 660 MS
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device A0:6F:AA:46:31:D1 612MANJ6A687 UW341C
    Device C8:0A:9C:09:3E:38 Tile
    Device F0:DF:FB:66:20:1F Tile
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device E2:4E:06:F7:E3:BC tkr
    Device 7D:20:E7:E5:49:8D 24:31:41:5a:1a:14
    Device 00:16:94:28:DF:13 MB 660 MS
    Device 08:DF:1F:DB:08:A2 LE-B35C
    Device 00:16:94:28:4F:D3 MB 660 MS
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device A0:6F:AA:46:31:D1 612MANJ6A687 UW341C
    Device C8:0A:9C:09:3E:38 Tile
    Device F0:DF:FB:66:20:1F Tile
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device E2:4E:06:F7:E3:BC tkr
    Device 7D:20:E7:E5:49:8D 24:31:41:5a:1a:14
    Device 00:16:94:28:DF:13 MB 660 MS
    Device 08:DF:1F:DB:08:A2 LE-B35C
    Device 00:16:94:28:4F:D3 MB 660 MS
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device A0:6F:AA:46:31:D1 612MANJ6A687 UW341C
    Device C8:0A:9C:09:3E:38 Tile
    Device F0:DF:FB:66:20:1F Tile
    uart_cli:~$ devicesDevice 00:16:94:1B:29:7A PXC 550
    Device 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device E2:4E:06:F7:E3:BC tkr
    Device 7D:20:E7:E5:49:8D 24:31:41:5a:1a:14
    Device 00:16:94:28:DF:13 MB 660 MS
    Device 08:DF:1F:DB:08:A2 LE-B35C
    Device 00:16:94:28:4F:D3 MB 660 MS
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device A0:6F:AA:46:31:D1 612MANJ6A687 UW341C
    Device C8:0A:9C:09:3E:38 Tile
    Device F0:DF:FB:66:20:1F Tile
    Device 7E:E7:30:C3:9F:96 ac_hi_test_hi_ECC5
    Device 6C:E2:A9:F8:EE:29 [LG] webOS TV UJ634V
    uart_cli:~$ connect ac_hi_test_hi_ECC5uart_cli:~$ uart_cli:~$ <info> app: CENTRAL: Connecting...
    uart_cli:~$ Connected to address: uart_cli:~$ 7E uart_cli:~$ E7 uart_cli:~$ 30 uart_cli:~$ C3 uart_cli:~$ 9F uart_cli:~$ 96 uart_cli:~$ 
    uart_cli:~$ <info> app: CENTRAL: Connected, handle: 0.
    uart_cli:~$ <info> app: Data length updated to 27 bytes.
    uart_cli:~$ Current MTU: 158
    uart_cli:~$ MTU changed successfully
    uart_cli:~$ pair LESC 7E:E7:30:C3:9F:96 Start pairing
    uart_cli:~$ <info> app: PERIPHERAL: BLE_GAP_EVT_AUTH_STATUS: status=0x0 bond=0x1 lv4: 0
    uart_cli:~$ <info> peer_manager_handler: Connection secured: role: Central, conn_handle: 0, procedure: Bonding
    uart_cli:~$ gatt 
      characteristicsindicationnotificationread
      serviceswrite
    uart_cli:~$ gatt 
      characteristicsindicationnotificationread
      serviceswrite
    uart_cli:~$ gatt services 7E:E7:30:C3:9F:96 uart_cli:~$ <info> app: GATT Services
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Services count: 9
    uart_cli:~$ Found service UUIDs: 
    uart_cli:~$ UUID: 1800 type: 0x1
    uart_cli:~$ UUID: 1801 type: 0x1
    uart_cli:~$ UUID: 180A type: 0x1
    uart_cli:~$ UUID: 180F type: 0x1
    uart_cli:~$ UUID: 0 type: 0x2
    uart_cli:~$ UUID: 0 type: 0x3
    uart_cli:~$ UUID: 0 type: 0x4
    uart_cli:~$ UUID: 0 type: 0x5
    uart_cli:~$ UUID: 0 type: 0x6
    uart_cli:~$ gatt services 7E:E7:30:C3:9F:96uart_cli:~$ <info> app: GATT Services
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Services count: 9
    uart_cli:~$ Found service UUIDs: 
    uart_cli:~$ UUID: 1800 type: 0x1
    uart_cli:~$ UUID: 1801 type: 0x1
    uart_cli:~$ UUID: 180A type: 0x1
    uart_cli:~$ UUID: 180F type: 0x1
    uart_cli:~$ UUID: F4BD type: 0x2
    uart_cli:~$ UUID: F2B4 type: 0x3
    uart_cli:~$ UUID: 3049 type: 0x4
    uart_cli:~$ UUID: 2EAF type: 0x5
    uart_cli:~$ UUID: AE62 type: 0x6
    uart_cli:~$ gatt characteristics 7E:E7:30:C3:9F:96 2EAFuart_cli:~$ <info> app: Count: 7
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 5C
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 5D
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 5E
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 5F
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 60
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 61
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 62
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 63
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 64
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 65
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 66
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 67
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 68
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 69
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 0 uart_cli:~$ write_wo_resp: 1 uart_cli:~$ write: 1 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: 0
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 1 uart_cli:~$ notify: 1
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Number of characteristics: 7
    uart_cli:~$ <info> app: Discovers Descriptors
    uart_cli:~$ <info> app: err_code: 0
    uart_cli:~$ <info> app: Count in descriptor: 1
    uart_cli:~$ <info> app: Count in descriptor: 0
    uart_cli:~$ No descriptors for characteristic, notifications and indications not possible
    uart_cli:~$ gatt characteristics 7E:E7:30:C3:9F:96 2EAF    AE62uart_cli:~$ <info> app: Count: 4
    <info> app: m_srv_char.char_decl.handle: 93
    <info> app: m_srv_char.char_value_handle: 94
    <info> app: m_srv_char.char_data.uuid: 0
    <info> app: m_srv_char.char_decl.handle: 95
    <info> app: m_srv_char.char_value_handle: 96
    <info> app: m_srv_char.char_data.uuid: 0
    <info> app: m_srv_char.char_decl.handle: 98
    <info> app: m_srv_char.char_value_handle: 99
    <info> app: m_srv_char.char_data.uuid: 0
    <info> app: m_srv_char.char_decl.handle: 9B
    <info> app: m_srv_char.char_value_handle: 9C
    <info> app: m_srv_char.char_data.uuid: 0
    Characteristic UUID: 0
    Parameters:
    broadcast: 0 read: 0 write_wo_resp: 1 write: 0 notify: 0
    indicate: 0 auth_signed_wr: 0
    Characteristic UUID: 0
    Parameters:
    broadcast: 0 read: 0 write_wo_resp: 0 write: 0 notify: 1
    indicate: 0 auth_signed_wr: 0
    Characteristic UUID: 0
    Parameters:
    broadcast: 0 read: 1 write_wo_resp: 1 write: 1 notify: 1
    indicate: 0 auth_signed_wr: 0
    Characteristic UUID: 0
    Parameters:
    broadcast: 0 read: 0 write_wo_resp: 1 write: 1 notify: 0
    indicate: 0 auth_signed_wr: 0
    Number of characteristics: 4
    <info> app: Discovers Descriptors
    <info> app: err_code: 0
    <info> app: Discovers Descriptors
    <info> app: err_code: 11
    <error> app: Fatal error
    <warning> app: System reset
    
    
    uart_cli:~$ BLE app with command line interface example started.
    uart_cli:~$ Press Tab to view all available commands.
    uart_cli:~$ co  connect 0uart_cli:~$ uart_cli:~$ <info> app: Scanning
    uart_cli:~$ Connected to address: uart_cli:~$ 40 uart_cli:~$ 4F uart_cli:~$ 0C uart_cli:~$ 33 uart_cli:~$ 57 uart_cli:~$ 2E uart_cli:~$ 
    uart_cli:~$ <info> app: CENTRAL: Connected, handle: 0.
    uart_cli:~$ <info> peer_manager_handler: Connection secured: role: Central, conn_handle: 0, procedure: Encryption
    uart_cli:~$ Current MTU: 158
    uart_cli:~$ MTU changed successfully
    uart_cli:~$ <info> app: Data length updated to 27 bytes.
    uart_cli:~$ gatt services 40:4F:0C:33:57:2E uart_cli:~$ <info> app: GATT Services
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Services count: 9
    uart_cli:~$ Found service UUIDs: 
    uart_cli:~$ UUID: 1800 type: 0x1
    uart_cli:~$ UUID: 1801 type: 0x1
    uart_cli:~$ UUID: 180A type: 0x1
    uart_cli:~$ UUID: 180F type: 0x1
    uart_cli:~$ UUID: 0 type: 0x2
    uart_cli:~$ UUID: 0 type: 0x3
    uart_cli:~$ UUID: 0 type: 0x4
    uart_cli:~$ UUID: 0 type: 0x5
    uart_cli:~$ UUID: 0 type: 0x6
    uart_cli:~$ gatt services 40:4F:0C:33:57:2Euart_cli:~$ <info> app: GATT Services
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Services count: 9
    uart_cli:~$ Found service UUIDs: 
    uart_cli:~$ UUID: 1800 type: 0x1
    uart_cli:~$ UUID: 1801 type: 0x1
    uart_cli:~$ UUID: 180A type: 0x1
    uart_cli:~$ UUID: 180F type: 0x1
    uart_cli:~$ UUID: F4BD type: 0x2
    uart_cli:~$ UUID: F2B4 type: 0x3
    uart_cli:~$ UUID: 3049 type: 0x4
    uart_cli:~$ UUID: 2EAF type: 0x5
    uart_cli:~$ UUID: AE62 type: 0x6
    uart_cli:~$ gatt che aracteristics 40:4F:0C:33:57:2E 180Fuart_cli:~$ <info> app: Count: 1
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 1C
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 1D
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: 2A19
    uart_cli:~$ Characteristic UUID: 2A19
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 1
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Number of characteristics: 1
    uart_cli:~$ <info> app: Discovers Descriptors
    uart_cli:~$ <info> app: err_code: 0
    uart_cli:~$ <info> app: Count in descriptor: 0
    uart_cli:~$ No descriptors for characteristic, notifications and indications not possible
    uart_cli:~$ 

    I also did a test where I try to connect, to my phone, and setting up my GATT server on my phone with a custom service UUID, and custom characteristic UUID. And that worked perfectly:

    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2018.11.20 11:21:45 =~=~=~=~=~=~=~=~=~=~=~=
    
      advertiseballocbonded_devicesclear
      clear_devicescliconnectconnected_devices
      device_namedevicesdisconnectgatt
      historykey_replylogmpu
      numericpairparametersprivacy
      queueremove_bondresizescan
    uart_cli:~$ scan onScan started
    uart_cli:~$ <info> app: Scanning
    uart_cli:~$ devicesDevice 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device 74:AB:5C:BE:02:E0 Galaxy S9
    Device 00:16:94:1E:2F:51 MB 660 MS
    uart_cli:~$ connect Galaxy S9uart_cli:~$  uart_cli:~$ connect Galaxy S9uart_cli:~$  uart_cli:~$ scan onScan started
    uart_cli:~$ <info> app: Scanning
    uart_cli:~$ deivcesdeivces: command not found
    uart_cli:~$ v devicesDevice 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device 74:AB:5C:BE:02:E0 Galaxy S9
    Device 00:16:94:1E:2F:51 MB 660 MS
    Device C8:0A:9C:09:3E:38 Tile
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    uart_cli:~$ connect Galaxy S9uart_cli:~$  uart_cli:~$ connect 74:AB:5C. :BE:02:E0uart_cli:~$ uart_cli:~$ <info> app: CENTRAL: Connecting...
    uart_cli:~$ Connected to address: uart_cli:~$ 74 uart_cli:~$ AB uart_cli:~$ 5C uart_cli:~$ BE uart_cli:~$ 02 uart_cli:~$ E0 uart_cli:~$ 
    uart_cli:~$ <info> app: CENTRAL: Connected, handle: 1.
    uart_cli:~$ Current MTU: 247
    uart_cli:~$ MTU changed successfully
    uart_cli:~$ <info> app: Data length updated to 251 bytes.
    uart_cli:~$ <info> nrf_ble_lesc: Calling sd_ble_gap_lesc_dhkey_reply on conn_handle: 1
    uart_cli:~$ <info> app: PERIPHERAL: BLE_GAP_EVT_PASSKEY_DISPLAY: passkey=402446 match_req=1
    uart_cli:~$ <info> app: Type /numeric accept/ to confirm, /numeric reject/ to reject
    uart_cli:~$ Connection parameters update success
    uart_cli:~$ gatt services 
      40:4F:0C:33:57:2E74:AB:5C:BE:02:E0
    uart_cli:~$ gatt services 74:AB:5C:BE:02:E0 uart_cli:~$ <info> app: GATT Services
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ <info> app: Services count: 5
    uart_cli:~$ Found service UUIDs: 
    uart_cli:~$ UUID: 1801 type: 0x1
    uart_cli:~$ UUID: 1800 type: 0x1
    uart_cli:~$ UUID: 0 type: 0x7
    uart_cli:~$ UUID: 181C type: 0x1
    uart_cli:~$ UUID: 180F type: 0x1
    uart_cli:~$ <info> app: PERIPHERAL: BLE_GAP_EVT_AUTH_STATUS: status=0x1 bond=0x0 lv4: 0
    uart_cli:~$ <info> peer_manager_handler: Connection security failed: role: Central, conn_handle: 0x1, procedure: Bonding, error: 1
    uart_cli:~$ <info> app: CENTRAL: Disconnected, handle: 1, reason: 0x13
    uart_cli:~$ connect 1uart_cli:~$ uart_cli:~$ <info> app: Try again with correct peer ID.
    uart_cli:~$ bonded_devices Peers count: 1 
    ID: 0  address: 40:4F:0C:33:57:2E
    uart_cli:~$ connectr          devicesDevice 70:21:3B:A6:4F:D4 32:c8:53:30:31:30
    Device 74:AB:5C:BE:02:E0 Galaxy S9
    Device 00:16:94:1E:2F:51 MB 660 MS
    Device C8:0A:9C:09:3E:38 Tile
    Device 58:0E:A3:72:C2:D5 DUT-SLAVE
    Device 6A:99:24:40:D5:B1 DUT-SLAVE
    Device D1:43:9F:52:61:E0 tkr
    Device DB:AB:F6:1A:AE:D9 Tile
    Device 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device 00:16:94:28:DB:DD MB 660 MS
    uart_cli:~$ s clear_devices uart_cli:~$ devicesuart_cli:~$ scan ion   onScan started
    uart_cli:~$ <info> app: Scanning
    uart_cli:~$ deivce    vicesDevice 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device 63:E6:16:87:34:95 DUT-SLAVE
    uart_cli:~$ devicesDevice 47:2E:8C:88:AC:44 [LG] webOS TV UJ630V
    Device 63:E6:16:87:34:95 DUT-SLAVE
    Device 76:96:79:E1:F2:69 Galaxy S9
    Device DB:AB:F6:1A:AE:D9 Tile
    Device 5E:55:46:9F:0C:D3 32:c8:53:30:31:30
    uart_cli:~$ connect Galaxyuart_cli:~$ uart_cli:~$ <info> app: Device not found
    uart_cli:~$ connect Galaxy      76:96:79:E1:F2:69uart_cli:~$ uart_cli:~$ <info> app: CENTRAL: Connecting...
    uart_cli:~$ Connected to address: uart_cli:~$ 76 uart_cli:~$ 96 uart_cli:~$ 79 uart_cli:~$ E1 uart_cli:~$ F2 uart_cli:~$ 69 uart_cli:~$ 
    uart_cli:~$ <info> app: CENTRAL: Connected, handle: 1.
    uart_cli:~$ Current MTU: 247
    uart_cli:~$ MTU changed successfully
    uart_cli:~$ pair LESC 
      40:4F:0C:33:57:2E76:96:79:E1:F2:69
    uart_cli:~$ pair LESC <info> app: Data length updated to 251 bytes.
    uart_cli:~$ pair LESC 76:96:79:E1:F2:69 
      mitmoob
    uart_cli:~$ pair LESC 76:96:79:E1:F2:69 Start pairing
    uart_cli:~$ <info> nrf_ble_lesc: Calling sd_ble_gap_lesc_dhkey_reply on conn_handle: 1
    uart_cli:~$ Connection parameters update success
    uart_cli:~$ <info> app: PERIPHERAL: BLE_GAP_EVT_AUTH_STATUS: status=0x0 bond=0x1 lv4: 0
    uart_cli:~$ <info> peer_manager_handler: Connection secured: role: Central, conn_handle: 1, procedure: Bonding
    uart_cli:~$ Connection parameters update success
    uart_cli:~$ gatt e services 
      40:4F:0C:33:57:2E76:96:79:E1:F2:69
    uart_cli:~$ gatt services 76:96:79:E1:F2:69 uart_cli:~$ <info> app: GATT Services
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Saving all Service DATA
    uart_cli:~$ <info> app: Services count: 5
    uart_cli:~$ Found service UUIDs: 
    uart_cli:~$ UUID: 1801 type: 0x1
    uart_cli:~$ UUID: 1800 type: 0x1
    uart_cli:~$ UUID: AAA0 type: 0x7
    uart_cli:~$ UUID: 181C type: 0x1
    uart_cli:~$ UUID: 180F type: 0x1
    uart_cli:~$ gatt characteristics 
      40:4F:0C:33:57:2E76:96:79:E1:F2:69
    uart_cli:~$ gatt characteristics 76:96:79:E1:F2:69 AAA0uart_cli:~$ <info> app: Count: 2
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 29
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 2A
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: AAA1
    uart_cli:~$ <info> app: m_srv_char.char_decl.handle: 2F
    uart_cli:~$ <info> app: m_srv_char.char_value_handle: 30
    uart_cli:~$ <info> app: m_srv_char.char_data.uuid: AAA2
    uart_cli:~$ Characteristic UUID: AAA1
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 1 uart_cli:~$ write_wo_resp: 0 uart_cli:~$ write: 0 uart_cli:~$ notify: 1
    uart_cli:~$ indicate: 0 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Characteristic UUID: AAA2
    uart_cli:~$ Parameters:
    uart_cli:~$ broadcast: 0 uart_cli:~$ read: 0 uart_cli:~$ write_wo_resp: 1 uart_cli:~$ write: 1 uart_cli:~$ notify: 0
    uart_cli:~$ indicate: 1 uart_cli:~$ auth_signed_wr: 0
    uart_cli:~$ Number of characteristics: 2
    uart_cli:~$ <info> app: Discovers Descriptors
    uart_cli:~$ <info> app: err_code: 0
    uart_cli:~$ <info> app: Count in descriptor: 1
    uart_cli:~$ gatt read 
      40:4F:0C:33:57:2E76:96:79:E1:F2:69
    uart_cli:~$ gatt read 76:96:79:E1:F2:69 AAA1uart_cli:~$ <info> app: Enters VS UUID Discovery
    uart_cli:~$ Read data:
    uart_cli:~$ 0x1E uart_cli:~$ 0x0 uart_cli:~$ 
    uart_cli:~$ 

    I think it has to do with some settings in the config file or where ever. The hearing aid have 5 custom VS UUID services and quite a few VS UUID characteristics. I have already turned up NRF_SDH_BLE_VS_UUID_COUNT, but perhaps I have to turn another setting up?

Children
  • And another thing, if I connect to the hearingaid using my phone, and using nrf connect, I get all services and characteristics, so the hearingaids works just fine.

  • Thanks Dresse,  I have reproduced the issue here with the ble_app_uart. Seems like we have an issue if it's not the 16 bit Bluetooth UUID. I will investigate a little bit more and get back to you.

  • Hi Dresse, 

    I found that in the code, when we find an 128 bit UUID we only assign the value of the 128 bit UUID base into the UUID database, without assigning the 16 bit short UUID of that service to the service uuid. So that why they were all 0. So if you add this line of code

                    mp_device_srv[conn_handle]->services[i].uuid.uuid = (uuid.uuid128[13]<<8)+uuid.uuid128[12];

    after  

    err_code = sd_ble_uuid_vs_add(&uuid, &mp_device_srv[conn_handle]->services[i].uuid.type);
    APP_ERROR_CHECK(err_code);

    inside on_read_rsp() in ble_m.c , then you should be able to see the UUID on the first time when you do service discovery. 

    In addition , in characteristic discovery we won't take in to account that the characteristic may have different base UUID, we assume that the characteristic would have same base uuid as the service. 

    Could you update the code, and also let me know what the problem you currently have ?  I would suggest you to test with the ble_app_uart first before you test with your device. 

  • So, I don't quite understand what you mean about base uuid. I have attached one of the custom uuid, that is in the hearing aid.

     

    I still have my problem of not being able to see the custom characteristics inside the custom service, well I can see it, but I can't see the specific uuid for it. But if I understand what you said correctly, because my custom characteristics, does not have the same base uuid as the service, it can't see it?

    And you are suggesting me to test with ble_app_uart, but do you mean ble_app_uart_c? Because my nrf52 dk is acting as a central and connecting with a peripheral.

  • Hi Dresse, 

    Yes you can test with the ble_app_uart. The GAP role is a little bit different but the service discovery from the GATT client is the same. 
    We have the base UUID which is the 128 bit UUID and the short 16 bit UUID which is byte 12 and 13 inside the 128 bit UUID. This is explained in the description of sd_ble_uuid_vs_add() 

    You can use nRF Connect on the phone and do service discovery for the ble_app_uart you can see how the service and characteristic share the same base UUID and only byte 12 and 13 are different. 

    In your att table, I can see that all characteristics and service have different base UUID. 

    In this case you would need to modify the ble_m.c library to support UUID read on the characteristic discovery, the same way as we have in the service discovery. Please have a look at  on_primary_srv_discovery_rsp() and on_read_rsp() function, where we do a sd_ble_gattc_read() on each service that has the uuid.type == BLE_UUID_TYPE_UNKNOWN

    You would need to add the code to do the same when doing characteristic discovery. 

    I'm a little bit busy at the moment, if I managed to have time I can try to implement but I would suggest you to try first. 

Related