A learning code for Bluetooth LE