Added connected characteristic and fixed long timeout bug