To render a UI, you need a PC program. It would handle presenting an interface as well as communicating the user's input to the Arduino over UART. I would recommend writing your own program as it would give you a lot of freedom in the UI design. Processing and Python are good options. To avoid using the IDE, you'll need a USB-TTL adapter cable. If you use the default USB connection, you need the drivers which only ship with the installer AFAIK. To detect the COM port, you can either have the user check the Device Manager or make your program auto-detect it, though this isnt very reliable. This link shows some Python code on detecting the Arduino's port or at least, displaying a list of open ports and allowing the user to choose. You can set the baud rate and other stuff permanently in your code; the COM port is the only variable. Also all handshaking b/w the Arduino and PC can be done without the knowledge of the user.
That said, there are already existing programs (for most common OSes) that can provide minimal functionality. If you dont need a fancy GUI, then putty (on Windows) can serve to read input from a user and pass it on to the listening Arduino. You can use putty's default baud rate (9600) in your Arduino sketch so that the user doesnt have to set this. Again, the COM port must be known. Device Manager is the only real option.
With this second approach, you could make a user enter some string (or even a char) in putty to prompt the Arduino to ask for the SSID and password. Once the Arduino is powered, it does nothing but wait for that input string and once it receives it, it sends something like: Enter SSID:
, the user complies (and presses the Return key to terminate) and this is repeated for the password. The Arduino sketch would look like this:
#define MAX_LEN 20 //max length of name or password
char PROMPT[] = "ready\r" //the initial string input from a user
char SSID[MAX_LEN]; // buffers for the ssid and pwd
char PWD[MAX_LEN];
init_done = 0; // this var is set when an ssid and pwd have been received
void setup(){
Serial.begin(9600);
//anything else
}
void loop(){
if (!init_done)
continue;
// your other code
}
void get_data(){
Serial.print("Enter Network SSID: \r\n");
while (Serial.available() == 0); // wait for input
// no timeouts used here; wait till user presses return key
int i = 0;
char c;
while (i < MAX_LEN - 1){ // read chars till the buffer is almost full
c = Serial.read();
if (c == '\r') // means end of input
break;
SSID[i++] = c;
while (Serial.available() == 0); // wait for next char
}
SSID[i] = 0; // null terminate
while (Serial.read() != -1); // flush serial buffer
Serial.print("Enter password: \r\n"); //same as before
while (Serial.available() == 0);
i = 0;
while (i < MAX_LEN - 1){
c = Serial.read();
if (c == '\r') // end of input
break;
PWD[i++] = c;
while (Serial.available());
}
PWD[i] = 0;
while (Serial.read() != -1);
//Serial.print("Done.");
init_done = 1;
}
void serialEvent(){
if (!init_done){
while (Serial.peek() != PROMPT[0]) // read off any garbage
Serial.read();
int i = 0;
while (1){
if (Serial.peek() == PROMPT[i++]) // compare received chars to PROMPT
Serial.read();
else
return
if (i == sizeof(PROMPT)){ // read enough chars
while (Serial.read() != -1); // flush the buffer
get_data(); // get ssid and so on
}
}
}