I followed steps in this post and tried to connect to my Motorola X Gen 2 for Wifi debugging, on OS X El Cap.
I connected my phone to the laptop with usb cable,
I killed and started server, the server was started successfully, and then in:
List of devices attached
./adb tcpip 5555
./adb connect <IP addr of my phone>:5555
unable to connect to 188.8.131.52:5555: Operation timed out
So after a huge number of trials, I think the problem is somehow wifi related, I think this feature does not work well with WPA2 (or any kind of?) Enterprise encryption, because I was using my school Wifi, and it turned out to be okay, up and running, for the hotspot I set up with another laptop.