Looks like your channel is already open. If you look at your first assign channel command, you will see you actually got a CHANNEL_IN_WRONG_STATE (i.e. msg 15) message:
Rcv:>(21:18:05)[a4][3][40][0][42][15][b0]
Make sure you are processing the Message Code field in all your response messages.
While many commands can be sent to ANT while the channel is openâ?¦ An assign channel command can only happen when the channel is closed. In this case, the channel was not assigned. So you want to make sure your channel is closed before you try to assign it. You can do a request message (channel status) to see what state your channel is in.
This explains why you received the below error message below to your open channel command â?? the channel was already open.
Rcv:>(21:18:06)[a4][3][40][0][4b][15][b9]
So basically I think the following is happening:
You turn on HRM 100 -> it links and data transferred etc -> then you try to reset the channel, however the channel never closes, you reset the channel ID to 00 (for wildcard search), then, because the channel is still open, it is just finding HRM 100 again (you can see this because when you requested the channel ID, it was still at 100)â?¦ so then if HRM 101 starts transmitting, it wont be foundâ?¦ but if you reset the channel ID to 0 then it finds it (ie as you said, on the second time)â?¦
A better practice would be to have HRM 101 linkâ?¦ then make sure to close the channelâ?¦ an easy way to check would be to request channel statusâ?¦ if the channel is open -> then close it. If already closed, go ahead and set all your parameters etc as you were doing and this time when you open your channel you should get no error and link to HRM 101 (if HRM 100 not transmitting)â?¦.
Also, one other thing I noticed:
You also received a CHANNEL_IN_WRONG_STATE error message (below) when you tried to close your channel 1 â?? as it had already timed outâ?¦ and when a channel times out, ANT will automatically close the channelâ?¦ In other words â?? after a SEARCH_TIME_OUT â?? do not send a close channel command.
Search Time Out (21:18:09)
(21:18:09) Close Start
Send:>[a4][1][4c][1][e8]
Rcv:>(21:18:09)[a4][3][40][1][4c][15][bf]
(21:18:10)
Info:> CloseChannel done.