Handle peripheral connect and disconnect