This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Advertising failed to start (err -12)

Hi,

I am testing peripheral_hids_keyboard of NCS SDK 1.4.2

I have issues

1. where i can able to connect with windows and Android system but it is not visualize in MAC or IOS

2. I got issue Disconnected from 00:1a:7d:da:71:15 (public) (reason 21)
Advertising failed to start (err -12)

Parents Reply
  • Yes, I have followed this ticket,

    also spoke with carl at end

    He said "Error -12 means ENOMEM, which suggests your advertising data may be bigger than the maximum of 31 bytes. Please check this. "

    this error comes only when is disconnected from the user device which means for the first time the advertising packets are working properly and then during disconnect how it will change

    For my project i just need to connect with one particular device only from the example code i have changed the config as

    CONFIG_BT_MAX_CONN=2
    CONFIG_BT_MAX_PAIRED=2

    CONFIG_BT_HIDS_MAX_CLIENT_COUNT=2

    to

    CONFIG_BT_MAX_CONN=1
    CONFIG_BT_MAX_PAIRED=1

    CONFIG_BT_HIDS_MAX_CLIENT_COUNT=1

    this error occur during disconnect

    then i tried

    CONFIG_BT_MAX_CONN=2
    CONFIG_BT_MAX_PAIRED=1

    CONFIG_BT_HIDS_MAX_CLIENT_COUNT=1

    now during disconnect it work advertising but rarely it doesn't advertise

Children
No Data
Related