Added code to manage connected states for dfu and pixy devices