Thanks guys,
I believe I have set all USB power management off on the RPI.
I don't think the WiFi connection itself (from the router) disconnects or the RPI changing it's IP address as the music keeps playing...
Oh well, I guess it's one of those unsolved bugs
Mediacenter doesn't stream the data at a uniform rate in my experience; it tends to pull most of the song across as soon as it can, and won't necessarily grab much more data until the next track change. So unless it's playing several songs and you still can't connect that's not a good indicator that the wifi isn't sleeping.
When you say you "set all USB power management off on the RPI" that's not what I was talking about; USB power management wouldn't cause the problems you're seeing. The wifi dongle itself has power-saving settings in its driver that need to be explicitly disabled in /etc/network/interfaces as described here:
https://www.raspberrypi.org/forums/viewtopic.php?t=46569&p=666920If you look around the net you'll find rivers of folks complaining about Raspberry Pi's having slow or intermittent connections or losing connection entirely. The two most important tweaks you can make to the Pi's wifi for connection stability are to
1) disable power management by adding the following in the appropriate spot in your interfaces file:
wireless-power off
and
2) Change the "wpa-conf" line by substituting "wpa-roam" (leave the rest of the line alone)
Doing 1) improves stability overall and prevents the dongle from turning itself off at inconvenient moments. 2) ensures that the Pi will try to reconnect immediately if it loses the connection.
After doing those two things, my Pi's never lose connection to the router for more than a second or two, and I have no problem connecting to them with JRemote (at least the android version of JRemote).
If you make those changes (or if you already have) and still get issues, the next step is to try (for diagnostic purposes) another remote (webgizmo, or gizmo) to see if you experience the same issues with those remotes. It's possible the ios version of JRemote may just be expecting an answer from Pi faster than the Pi can give it. I only have the android version of JRemote to test with, so I can't test the ios version here.