I struggled a bit with getting my new 8BitDo M30 controller to pair properly with Batocera. Before we begin, please make sure the controller is on the latest firmware from 8BitDo, and that you're running the latest version of Batocera. Below are my notes and tips that got the controller working.
1) Put the controller into pairing mode first, then start Bluetooth discovery on Batocera. Use the Android D-input (Start + B) pairing mode.
2) After pairing it, it will likely go kinda crazy. Down doesn't work, and it keeps scrolling to the side, etc. Take a deep breath. We can fix this.
3) Turn off the controller by holding down start.
4) Restart Batocera.
5) Turn on the controller by holding down start. BOOM! PROFIT!
In some cases it may not even be necessary to restart Batocera (step 4). So basically the solution is to turn the controller off, then back on again. LOL! Some things never change.