This probably applies to most integrated brake controllers.
I was getting the check trailer wiring error intermittently. It would go back to trailer connected also.
The safety issue is when it says check trailer wiring you have no trailer brakes at all. Just hope you don't have an emergency stop at that time.
I discovered that with the trailer hitch not connected and only the cable plugged in, the error was constant. Had to be a ground issue.
I removed the bolt where all the ground wires were connected at the trailer frame. The bolt was rusty where it went through the frame. All the time all the lights worked with no indication of a problem. The trailer connection (integrated brake controller) appears to be very sensitive to resistance.
I sanded the trailer frame to bright steel top and bottom. I installed new connectors on all the ground wires. I soldered and crimped the new connectors. When I installed the new bolt I used star washers to insure a good connection.
Now it works with only the cable connected.
2015 Chevrolet 2500HD CC LTZ 4x4 Duramax
Reese DC HP, Husky Brute 4500
1999 Wilderness GL 27F