     router.send(frame);
     zmtp_frame_destroy(&frame);
   }
+}
 
+void setup() {
+  enableWiFi();
+
+  // uint8_t address[4] = { 192, 168, 29, 198 };
+  uint8_t address[4] = {172, 20, 10, 3};
+  runDealerTest(address);
+  runRouterTest();
+
+  // Allow time for network to catch up before we hard disconnect.
   delay(1000);
 
   end();


SYSTEM_MODE(MANUAL);

void setup() {
  WiFi.on();
  WiFi.connect();
  waitUntil(WiFi.ready);
  Particle.process();

  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());
  Serial.print("IP Address: ");
  Serial.println(WiFi.localIP());

  ZMTPSocket dealer(DEALER);

  // uint8_t address[4] = { 192, 168, 29, 198 };
  uint8_t address[4] = {172, 20, 10, 3};
  Serial.printf("Connecting to: %i.%i.%i.%i\n", address[0], address[1],
                address[2], address[3]);
  dealer.connect(address, 1234);

    dealer.send(frame);
    zmtp_frame_destroy(&frame);
  }
}

void runRouterTest() {
  ZMTPSocket router(ROUTER);

  router.bind(1235);

  zmtp_frame_t *question = waitUntilRecv(router);

  // TODO(schoon) - Receive identity frame first.
  // HACK(schoon) - The zmtp_frame API doesn't tell us about framing, so
