- Set up a Telnet chat server using NodeMCU
- NodeMCU (quantity: 1 no)
- Micro USB cable A to B (quantity: 1 no)
- Android mobile phone (quantity: 1 no)
- Telnet client mobile app
- Arduino IDE on the computer
Telnet is a convention utilized on the Internet or local area network to give a bidirectional intelligent text-based facility. Let’s make a chat server on the NodeMCU.
To copy the code, right click on view raw at the bottom of the code, click on open link in new tab and then copy the code.
Uploading the code
Step 1: Enter the final code in the Arduino IDE window.
- When you click on New to open a new blank code in the Arduino IDE, you will get a new window with two functions: void setup() and void loop()
- You can either type commands as shown in the final code under void setup() and void loop() functions or
- Delete the contents of this window. Then copy and paste the final code in the Arduino IDE window.
Step 2: Compile/ verify the code by clicking on the verify button.
- Make sure the board is connected to your computer
- Check if the correct board and port is selected.
Step 3: Upload the code by clicking on the upload button, which is right next to the verify button.
- The Arduino IDE provides a progress bar when it’s uploading.
- After it is done, you will see “Done uploading” on the bottom left of your IDE.
- If you encounter any errors, you need to go back to the code and fix the errors.
There you go!
After that open Telnet client app (downloaded from Play store ). Now, input the IP address from serial monitor of Arduino IDE into telnet applicaton and let the port be 23.
Type a message and send it. Check the serial monitor of your Arduino IDE, the message you sent should appear there.
Now, you can send your reply by typing on your serial monitor and click on SEND button. This message should appear on the Telnet Client app.
We have successfully created a local chat server using Telnet and NodeMCU.