Isnt it “NIMBLE_OPT_MAX_CONNECTIONS”. I see you have NIMBLE_OPT_MAX_CONNECTION 
(not plural).

> On Jul 23, 2016, at 4:05 PM, Marco Ferreira <[email protected]> wrote:
> 
> My target pkg.yml:
> 
> 
> 
> pkg.cflags:  
>   \- "-DNIMBLE_OPT_MAX_CONNECTION=8"  
> 
> 
> 
> 
> 
> Yes, ble_gap_connect() is returning the BLE_HS_ENOMEM.
> 
> 
> 
> 
> 
> \--
> 
> **Marco Ferreira**
> 
> Founder / CTO
> 
> [email protected]
> 
> 
> 
> [www.altitude.co](https://link.nylas.com/link/d8alirm8yqo9t58fef8uienha/local-
> e97a983c-
> 1ecf/0?redirect=http%3A%2F%2Fwww.altitude.co%2F&r=ZGV2QG15bmV3dC5pbmN1YmF0b3IuYXBhY2hlLm9yZw==)
>   
> 
> 
> 
> DISCLAIMER: The information contained in this e-mail is confidential and may
> be legally privileged. If the reader of this message is not the intended
> recipient you are hereby notified that any use, dissemination, distribution,
> or reproduction of this message is prohibited. If you have received this
> message in error please forward this message to
> [[email protected]](mailto:[email protected]) and delete all copies of this
> message.
> 
> 
> 
> ![](https://link.nylas.com/open/d8alirm8yqo9t58fef8uienha/local-e97a983c-
> 1ecf?r=ZGV2QG15bmV3dC5pbmN1YmF0b3IuYXBhY2hlLm9yZw==)
> 
> On Jul 23 2016, at 7:43 pm, Christopher Collins &lt;[email protected]&gt;
> wrote:  
> 
>> On Sat, Jul 23, 2016 at 09:32:59PM +0000, Marco Ferreira wrote:  
>> &gt; Here's the complete config in my code:  
>> &gt;  
>> &gt;  
>> &gt;  
>> &gt; /* Configure the host. */  
>> &gt; cfg = ble_hs_cfg_dflt;  
>> &gt; cfg.max_hci_bufs = 16;  
>> &gt; // cfg.max_connections = MAX_CONNECTIONS*3;  
>> &gt; // cfg.max_gattc_procs = 5;  
>> &gt; cfg.max_l2cap_chans = cfg.max_connections * 3;  
>> &gt; // cfg.max_l2cap_sig_procs = 1;  
>> &gt; // cfg.sm_bonding = 1;  
>> &gt; // cfg.sm_our_key_dist = BLE_SM_PAIR_KEY_DIST_ENC;  
>> &gt; // cfg.sm_their_key_dist = BLE_SM_PAIR_KEY_DIST_ENC;  
>> &gt; // cfg.store_read_cb = ble_store_ram_read;  
>> &gt; // cfg.store_write_cb = ble_store_ram_write;  
>> &gt;  
>> &gt; /* Populate config with the required GATT server settings. */  
>> &gt; // cfg.max_attrs = 0;  
>> &gt; // cfg.max_services = 0;  
>> &gt; // cfg.max_client_configs = 0;
> 
>> 
> 
>> Hmm, those settings look fine to me. Are you sure  
>> -DNIMBLE_OPT_MAX_CONNECTIONS is set to 2? Are you setting it as a target  
>> variable in the target's pkg.yml file?
> 
>> 
> 
>> Also, just to confirm, is is ble_gap_connect() that is returning  
>> BLE_HS_ENOMEM?
> 
>> 
> 
>> Thanks, Chris
> 

Reply via email to