How to use Raspbian version 2019 April to config WiFi for Rpi 2B?
The OP has a Rpi2B with a WiFi dongle. He has a problem configing Wifi. This answer has two parts:
Install Raspbian on 3B+ and config Wifi.
Use the same SD card to config the 2B.
Setting up Rpi2B with a Wifi Dongle
Preparing a micro SD card with Raspbian stretch 2018apr image for Rpi2B and Wifi Dongle
Checking out if Rpi2B Raspbian stretch 2019apr can detect TP-LINK TL-WN727N
I found the setup can detect the TP-LINK Wifi dongle. I remember I needed to google a list of dongles that Rpi can detect. So I would suggest you to check that out by the command lsusb. If you can detect the dongle, then you are almost there! :)
Entering Wifi SSID and password at desktop
setting up Wifi in desktop is even easier. The steps are listed below.
Select your Wifi country (otherwise top right network icon won't work).
At top right corner, click the double red cross icon (Wifi and Ethernet).
Select to turn on your network in the list (my network name is tlfong01).
Enter password (pre shared key).
That is all.
/ to continue, ...
The paragraphs below are out of date and need to be modified and/or deleted, after I have completed the answer above.
Let me see.
I am using Rpi3B+ and Raspbian 2019apr.
When you are configuring WiFi under terminal mode, you should have gone through the last couple of steps as shown below:
You must enter the correct ssid and passphrase, otherwise you will get the N2 Wi-fi error message.
The "ssid" and "passphrase" should be the same for your other WiFi devices, such as your mobile phone. You might like to try your ssid and passphrase with your mobile phone first, to make sure they are OK.
And perhaps you forgot to switch on your router? :)