Exactly the same problem, when i want to trade/battle other trainer they will just say failed to connect with the other trainer please start again from the beginning. No error code.
At the battle spot they will say an opposing trainer could not be found please try again later. No error code as well.
Everything else works prefectly fine.
Game sync, giving/ receiving o power, even gts works.
But the two major things doesnt work all of sudden.
I tried using another internet connection and it doesnt work as well.
I even updated my pokemon to version 1.1 and also updated my 3ds system, now i have miverse.
Everything doesn't work and it doesn't make any sense, it seems that my 3ds xl hardware doesnt have any problem as well.
And there is no solution at all on the entire internet.