The formal specification technology of communication protocols is one of the key subjects in computer communication systems. As one of description approaches which is intuitionist, comprehensible and easy to be implemented, the Finite State Machine FSM has been widely used in the description, realization and test of communication protocols, and can effectively improve preciseness and integrity of some system. Based on BlueStack, the design and implementing of FSM will be given in this paper.