Wiimmfi's error code lookup says 521XX indicates DNS failure, which is strange. Not saying I don't believe it but I suspect the issue is with your phone's hotspot generally, especially if other devices can't use the internet from it either.
Some things to try:
- Restart the phone
- Connect the phone to a different network and then re-enable the hotspot
- Delete all three connection setups on the DS and restart the process from the guide
- Try connecting to Mystery Gift even if the connection test fails
- Borrow a friend's phone and see if the same setup on your DS will work with that