BLE - Connecting to more than 2 servers from a client

cancel
Showing results for 
Search instead for 
Did you mean: 

BLE - Connecting to more than 2 servers from a client

374 Views
EmbeddedTech
Contributor III

Hi,

What is the maximum number of servers that can be connected to the BLE client?. I am using a iMX and ublox module for client and qn9090 as servers. I have modified the code to detect 2 servers at a time. When I am trying to connect to one more server, I am getting the below error.

Connected to peer: 00:60:37:05:EC:95 (public)
Discover failed(err -12)

I have already set the CONFIG_BT_MAX_CONN to 3.

Is there anything else that need to be taken care for connecting to multiple servers? Our requirement is to connect to a max of 6 servers at a time.

Thanks.

 

0 Kudos
5 Replies

356 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @EmbeddedTech,

I hope you are doing great.

Is it possible that you could share how are your connections? a simple diagram?

I am not sure if I am understanding your issue. You are connecting the QN9090 as a server.

What is the example that you are running?

However, what is the product from Ublox that you are working on the IMX,

Are you scanning after the first connection?

Could you please share more details about the process that you are doing?

Regards,

Mario

 

0 Kudos

339 Views
EmbeddedTech
Contributor III

Hi Mario,

Good day to you.

I will explain in detail regarding my connections.

I am using iMXRT1060 + ublox JODY W263 as a Client module. I have programmed 3 QN9090 boards as peripherals. One board runs the Health thermometer code. The other 2 boards runs the custom service.

After initializing, scanning will be started and will connect to the first available device. After connecting to that server and subscribing to the required characteristics the scanning will be restarted. After connecting to the second peripheral and subscribing to its characteristics the scanning will be restarted again.

After connecting to the third peripheral, the discovery fails stating,

Connected to peer: 00:60:37:05:EC:95 (public)
Discover failed(err -12)

I do not find any issue with the peripheral side as I am able to connect and get the data individually from the modules. The problem is with the third connection on the client side. Is there something which I am missing? The problem seems to be with the channel allocation as seen in the attached screenshot.

Your help on this is highly appreciated.

Thanks.

 

0 Kudos

326 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @EmbeddedTech,

Thank you so much for the details.

Is it possible that you confirm the values for the next defines?

CONFIG_BT_MAX_PAIRED + CONFIG_BT_MAX_CONN

Also, what is the example that you are running? Could you please try with the wireless UART? by default the demo supports 16 devices.

You could look at the next document. EdgeFast BT PAL Documentation.

You can find it path\docs\wireless\Bluetooth\Edgefast_bluetooth

Regards,

Mario

 

 

0 Kudos

311 Views
EmbeddedTech
Contributor III

Hi Mario,

The macros are defined as below

CONFIG_BT_MAX_PAIRED = 0

CONFIG_BT_MAX_CONN = 3

I have taken the central_ht as the base code and modified for the client functionality. 

How to enable the debug messages for BT (BT_DBG() and BT_WARN()?

I have defined the macros in app_config.h, but the messages are not shown in the terminal.

#define CONFIG_BT_DEBUG 1
#define CONFIG_BT_DEBUG_HCI_CORE 1
#define CONFIG_BT_DEBUG_CONN 1
#define CONFIG_BT_DEBUG_GATT 1
#define CONFIG_BT_DEBUG_ATT 1
#define CONFIG_BT_DEBUG_L2CAP 1

Thanks.

0 Kudos

292 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @EmbeddedTech,

Is it possible that you could try the wireless example without any modification?

Also, could you please enable the next define?

#define CONFIG_BT_DEBUG 1

Regards,

Mario

0 Kudos