Like how did it not work? Like sometimes the connection will get messed up and only one person will play the game or present, etc. instead of both of you. But in the case of the connection not working properly you have to be close to connect to do this in a certant range. I hope this helped!
And another way of it not working is if the other person or you have too many food or items and cant recieve any more. But this is for only presents and will connect through games or visit.
oh and be sure to have the A button pushed to have the abillitie to connect. It should show the stand by screen saying "Connect" instead. Hit the button over and over agian to try to stay connected if that helps you. If it says fail just hit connect agian!