Implement T322 protocol (fix #499)