Step 1: Beat the Elite 4.
Step 2: Obtain the national dex.
Step 3: Find and fix the network machine by finding the ruby and sapphire stones. You must search through islands 1 and 6 in order to find the ruby and sapphire. Once you have it all, return to island 1.