added code to do signal analysis and broadcast beacon id