I had the same problem connecting my android phone to iTunes running on Mac OS X. After entering the "0000" in iTunes it still wouldn't connect, and instead would return into a loop.
If you experiencing something like the above, I might have the solution for you. The problem is, you're probably not using the correct IP address.
I used the following link to find out what my internal IP address was:
http://www.ehow.com/how_2068589_chec...p-address.html
The article is not entirely up-to-date, but it shows you in general terms where you can find your internal IP in the system preferences of your Mac.
In short: "System Preferences" -> "Network" -> "Advanced" for Airport -> "TCP/IP"
There you have it: internal IP = IPv4-address
Hope it helps.
*selecting next song for iTunes on my Android powered HTC*
Bookmarks