Dynamic advertisement updates and timing. | Cypress Semiconductor
Dynamic advertisement updates and timing.
I'm working on a simple switch application. 2 PSoCs, one for Central one for Peripheral. I'm having the peripheral send a dynamically updated advertisement with a single bit (1) before entering low power mode, so the central scans, stops scanning when that bit in the advertisement data is detected, and processes. When advertisement times out, the bit defaults to 0. For example, click the button once -> Central turns LED on, click again -> LED off. In a simple click-by-click action, it works fine, but what I want to add is kind of a flicker function. Double-clicking will send a (1), then a (0), then a (1) before timing out, so hopefully the Central will detect, process, start scan, and detect a (1) again. I'm running into some either processing time issues on either side or possibly coding issues on the peripheral side. Any ideas?