Oivind wrote: > I see. So the p_ca_message argument is the EN50221 message and > hw_buffer is filled with the twinhan hardware message. > Yes the userspace is responsible to send in a proper EN50221 message, the driver gets this message in p_ca_message The hardware does not take in an EN50221 message, so to modify it, the message is copied to hw_buffer and is modified there.. Once things are okay, it is written to hardware .. > Are the logs from previous mail making any sense? > Yes, i have posted a reply on that too .. I think the offset is wrong and the lengths need to be initialize to 0 too, as a precautionary case .. in the case if the shifts are not equal to the number of bit positions. In the library this does not matter, as those shifts exactly matches the fields and the error is avoided there .. Else we would have been debugging in the library .. Anyway hope to catch some bugs there too .. Manu