8 Replies Latest reply on May 21, 2015 8:59 PM by BoonT_56

    Current during Directed Advertising



      I'm using the following code to send directed advertisments from a 20737S:


      void xyz_update_adv_interval(int32_t interval_ms)


         int32_t interval = (interval_ms * 1000) / 625;

         uint8_t bdaddr[6]={0xaf,0xfe,0x65,0x46,0xaa,0x5a};














      While this works great and I'm able to block connections from nosy Apple devices which we don't have to support, the current draw is a little bit too high during advertisements for a CR2032. I measured 21mA through a 47Ohm resistor. Here is a picture of the voltage after it:



      That initial 500ms current draw is a killer. I'm not sure how I could prevent this so if you have a good idea let me know.


      The general problem I'm trying to evade is foreign central devices connecting to our peripheral. The thing is that even though I can send advertisements in parallel to open connections to enable permitted devices to access our peripheral, the 4.4 Android Bluetooth stack gets into a non-functioning state by doing so. In the past I resorted to only using advertisements and terminating connections to prevent excessive current draw. Now we have to support a piece of hardware where the Android stack doesn't hand advertisement data over to the user - we only get zeros. For this reason I've thought about going back to connections and limiting the connection of foreign devices by some other means.


      If you got any suggestions I would be glad.