First, make sure everything is connected, make sure there are no loose wires anywhere.
Second, make sure your modem is connected to your router, and make sure that your internet is working.
Third, go on your computer and open the program you have for your router to check to make sure that it's connected properly, and letting your DS connect to it.
l have to unlock my Wi-Fi, so my DS can get connected. lf l lock it (my DSi can't put in passcode), so it gets blocked from my Wi-Fi. You can try the same thing.
Hope this helps ~