With the DS wireless connection. In Trozei, you go to the Espionage Café as if you were linking up with someone and in MD, you go to the Unknown Dungeon option, I do believe, on the main menu. When you link up, on Trozei, you'll get a Coin and an Agent Card, and in MD, you'll get a random item or two...
I'm not fully sure of the MD side of things, but I know how the Trozei side works.