Gamepad not visible on retroarch device index

Hi,
I have a95x f3 TV box and emuelec 4.6 on it.
My wireless gamepad (with a dongle) is working on menu but it stops after game start.
I tried to connected it with no dongle on Bluetooth too but this time even on menu I can’t use my game pad.
It drives me crazy.
How can I fix this?
Thank you.

Have you tried manuall binding the buttons in EmulationStation >> Settings >> Bluetooth and Controller Settings, before opening Retroarch?

Yes, I have. Gamepad is working on emulation station perfectly. But when i start games once , it has never worked.

Manually assigning the buttons should auto-generate a controller config file which retroarch should recognise. Not sure why it’s not.

I don’t know why but maybe dtb.img file is not compatible completely with my TV box.
There was a way to add gamepads from SSH. But I’m not sure it will work.