While trying to get this project to work, I came across the issue where the ResponseManager.HandleResponse is throwing some Key out of range errors.
The issue seems to be that the expected input is not compatible with this code. My device came with FW 1.07 and I upgraded to 1.09 so I have no idea if something has changed with older FWs but the problem is that the HandleResponse expects the first two bytes to be the sequence number. The Lego Communications documentation says the first two bytes are the size, so what happens is that the code tries to access a Response at the index that is the size of the message. Does not work that well.
The fix is actually quite simple. Up all the indexes with 2 so it skips the size.
While trying to get this project to work, I came across the issue where the ResponseManager.HandleResponse is throwing some Key out of range errors.
The issue seems to be that the expected input is not compatible with this code. My device came with FW 1.07 and I upgraded to 1.09 so I have no idea if something has changed with older FWs but the problem is that the HandleResponse expects the first two bytes to be the sequence number. The Lego Communications documentation says the first two bytes are the size, so what happens is that the code tries to access a Response at the index that is the size of the message. Does not work that well.
The fix is actually quite simple. Up all the indexes with 2 so it skips the size.