cancel
Showing results for 
Search instead for 
Did you mean: 

Difficulties in connecting to BLE devices

rsilva
Associate II

Hello,

I am using a BlueNRG-2 acting as a central to connect with multiple BLE devices, these devices can connect and disconnect multiple times.

I am using up to 6 simultaneous connections to different devices, after some successful attempts I keep getting errors from the ST API during the connection stage, usually at the pair/bonding stage.

The errors are either:

  • BLE_STATUS_NOT_ALLOWED (0x46): no further information is available and I cannot understand why is this operation not allowed when calling 'aci_gap_send_pairing_req()'?
  • BLE_STATUS_DEV_IN_BLACKLIST (0x59): how can I access and handle this blacklist, information on this is nonexistent, can I remove devices from the blacklist or prevent them from being stuck there?

When a connection fails the system seems to enter a loop and cannot recover.

Most commonly, what happens is that when there is an error, the initial connection is successful, but the process fails when negotiating at the encryption step (I am using default encryption with fixed pin).

I think this question might be similar to another posted to this forum but with no response so far, titled:

"STM32WB pairing error with mixed bonded/nonbonded devices

Thanks in advance.

15 REPLIES 15
ARamí.1
Associate II

I have the same issue but using a BlueNRG-LP. I only can connect 7 slaves devices to my central device. 

Any new result ?

Best Regard

rsilva
Associate II

You can connect 7 slaves at the same time, or in total?

Hi,

With BlueNRg-LP, did you defined macro CONFIG_NUM_MAX_LINKS ?

This macro defines max number of simultaneous connection.

FYI, You may use "BleuNRG-X Radio Init Wizzard" tool to build config file.

Regards,

Sebastien

ARamí.1
Associate II

@Sebastien DENOUAL​ 

Thank you so much for your answer. It worked.

Now I can connect 10 slaves to my central simultaneously. The Define CONFIG_NUM_MAX_LINKS was configured to 8. An this reserve RAM for Radio. I hadn't seen it. 

0693W00000NsYwyQAF.jpg@rsilva​ The documentation about BlueNRG2 say that.

0693W00000NsZ35QAF.jpg I don't know if it has any limitations.

Sebastien DENOUAL
ST Employee

HI @Adrian Ramírez Mengana​ ,

Thanks for feedback. Good news.

@rsilva​ : ARami.1 is using BleuNRG-LP whereas you are using BleuNRG-2.

BlueNRG-2 is limited up to 8 simultaneous connection as per below :0693W00000NsbqiQAB.pngThis is an extract from PM0257 : BleuNRg-2 BLE stack programming manual - section 4.4

Regards,

Sebastien.

Hi @Sebastien DENOUAL​ thank you for your input, I am aware of these limitations and I am using 6 simultaneous connections.

With your input on the repeated attempts feature and some tweaking in connection parameters we achieved more stable connections now.