nRF52840 Central cannot discover one of the my nRF52840 Peripheral services

I have a problem that my nRF52840 Central cannot discover one of the my nRF52840 Peripheral sensor services. With the phone I have no problem. Also other services are detected. I tried to go to v2.0.2 nsc but no improvement. I call the discovery service with NULL to get all of the services. The service not discovery is just the NUS service with different UUIDs.

err = bt_gatt_dm_start(vaporbt_conn, NULL ,&discovery_cb,NULL);
I increased the centrals number of attributes detected from 45 to 60 and even 70.
CONFIG_BT_GATT_DM_MAX_ATTRS=100
I called the discovery service with the exact UUID of the service not
  err = bt_gatt_dm_start(vaporbt_conn, BT_UUID_AMI_TRANSFER_SERVICE ,&discovery_cb,NULL);
00> D: NULL attribute
00> D: Discover complete. No service found.
00> D: Attr memory release
00> 08/09/2022 06:01:14[ami_ble.c: 891] ***ServiceNotFound                

I can connect to the sensor discovery its services and characteristics (except for transfer service) and then read some fields as shown in the RTT log below:
(Connection lost)
00> SEGGER J-Link V7.66a - Real time terminal output
00> J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 20 2022 16:43:31 V1.0, SN=683189295
00> Process: JLinkGDBServerCL.exe
00> [ami_main.c: 196] NewMin
00> 08/09/2022 15:19:27[ami_main.c: 217] D8:7D:E7:7D:25:47 rssi:0 flags:0 temp:0 x:0 y:0 z:0
00> 08/09/2022 15:19:27[ami_main.c: 217] D1:0F:DE:05:ED:44 rssi:-64 flags:2 temp:23 x:1338 y:1221 z:1262
00> *** Booting Zephyr OS build v3.0.99-ncs1-1  ***
00> I: SoftDevice Controller build revision: 
00> I: 33 78 2a 18 20 f5 61 61 |3x*. .aa
00> I: a6 8b 77 60 62 83 39 2a |..w`b.9*
00> I: 7c f1 14 e4             ||...    
00> I: HW Platform: Nordic Semiconductor (0x0002)
00> I: HW Variant: nRF52x (0x0002)
00> I: Firmware: Standard Bluetooth controller (0x00) Version 51.10872 Build 1643454488
00> I: Identity: F2:4A:1B:49:90:48 (random)
00> I: HCI: version 5.3 (0x0c) revision 0x1136, ma01/01/2004 00:00:00[ami_alfa.c: 154] AlertMsg:a Op:30 Len:16
00> nufacturer 0x0059
00> I: LMP: version 5.3 (0x0c) subver 0x1136
00> [ami_main.c: 377] GatewayStartup
00> 01/01/2004 00:00:00[ami_local_pc.c: 141] Rx Op:L Len:70
00> 01/01/2004 00:00:00[ami_alfa.c:  89] MsgReply:a Len:6
00> 01/01/2004 00:00:00[ami_ble.c:1501] BLEThread
00> 01/01/2004 00:00:00[ami_ble.c:1360] Scan AlreadyStopped
00> 01/01/2004 00:00:00[ami_ble.c:1539] ret:0 atomic_ev:1 index:0
00> 01/01/2004 00:00:00[ami_ble.c: 276] ActualTxPwr:0
00> [ami_ble.c:1604] 2 VibeBTsNormalScan
00> 08/09/2022 15:19:34[ami_local_pc.c: 141] Rx Op:S Len:5
00> 08/09/08/09/2022 15:19:52[ami_local_pc.c: 141] Rx Op:R Len:35
00> [ami_local_pc.c: 331] M:0x1FF9 S:0x0
00> 08/09/2022 15:19:52[ami_alfa.c:  89] MsgReply:a Len:6
00> 08/09/2022 15:19:52[ami_ble.c:1539] ret:0 atomic_ev:8 index:3
00> 08/09/2022 15:19:52[ami_ble.c:1365] Scanning successfully stopped.
00> [ami_ble.c:1716] StartScanConnect:1
00> 08/09/2022 15:19:53[ami_ble.c: 927] Connected: D1:0F:DE:05:ED:44 (random)
00> 08/09/2022 15:19:53[ami_ble.c: 936] MTU exchange pending
00> 08/09/2022 15:19:53[ami_ble.c:1539] ret:0 atomic_ev:32 index:5
00> [ami_ble.c:1761] Main|DFU DiscoveryStarted
00> E: reason 0x3
00> 08/09/2022 15:19:53[ami_ble.c: 972] Security failed: D1:0F:DE:05:ED:44 (random) level 1 err 4
00> 08/09/2022 15:19:53[ami_ble.c: 904] MTU exchange successful
00> 08/09/2022 15:19:53[ami_ble.c: 905] Current MTU: 252
00> D: Attr: handle 1
00> D: Attr store, pos: 0, handle: 1
00> D: Service detected, handles range: <2, 8>
00> D: Starting descriptors discovery
00> D: Attr: handle 2
00> D: Attr store, pos: 1, handle: 2
00> D: Attr: handle 3
00> D: Attr store, pos: 2, handle: 3
00> D: Attr: handle 4
00> D: Attr store, pos: 3, handle: 4
00> D: Attr: handle 5
00> D: Attr store, pos: 4, handle: 5
00> D: Attr: handle 6
00> D: Attr store, pos: 5, handle: 6
00> D: Attr: handle 7
00> D: Attr store, pos: 6, handle: 7
00> D: Attr: handle 8
00> D: Attr store, pos: 7, handle: 8
00> D: NULL attribute
00> D: Starting characteristic discovery
00> D: Attr: handle 2
00> D: Attr: handle 5
00> D: Attr: handle 7
00> D: NULL attribute
00> D: Discovery complete.
00> ATT[1]:   UUID: 0x2803  Handle: 0x0002  Value:
00>   Characteristic: 0x2a05  Properties: 0x0020
00> ATT[2]:   UUID: 0x2a05  Handle: 0x0003  Value:
00> ATT[3]:   UUID: 0x2902  Handle: 0x0004  Value:
00>   CCCD
00> ATT[4]:   UUID: 0x2803  Handle: 0x0005  Value:
00>   Characteristic: 0x2b29  Properties: 0x000A
00> ATT[5]:   UUID: 0x2b29  Handle: 0x0006  Value:
00> ATT[6]:   UUID: 0x2803  Handle: 0x0007  Value:
00>   Characteristic: 0x2b2a  Properties: 0x0002
00> ATT[7]:   UUID: 0x2b2a  Handle: 0x0008  Value:
00> D: Attr memory release
00> D: Attr: handle 9
00> D: Attr store, pos: 0, handle: 9
00> D: Service detected, handles range: <10, 15>
00> D: Starting descriptors discovery
00> D: Attr: handle 10
00> D: Attr store, pos: 1, handle: 10
00> D: Attr: handle 11
00> D: Attr store, pos: 2, handle: 11
00> D: Attr: handle 12
00> D: Attr store, pos: 3, handle: 12
00> D: Attr: handle 13
00> D: Attr store, pos: 4, handle: 13
00> D: Attr: handle 14
00> D: Attr store, pos: 5, handle: 14
00> D: Attr: handle 15
00> D: Attr store, pos: 6, handle: 15
00> D: NULL attribute
00> D: Starting characteristic discovery
00> D: Attr: handle 10
00> D: Attr: handle 12
00> D: Attr: handle 14
00> D: NULL attribute
00> D: Discovery complete.
00> ATT[1]:   UUID: 0x2803  Handle: 0x000A  Value:
00>   Characteristic: 0x2a00  Properties: 0x000A
00> ATT[2]:   UUID: 0x2a00  Handle: 0x000B  Value:
00> ATT[3]:   UUID: 0x2803  Handle: 0x000C  Value:
00>   Characteristic: 0x2a01  Properties: 0x0002
00> ATT[4]:   UUID: 0x2a01  Handle: 0x000D  Value:
00> ATT[5]:   UUID: 0x2803  Handle: 0x000E  Value:
00>   Characteristic: 0x2a04  Properties: 0x0002
00> ATT[6]:   UUID: 0x2a04  Handle: 0x000F  Value:
00> D: Attr memory release
00> D: Attr: handle 16
00> D: Attr store, pos: 0, handle: 16
00> D: Service detected, handles range: <17, 46>
00> D: Starting descriptors discovery
00> D: Attr: handle 17
00> D: Attr store, pos: 1, handle: 17
00> D: Attr: handle 18
00> D: Attr store, pos: 2, handle: 18
00> D: Attr: handle 19
00> D: Attr store, pos: 3, handle: 19
00> D: Attr: handle 20
00> D: Attr store, pos: 4, handle: 20
00> D: Attr: handle 21
00> D: Attr store, pos: 5, handle: 21
00> D: Attr: handle 22
00> D: Attr store, pos: 6, handle: 22
00> D: Attr: handle 23
00> D: Attr store, pos: 7, handle: 23
00> D: Attr: handle 24
00> D: Attr store, pos: 8, handle: 24
00> D: Attr: handle 25
00> D: Attr store, pos: 9, handle: 25
00> D: Attr: handle 26
00> D: Attr store, pos: 10, handle: 26
00> D: Attr: handle 27
00> D: Attr store, pos: 11, handle: 27
00> D: Attr: handle 28
00> D: Attr store, pos: 12, handle: 28
00> D: Attr: handle 29
00> D: Attr store, pos: 13, handle: 29
00> D: Attr: handle 30
00> D: Attr store, pos: 14, handle: 30
00> D: Attr: handle 31
00> D: Attr store, pos: 15, handle: 31
00> D: Attr: handle 32
00> D: Attr store, pos: 16, handle: 32
00> D: Attr: handle 33
00> D: Attr store, pos: 17, handle: 33
00> D: Attr: handle 34
00> D: Attr store, pos: 18, handle: 34
00> D: Attr: handle 35
00> D: Attr store, pos: 19, handle: 35
00> D: Attr: handle 36
00> D: Attr store, pos: 20, handle: 36
00> D: Attr: handle 37
00> D: Attr store, pos: 21, handle: 37
00> D: Attr: handle 38
00> D: Attr store, pos: 22, handle: 38
00> D: Attr: handle 39
00> D: Attr store, pos: 23, handle: 39
00> D: Attr: handle 40
00> D: Attr store, pos: 24, handle: 40
00> D: Attr: handle 41
00> D: Attr store, pos: 25, handle: 41
00> D: Attr: handle 42
00> D: Attr store, pos: 26, handle: 42
00> D: Attr: handle 43
00> D: Attr store, pos: 27, handle: 43
00> D: Attr: handle 44
00> D: Attr store, pos: 28, handle: 44
00> D: Attr: handle 45
00> D: Attr store, pos: 29, handle: 45
00> D: Attr: handle 46
00> D: Attr store, pos: 30, handle: 46
00> D: NULL attribute
00> D: Starting characteristic discovery
00> D: Attr: handle 17
00> D: Attr: handle 19
00> D: Attr: handle 21
00> D: Attr: handle 23
00> D: Attr: handle 25
00> D: Attr: handle 27
00> D: Attr: handle 29
00> D: Attr: handle 31
00> D: Attr: handle 33
00> D: Attr: handle 35
00> D: Attr: handle 37
00> D: Attr: handle 39
00> D: Attr: handle 41
00> D: Attr: handle 43
00> D: Attr: handle 45
00> D: NULL attribute
00> D: Discovery complete.
00> ATT[1]:   UUID: 0x2803  Handle: 0x0011  Value:
00>   Characteristic: 0x05af0002-cfc7-4be7-b4ac-4341bcf254c7  Properties: 0x000A
00> ATT[2]:   UUID: 0x05af0002-cfc7-4be7-b4ac-4341bcf254c7  Handle: 0x0012  Value:
00> ATT[3]:   UUID: 0x2803  Handle: 0x0013  Value:
00>   Characteristic: 0x05af0003-cfc7-4be7-b4ac-4341bcf254c7  Properties: 0x001A
00> ATT[4]:   UUID: 0x05af0003-cfc7-4be7-b4ac-4341bcf254c7  Handle: 0x0014  Value:
00> ATT[5]:   UUID: 0x2803  Handle: 0x0015  Value:
00>   Characteristic: 0x05af0004-cfc7-4be7-b4ac-4341bcf254c7  Properties: 0x001A
00> ATT[6]:   UUID: 0x05af0004-cfc7-4be7-b4ac-4341bcf254c7  Handle: 0x0016  Value:
00> ATT[7]:   UUID: 0x2803  Handle: 0x0017  Value:
00>   Characteristic: 0x05af0005-cfc7-4be7-b4ac-4341bcf254c7  Properties: 0x000A
00> ATT[8]:   UUID: 0x05af0005-cfc7-4be7-b4ac-4341bcf254c7  Handle: 0x0018  Value:
00> ATT[9]:   UUID: 0x2803  Handle: 0x0019  Value:
00>   Characteristic: 0x05af0006-cfc7-4be7-b4ac-4341bcf254c7  Properties: 0x000A
00> ATT[10]:   UUID: 0x05af0006-cfc7-4be7-b4ac-4341bcf254c7  Handle: 0x001A  Value:
00> ATT[11  Characteristic: 0x05af0007-cfc7-4be7-b4ac-4341bcf254c7  Properties: 0x0002
00> ATT[12]:   UUID: 0x05af0007-cfc7-4be7-b4ac-4341bcf254c7  Handle: 0x001C  Value:
00> ATT[13]:   UUID: 0x2803  Handle: 0x001D  Value:
00>   Characteristic: 0x05af0008-cfc7-4be7-b4ac-4341bcf254c7  Properties: 0x0002
00> ATT[14]:D: Attr: handle 47
00> D: Attr store, pos: 0, handle: 47
00> D: Service detected, handles range: <48, 67>
00> D: Starting descriptors discovery
00> D: Attr: handle 48
00> D: Attr store, pos: 1, handle: 48
00> D: Attr: handle 49
00> D: Attr store, pos: 2, handle: 49
00> D: Attr: handle 50
00> D: Attr store, pos: 3, handle: 50
00> D: Attr: handle 51
00> D: Attr store, pos: 4, handle: 51
00> D: Attr: handle 52
00> D: Attr store, pos: 5, handle: 52
00> D: Attr: handle 53
00> D: Attr store, pos: 6, handle: 53
00> D: Attr: handle 54
00> D: Attr store, pos: 7, handle: 54
00> D: Attr: handle 55
00> D: Attr store, pos: 8, handle: 55
00> D: Attr: handle 56
00> D: Attr store, pos: 9, handle: 56
00> D: Attr: handle 57
00> D: Attr store, pos: 10, handle: 57
00> D: Attr: handle 58
00> D: Attr store, pos: 11, handle: 58
00> D: Attr: handle 59
00> D: Attr store, pos: 12, handle: 59
00> D: Attr: handle 60
00> D: Attr store, pos: 13, handle: 60
00> D: Attr: handle 61
00> D: Attr store, pos: 14, handle: 61
00> D: Attr: handle 62
00> D: Attr store, pos: 15, handle: 62
00> D: Attr: handle 63
00> D: Attr store, pos: 16, handle: 63
00> D: Attr: handle 64
00> D: Attr store, pos: 17, handle: 64
00> D: Attr: handle 65
00> D: Attr store, pos: 18, handle: 65
00> D: Attr: handle 66
00> D: Attr store, pos: 19, handle: 66
00> D: Attr: handle 67
00> D: Attr store, pos: 20, handle: 67
00> D: NULL attribute
00> D: Starting characteristic discovery
00> D: Attr: handle 48
00> D: Attr: handle 50
00> D: Attr: handle 52
00> D: Attr: handle 54
00> D: Attr: handle 56
00> D: Attr: handle 58
00> D: Attr: handle 60
00> D: Attr: handle 62
00> D: Attr: handle 64
00> D: Attr: handle 66
00> D: NULL attribute
00> D: Discovery complete.
00> ATT[1]:   UUID: 0x2803  Handle: 0x0030  Value:
00>   Characteristic: 0x05af0101-cfc7-4be7-b4ac-4341bcf254c7  Properties: 0x000A
00> ATT[2]:   UUID: 0x05af0101-cfc7-4be7-b4ac-4341bcf254c7  Handle: 0x0031  Value:
00> ATT[3]:   UUID: 0x2803  Handle: 0x0032  Value:
00>   Characteristic: 0x05af0102-cfc7-4be7-b4ac-4341bcf254c7  Properties: 0x000A
00> ATT[4]:   UUID: 0x05af0102-cfc7-4be7-b4ac-4341bcf254c7  Handle: 0x0033  Value:
00> ATT[5]:   UUID: 0x2803  Handle: 0x0034  Value:
00>   Characteristic: 0x05af0103-cfc7-4be7-b4ac-4341bcf254c7  Properties: 0x000A
00> ATT[6]:   UUID: 0x05af0103-cfc7-4be7-b4ac-4341bcf254c7  Handle: 0x0035  Value:
00> ATT[7]:   UUID: 0x2803  Handle: 0x0036  Value:
00>   Characteristic: 0x05af0104-cfc7-4be7-b4ac-4341bcf254c7  Properties: 0x000A
00> ATT[8]:   UUID: 0x05af0104-cfc7-4be7-b4ac-4341bcf254c7  Handle: 0x0037  Value:
00> ATT[9]:   UUID: 0x2803  Handle: 0x0038  Value:
00>   Characteristic: 0x05af0105-cfc7-4be7-b4ac-4341bcf254c7  Properties: 0x000A
00> ATT[10]:   UUID: 0x05af0105-cfc7-4be7-b4ac-4341bcf254c7  Handle: 0x0039  Value:
00> ATT[11]:   UUID: 0x2803  Handle: 0x003A  Value:
00>   Characteristic: 0x05af0106-cfc7-4be7-b4ac-4341bcf254c7  Properties: 0x000A
00> ATT[12]:   UUID: 0[ami_main_serv.c: 228] RdMainChr:0 Len:8
00> [ami_main_serv.c: 311] RdMainChr:0 Val:E451EF3368C39187
00> [ami_ble.c: 554] RdMainCharacteristic:3 H:24
00> [ami_main_serv.c: 228] RdMainChr:3 Len:2
00> [ami_main_serv.c: 315] RdMainChr:3 Val:0
00> [ami_ble.c: 554] RdMainCharacteristic:4 H:26
00> [ami_main_serv.c: 228] RdMainChr:4 Len:4
00> [ami_main_serv.c: 315] RdMainChr:4 Val:6553858
00> [ami_ble.c: 554] RdMainCharacteristic:5 H:28
00> [ami_main_serv.c: 228] RdMainChr:5 Len:2
00> [ami_main_serv.c: 315] RdMainChr:5 Val:618
00> [ami_ble.c: 554] RdMainCharacteristic:6 H:30
00> [ami_main_serv.c: 228] RdMainChr:6 Len:4
00> [ami_main_serv.c: 315] RdMainChr:6 Val:1102724465
00> [ami_ble.c: 554] RdMainCharacteristic:7 H:32
00> [ami_main_serv.c: 228] RdMainChr:7 Len:4
00> [ami_main_serv.c: 315] RdMainChr:7 Val:1573
00> [ami_ble.c: 554] RdMainCharacteristic:8 H:34
00> [ami_main_serv.c: 228] RdMainChr:8 Len:2
00> [ami_main_serv.c: 315] RdMainChr:8 Val:1338
00> [ami_ble.c: 554] RdMainCharacteristic:9 H:36
00> [ami_main_serv.c: 228] RdMainChr:9 Len:2
00> [ami_main_serv.c: 315] RdMainChr:9 Val:1221
00> [ami_ble.c: 554] RdMainCharacteristic:10 H:38
00> [ami_main_serv.c: 228] RdMainChr:10 Len:2
00> [ami_main_serv.c: 315] RdMainChr:10 Val:1262
00> [ami_ble.c: 554] RdMainCharacteristic:11 H:40
00> [ami_main_serv.c: 228] RdMainChr:11 Len:4
00> [ami_main_serv.c: 315] RdMainChr:11 Val:0
00> [ami_ble.c: 554] RdMainCharacteristic:12 H:42
00> [ami_main_serv.c: 228] RdMainChr:12 Len:2
00> [ami_main_serv.c: 315] RdMainChr:12 Val:0
00> [ami_ble.c:1987] Finished connection
00> 08/09/2022 15:20:01[ami_alfa.c: 154] AlertMsg:d Op:162 Len:51
00> 08/09/2022 15:20:01[ami_ble.c: 950] Disconnected: D1:0F:DE:05:ED:44 (random) (reason 22)
00> 08/09/2022 15:20:01[ami_ble.c:1539] ret:0 atomic_ev:16 index:4
00> 08/09/2022 15:20:01[ami_ble.c:1539] ret:0 atomic_ev:1 index:0
00> 08/09/2022 15:20:01[ami_ble.c:1360] Scan AlreadyStopped
00> 08/09/2022 15:20:01[ami_ble.c: 276] ActualTxPwr:0
00> [ami_ble.c:1604] 2 VibeBTsNormalScan
(Connection lost)
When the BLE stack is running I cannot single step the code. In the peripheral I can stop advertising and debug on part.
Is there a way on the central to do the same? Where can I put a break point in the discovery code or add a printk line?
I just wanted to add a service to transfer several k bytes to and from the sensor so I looked at the throughput and uart samples.
BT_GATT_SERVICE_DEFINE(transfer_svc,
BT_GATT_PRIMARY_SERVICE(BT_UUID_AMI_TRANSFER_SERVICE),
	BT_GATT_CHARACTERISTIC(BT_UUID_AMI_TRANSFER_TX_CHR,
			       BT_GATT_CHRC_NOTIFY,
			       BT_GATT_PERM_READ,
			       NULL, NULL, NULL),
	BT_GATT_CCC(nus_ccc_cfg_changed, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE),
	BT_GATT_CHARACTERISTIC(BT_UUID_AMI_TRANSFER_RX_CHR,
			       BT_GATT_CHRC_WRITE |
			       BT_GATT_CHRC_WRITE_WITHOUT_RESP,
			       BT_GATT_PERM_READ | BT_GATT_PERM_WRITE,
			       NULL, on_receive, NULL),
);
Maybe one of the CONFIG fields is the problem. In the throughput example the change a few parameters for larger MTU and quicker responses.
I remarked some of them with no imrpovement
Central:
CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_SMP=y
CONFIG_BT_GATT_CLIENT=y

CONFIG_BT_GATT_DM=y
CONFIG_HEAP_MEM_POOL_SIZE=24576
CONFIG_BT_DFU_SMP=y

CONFIG_BT_SCAN=y
CONFIG_BT_SCAN_FILTER_ENABLE=y
# filter 10 address
CONFIG_BT_SCAN_ADDRESS_CNT=10
# filter for one UUID
CONFIG_BT_SCAN_UUID_CNT=1
#debug scan
#CONFIG_BT_SCAN_LOG_LEVEL_DBG=y 

#debug Service Discovery
CONFIG_BT_GATT_DM_DATA_PRINT=y
CONFIG_BT_GATT_DM_MAX_ATTRS=100

CONFIG_BT_GATT_DM_LOG_LEVEL_DBG=y
#CONFIG_BT_GATT_DM_LOG_LEVEL=3
#BT_GATT_DM_LOG_LEVEL_DBG

# TX Power
#CONFIG_BT_CTLR_TX_PWR_PLUS_4=y
#CONFIG_BT_CTLR_ADVANCED_FEATURES=y
#CONFIG_BT_CTLR_CONN_RSSI=y
CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y

CONFIG_ZCBOR=y
CONFIG_ZCBOR_STOP_ON_ERROR=y

CONFIG_EVENTS=y

CONFIG_FPU=y
CONFIG_NEWLIB_LIBC=y
CONFIG_MAIN_STACK_SIZE=4096

CONFIG_REBOOT=y
# TX power (highest on nRF52480)
CONFIG_BT_CTLR_TX_PWR_PLUS_5=y

# ----------------------------------------
# USE RTT  Instead of Uart
# ----------------------------------------
CONFIG_CONSOLE=y
CONFIG_RTT_CONSOLE=y
CONFIG_USE_SEGGER_RTT=y
#CONFIG_LOG_BACKEND_RTT=y
#CONFIG_LOG_MODE_MINIMAL=n

CONFIG_NCS_SAMPLES_DEFAULTS=y

# ----------------------------------------
# below for DFU
# ----------------------------------------
# Enable mcumgr.
CONFIG_MCUMGR=y

# The image management command handlers makes it possible to upload, list, test and confirm the image(s)
CONFIG_MCUMGR_CMD_IMG_MGMT=y
# The OS management command handlers makes it possible to reset the chip (and run the echo command). 
CONFIG_MCUMGR_CMD_OS_MGMT=y

# Ensure an MCUboot-compatible binary is generated.
CONFIG_BOOTLOADER_MCUBOOT=y

# Allow for large Bluetooth data packets for uploading binary (Nordic Definitions)
CONFIG_BT_L2CAP_TX_MTU=252
CONFIG_BT_BUF_ACL_RX_SIZE=256

# Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
CONFIG_MCUMGR_SMP_BT=y
CONFIG_MCUMGR_SMP_BT_AUTHEN=n

# Some command handlers require a large stack.
# already set CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

# Enable the UART driver
CONFIG_SERIAL=y
CONFIG_UART_NRFX=y
CONFIG_UART_INTERRUPT_DRIVEN=y
#CONFIG_UART_ASYNC_API=y

#CONFIG_ASSERT=n
#CONFIG_FORCE_NO_ASSERT=y


# ----------------------------------------
# Below from the throughput example
# ----------------------------------------
CONFIG_BT_USER_DATA_LEN_UPDATE=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n

#CONFIG_BT_GATT_CLIENT=y
#CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
#CONFIG_BT_CTLR_PHY_2M=y

#CONFIG_BT_BUF_ACL_RX_SIZE=251
#CONFIG_BT_ATT_PREPARE_COUNT=2
#CONFIG_BT_CONN_TX_MAX=10
#CONFIG_BT_L2CAP_TX_BUF_COUNT=10
#CONFIG_BT_L2CAP_TX_MTU=247
#CONFIG_BT_CTLR_RX_BUFFERS=18
#CONFIG_BT_BUF_ACL_TX_COUNT=10
#CONFIG_BT_BUF_ACL_TX_SIZE=251
#CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
Sensor:
#stCount
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_APPEARANCE=1344
CONFIG_BT_MAX_CONN=1
#CONFIG_BT_LL_SOFTDEVICE=y
CONFIG_BT_DEVICE_NAME="VaporBLE"
# Enable Dynamic name modification
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
# Maximum character of the device name
# (Range: 2 to 248)
CONFIG_BT_DEVICE_NAME_MAX=20

CONFIG_BT_SMP=y
CONFIG_BT_SIGNING=y
# If yes then there is a random MAC advertised
CONFIG_BT_PRIVACY=n

# Allow for updating data length
CONFIG_BT_USER_DATA_LEN_UPDATE=y
# Allow for Phy change
CONFIG_BT_USER_PHY_UPDATE=y

# Device Information
CONFIG_BT_DIS=y
CONFIG_BT_DIS_PNP=n
CONFIG_BT_DIS_MODEL="VaporBT"
CONFIG_BT_DIS_MANUF="AMI Global"
CONFIG_BT_DIS_SERIAL_NUMBER=y
CONFIG_BT_DIS_SERIAL_NUMBER_STR="0523382370"
CONFIG_BT_DIS_FW_REV=y
CONFIG_BT_DIS_FW_REV_STR="000.000"
CONFIG_BT_DIS_HW_REV=y
CONFIG_BT_DIS_HW_REV_STR="000.000"
CONFIG_BT_DIS_SW_REV=y
CONFIG_BT_DIS_SW_REV_STR="000.000"

# TX Power
#CONFIG_BT_CTLR_TX_PWR_PLUS_4=y
#CONFIG_BT_CTLR_ADVANCED_FEATURES=y
#CONFIG_BT_CTLR_CONN_RSSI=y
CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y

# Below is setup to let DIS information be read from settings
CONFIG_BT_SETTINGS=y
CONFIG_SETTINGS_RUNTIME=y
#CONFIG_SETTINGS=y
#CONFIG_SETTINGS_NONE=y

# Battery Service
#CONFIG_BT_BAS=y

# Passkey not used
CONFIG_BT_AMI_CM_SECURITY_ENABLED=y

CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_HEAP_MEM_POOL_SIZE=16384
CONFIG_FPU=y
CONFIG_NEWLIB_LIBC=y
# for Spectral|Impact DSP
CONFIG_CMSIS_DSP=y
CONFIG_CMSIS_DSP_SUPPORT=y
CONFIG_CMSIS_DSP_FASTMATH=y
CONFIG_CMSIS_DSP_COMPLEXMATH=y
CONFIG_CMSIS_DSP_STATISTICS=y
CONFIG_CMSIS_DSP_TRANSFORM=y
#CONFIG_CMSIS_DSP_TABLES_ALL_FAST=y
#CONFIG_CMSIS_DSP_TABLES_ALL_FFT=y
CONFIG_CMSIS_DSP_TABLES_ALL_FAST=n
CONFIG_CMSIS_DSP_TABLES_ALL_FFT=n
CONFIG_CMSIS_DSP_TABLES_RFFT_FAST_F32_32=y
CONFIG_CMSIS_DSP_TABLES_ARM_SIN_F32=y
CONFIG_CMSIS_DSP_TABLES_ARM_COS_F32=y
CONFIG_CMSIS_DSP_TABLES_ARM_CMPLX_MAG_Q31=y
CONFIG_CMSIS_DSP_TABLES_RFFT_F32_512=y

# GPIO
CONFIG_GPIO=y

# I2c for 24LC512
CONFIG_I2C=y
CONFIG_I2C_NRFX=y

# EEPROM
CONFIG_EEPROM=y
CONFIG_EEPROM_AT24=y

# SPI for LSM6DSL
CONFIG_SPI=y
CONFIG_NRFX_SPIM1=y

# LSM6DSL
CONFIG_SENSOR=y
CONFIG_LSM6DSL=y
CONFIG_AMI_LSM6DSL_EXTEND_CFG=y
CONFIG_LSM6DSL_ACCEL_FS=2
CONFIG_LSM6DSL_ACCEL_ODR=0

# Power management
CONFIG_PM=y
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=y
#CONFIG_PM_STATS=y
#CONFIG_STATS=y
CONFIG_PINCTRL=y

CONFIG_MULTITHREADING=y

# ADC
CONFIG_ADC=y
CONFIG_ADC_ASYNC=y

# Timers
CONFIG_NRFX_TIMER1=y

# ----------------------------------------
# USE RTT  Instead of Uart
# ----------------------------------------
CONFIG_CONSOLE=y
CONFIG_RTT_CONSOLE=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y

# ----------------------------------------
# below for DFU
# ----------------------------------------
# Enable mcumgr.
CONFIG_MCUMGR=y

# The image management command handlers makes it possible to upload, list, test and confirm the image(s)
CONFIG_MCUMGR_CMD_IMG_MGMT=y
# The OS management command handlers makes it possible to reset the chip (and run the echo command).
CONFIG_MCUMGR_CMD_OS_MGMT=y

# Ensure an MCUboot-compatible binary is generated.
CONFIG_BOOTLOADER_MCUBOOT=y

# Allow for large Bluetooth data packets for uploading binary (Nordic Definitions)
CONFIG_BT_L2CAP_TX_MTU=252
CONFIG_BT_BUF_ACL_RX_SIZE=256

# Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
CONFIG_MCUMGR_SMP_BT=y
CONFIG_MCUMGR_SMP_BT_AUTHEN=n

# Some command handlers require a large stack.
# already set CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

# ----------------------------------------
# Below from the throughput example
# ----------------------------------------
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n
CONFIG_BT_USER_DATA_LEN_UPDATE=y

#CONFIG_BT_USER_PHY_UPDATE=y
#CONFIG_BT_GATT_CLIENT=y
#CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
#CONFIG_BT_CTLR_PHY_2M=y

#CONFIG_BT_BUF_ACL_RX_SIZE=251
#CONFIG_BT_ATT_PREPARE_COUNT=2
#CONFIG_BT_CTLR_RX_BUFFERS=2
#CONFIG_BT_BUF_ACL_TX_COUNT=10
#CONFIG_BT_BUF_ACL_TX_SIZE=251
#CONFIG_BT_CTLR_DATA_LENGTH_MAX=251

#CONFIG_BT_CONN_TX_MAX=10
#CONFIG_BT_L2CAP_TX_BUF_COUNT=10
#CONFIG_BT_L2CAP_TX_MTU=247

I have spent a lot of time on this and need some direction.
Thanks David
Parents
  • Hi,

    Is there a way on the central to do the same? Where can I put a break point in the discovery code or add a printk line?

    You cannot use a breakpoint while using the SoftDevice controller and MPSL, as the MPSL will assert if it looses timing. Generally I recommend using the SoftDevice controller, but it could make sense in this case to switch to the Zephyr controller to enable easier debugging, and then switch back afterwards. To use the Zephyr controller, add CONFIG_BT_LL_SW_SPLIT=y to your prj.conf. With that, you can use breakpoints and step in the code etc. while using Bluetooth.

    I do immediately have any suggestion about what the problem could be. If you don't make progress on your end, perhaps you can upload a minimal failing example together with the corresponding peripheral, so that I can have a look and perhaps test on my end on DKs?

  • Well, I found my problem and discovery works for all services.

    Thanks, and sorry that I did not catch it earlier.

Reply Children
No Data
Related