For closing the channel, make sure to wait until the EVENT_CHANNEL_CLOSED is generated, which can take up to one message period from the point where you send the close channel command. After this, the status should be reflected accurately.
Once you open the channel and see the RESPONSE_NO_ERROR, a slave channel will go to the SEARCHING state, and will reflect this accurately in the response.