extend cwc to act as Mgclient, one port many caids
move detect_card_type to commonly accessible place