How to establish notifications without a subscription?

My task looks like Case ID: 115570, but now running nRF SDK 2.1.3 on nRF52840-DK.

My GATT server (Peripheral) has to send a special msg (see log) right after CONNECT_IND using a notification service to the Central. The Central itself cannot be changed (old BT 4.2 device, no source code...).
But I cannot send notifications without a subscription. 


[00:00:17.341,705] <inf> PP: Connected to con 0x20001388: 72:04:D2:F5:8F:47 (random)
[00:00:17.939,605] <inf> PP: Sende ACK
[00:00:17.939,636] <dbg> remote: send_ack: conn 0x20001388 msg bc5301dd
[00:00:17.939,666] <wrn> bt_gatt: Device is not subscribed to characteristic

How can I enable sending notification messages without having a subscription from Central using SDK 2.1.3 ?

 

Parents
  • Not sure if this is helpful, but if you bond the devices, then a subscribed notification is persisted across reconnections. You can therefore send a notification immediately after the connection has been established in that case.

  • Hello Edvin,

    I in fact now can connect to the black-box-central, but need good luck for it - connection procedure isn't deterministic as expected. In only a few cases the central opens notification - and all works fine this case. I can send my cookie without notifictation enabled as well, but there is only a short time for it - the window opens for about 500ms after end of GATT enumeration.
    On any earlier or later attempts the connection is dismissed by the central. And how long GATT enumeration takes depends on BT traffic.
    The idea - if I can (re)start a timer (say 300ms) whenever GATT enumeration takes place I would get a really good chance to hit the timing window when this timer expires. 

    Reconnection
    This box of bunches I havn't opened yet... coming soon.

Reply
  • Hello Edvin,

    I in fact now can connect to the black-box-central, but need good luck for it - connection procedure isn't deterministic as expected. In only a few cases the central opens notification - and all works fine this case. I can send my cookie without notifictation enabled as well, but there is only a short time for it - the window opens for about 500ms after end of GATT enumeration.
    On any earlier or later attempts the connection is dismissed by the central. And how long GATT enumeration takes depends on BT traffic.
    The idea - if I can (re)start a timer (say 300ms) whenever GATT enumeration takes place I would get a really good chance to hit the timing window when this timer expires. 

    Reconnection
    This box of bunches I havn't opened yet... coming soon.

Children
No Data
Related