Change the memcopy line in allFramesGenerationTMRequest
This line does not take into account where the operational control field is located. It assumes that it is on the last 6 bytes of the packet
array but this is not the case. The operational control field is right after the data in the transfer frame without any idle data. That means that it most likely is much further behind in the array.
Correct this by copying also the operational cotrol field data to the trailer