MKW45B41Z client failed to get service from server

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MKW45B41Z client failed to get service from server

959 Views
Sabarish
Contributor II

Hi, I am using MKW45B41Z custom board. I have working on kw45b41zevk_adv_central_bm example program. My setup is (NRF Connect) mobile application acts as peripheral server role. MKW45B41Z (custom board) acts as central device client role. MKW45 Client scanning the Peripheral(NRF connect) device  and connecting to the peripheral(NRF connect) device. After connection MKW45 (custom board)client failed to get the service from the server end(NRF connect)   

Labels (1)
0 Kudos
Reply
8 Replies

891 Views
luis_maravilla
NXP Employee
NXP Employee

Hi, Could you help us try using the KW45-EVK as peripheral server role and your phone as central device client role, please?  Is this working on your side?

 

By any chance, do you have two KW45-EVK's? Can you try the example with the peripheral on one board and the central on the other one?

 

More information about this application [adv_ext_central and adv_ext_peripheral] in Bluetooth Low Energy Demo Applications User’s Guide Chapter 5.10

0 Kudos
Reply

869 Views
Sabarish
Contributor II

Hi @luis_maravilla 

      Thanks for the reply

1)I have used the KW45-EVK as peripheral device server role and (NRF connect)mobile application as central device client role and it works from my side

2)I am having Two KW45-EVK's one board running  peripheral example code server role and another board running central example code client role. Client device gets connected to server and MTU exchange happened between server and client. Server discovering the services and client unable to get the services from the server

3)I have tried using KW45-EVK running as central device client role example code and (NRF connect) mobile application works as peripheral device server role. Client gets connected to server. MTU exchange happened between server and client. Server discovering the services and client unable to get services from the server. After some time Server disconnects the client 

Any help would be appreciated

 

Regards

Sabarish Kumar

0 Kudos
Reply

799 Views
luis_maravilla
NXP Employee
NXP Employee

Hi Sabarish

 

1)Good It works.

2)For testing the two KW45-EVK's; did you get the same results as the example on the Chapter 5.10.4 in Bluetooth Low Energy Demo Applications User’s Guide ? Can you describe what are the expected results for "client unable to get the services from the server" please?

3) For this type of testing and configuration, the app you use is outside of NXP family and support, and NXP does not make corrections in externals apps.

 

Regards

Luis

0 Kudos
Reply

669 Views
Sabarish
Contributor II

Hi @luis_maravilla 

           Sorry for the late reply

Question 1:

            For testing the two KW45-EVK's; did you get the same results as the example on the Chapter 5.10.4 in Bluetooth Low Energy Demo Applications User’s Guide ? 

Answer:

             I have Tested two KW45-EVK's. One EVK acts as client(central device). Another EVK acts as server (peripheral device). I am getting the same result mentioned in the Chapter 5.10.4 in Bluetooth Low Energy Demo Applications User’s Guide

Question 2: 

             Can you describe what are the expected results for "client unable to get the services from the server" please?

Answer:

           I am Expecting the client should able to access the GATT services from the server after service discovery. KW45 Peripheral SDK example contains Battery and temperature GATT services. KW45 client should able to access the Battery and temperature GATT services from the server after service discovery. 

Question 3:

            For this type of testing and configuration, the app you use is outside of NXP family and support, and NXP does not make corrections in externals apps.

Answer:

            I Tried using NXP IOT TOOLBOX android application in mobile phone and there is no option to check the working of Central and peripheral example code. I am using kw45b41zevk_adv_ext_central_bm SDK example code for central device and kw45b41zevk_adv_ext_peripheral_bm example code for peripheral device. 

0 Kudos
Reply

660 Views
luis_maravilla
NXP Employee
NXP Employee

Hi Sabarish,

Q1:Great

 

Q2: Something that could help you identify the services is using a sniffer to see the interaction between both devices. This example already shows services in terminal only for peripheral (Server), not client. This way for the Central (Client) to show the services need to be implemented in Code by User.

 

Q3: Something important to remark, is that IoT Toolbox app is just demonstrative, and does not cover all scenarios.

 

Best Regards

Luis

0 Kudos
Reply

631 Views
Sabarish
Contributor II

Hi @luis_maravilla 

      Question:

                Something that could help you identify the services is using a sniffer to see the  interaction between both devices. This example already shows services in terminal only for peripheral (Server), not client. This way for the Central (Client) to show the services need to be implemented in Code by User

Answer:

       I have modified the code to show the client services in the terminal. I can able to access the temperature service form the server by using Gap_LoadCustomPeerInformation()

API, and I have added the structure iniside the appCustomInfo_t  data type to access the Battery service from server. After adding the structure to access the battery service. Gap_LoadCustomPeerInformation() API returning Invalid parameter error. When the client is connected to server for first time I can able to get the Temperature service information from the server after powering off and powering on or resetting the device Bonding information is removed and device is getting disconnected and can't able to get the temperature service information from the server. I have given the disconnection timeout of  10 mins. 

0 Kudos
Reply

607 Views
luis_maravilla
NXP Employee
NXP Employee

Hi Sabarish

In the example you are using, the Battery service is not included in the structure customInfo, only the Temperature service

The handling of the Battery service is not implemented on the central example. This is something every customer would need to implement. For this you would need to add the Battery service inside BleApp_StoreServiceHandles [Gatt Service],  and handle the service on the application, as it is done for the temperature service.

Consider the information for Battery Service

gBleSig_BatteryService_d  ->  Battery Service UUID.

gBleSig_BatteryLevel_d Battery  ->  Level Characteristic UUID.

 

Also to not be able to get the temperature service from the server after powering off, please consider the recommended structure for CustomPeerInformation, information for the HOST API and refer to Chapter 3.12.37 and 3.12.38 in Bluetooth Low Energy Host Stack API Reference.

 

Best Regards

Luis

0 Kudos
Reply

352 Views
Sabarish
Contributor II
Spoiler
Hi @luis_maravilla 

          Sorry for the late reply 

I Have added the Battery service(Gatt service) in BleApp_StoreServiceHandles API and handled the Battery service in application. Now I can able to get the Battery service information from the server after service discovery, and also after power off and power on I can able to get the temperature service information from server after following the procedure mentioned in Chapter 3.12.37 and 3.12.38 in Bluetooth Low Energy Host Stack API Reference.


Regards
Sabarish kumar

0 Kudos
Reply