Hello,
I found a fix for the error codes 001-0502 and 101-0502 you get for Offline in Friend list and you might get it when trying to connect online for games like Pokemon X & Y. The fix I found after trying to change the DNS and DMZ stuff was creating a Guest Network on your router. So go into you router settings and choose to allow a Guest Network. Also make sure to choose something other than WPA2-PSK[AES] because that was what my main wireless SSID was and blocked me from online. The one I chose for Guest Network was the one under it called WPA-PSK[TKIP] + WPA2-PSK[AES] and used same password or key for my main but it let me 3ds and wii u go online. I hope this helps!