I couldn't do it on a Galaxy S3 (non rooted).
For me it would hang saying...
restaring in tcp mode
So i found this series of commands quite useful.
First disconnect your device, start from scratch (cmd in admin mode and all the stuff).
connect your device and write in CMD/Terminal:
adb kill-server
control should return as normal. Now type and enter
adb tcpip 5555
you will see..
- daemon not running. starting it now on port 5037 *
- daemon started successfully * restarting in TCP mode port: 5555
and then connect device with
adb connect <IP>
That's how it worked for me after a lot of hassle!
UPDATE FOR ANDROID STUDIO
I noticed this doesn't work sometimes, even after correctly repeating steps a number of times. Catch was; sometimes ADB is yet not initialized by Studio unless, Android Tab at the bottom is opened and you see "Initializing Android Studio".