     Modem_ResetCommandBuffer();
 
     C64Println();
-    DisplayBoth(F("OK"));
+    
+    if (autoConnectHost >=1 && autoConnectHost <= ADDR_HOST_ENTRIES)
+    {
+        // Phonebook dial
+        char address[ADDR_HOST_SIZE];
+        
+        strncpy(address,readEEPROMPhoneBook(ADDR_HOSTS + ((autoConnectHost-1) * ADDR_HOST_SIZE)).c_str(),ADDR_HOST_SIZE);
+
+        C64Print(F("Auto-connecting to:\n"));
+        C64Println(address);
+        
+        C64Println(F("\nPress any key to cancel..."));
+        // Wait for user to cancel
+
+        int option = PeekByte(C64Serial, 2000);
+
+        if (option != TIMEDOUT)   // Key pressed
+        {
+            ReadByte(C64Serial);    // eat character
+            DisplayBoth(F("OK"));
+        }
+        else
+            Modem_Dialout(address);
+    }
+    else
+        DisplayBoth(F("OK"));
 
     while (true)
     {


    localport = wifly.getPort();

    C64Println();
    C64Print(F("Waiting for connection on port "));
    C64Serial.println(localport);

    // Idle here until connected


// Configuration 0v3: Wifi Hardware, C64 Software.

unsigned int BAUD_RATE=2400;
//#define BAUD_RATE 2400
unsigned int WiFly_BAUD_RATE=2400;
//#define WiFly_BAUD_RATE 2400
#define MIN_FLOW_CONTROL_RATE 4800  // If BAUD rate is this speed or higher, RTS/CTS flow control is enabled.

