@alexp You can avoid all this by flashing the ipac2 to gamepad enabled firmware 1.39 and setting the buttons as Gamepad buttons. Both sides work and it is 1000x easier. ES configures everything easily, no extra cfgs needed.
Use this guide, but use the ipac2 instead of the miniipac.