Just wondering if the mask for cbChId should be 0x03 instead of 0x02 since the allowed values are [0,1,2,3]. 
If I'm not mistaken 0x02 would lead to problems if length is 1 or 3 bytes.