The Joystick tutorial of Entertainment Technology Center (CMU) was really helpful for me to connect the controller.

If you want to check quickly on your Android device, which button triggers which input manager field in Unity settings, just use this apk: U3D controller map

Note: In my case, the buttons of the Gamepad are mapped differently on Android platform and on PC platform. You need to map them again under Input Manager  (Edit->Project Settings->Editor) before building for Android platform. I don’t know if there is any config file for this, so that I don’t manually enter the values while switching platforms. Any ideas?