I want to use NRF51822 to advertise is door close/open. No need bidirectional data sending. Only one way from NRF sensor to mobile phone app. Actually I have only two different packets: door open, door close. I have to encrypt that packets. It's easy to use AES in ECB mode over RF channel. But again it will give only two different packets. It's easy to understand what means each packet. To make each message unique I have to use AES in CBC mode. But for using CBC mode RF channel must be stable, if I lost several packets I can't decrypt data. How to solve this problem?