Go to: Edit -> Preferences -> Control surfaces and keyboards, and choose your midi controller from that list or you can press "Auto-detect surfaces", next go to the "Advanced MIDI" tab in the menu, and choose your controller port.
..and im pretty sure you will get it to work