auto detect device type  and status and socket info added