minor changes, sometimes it works for several times, but afterwards rcv remains in state 3(listens but doesn't get any packet)