Serial Port Over WiFi




I'm a mechanical engineer, and I like computer programming, mechanics, electronics and specially ...

Data communication between electronic devices is inevitable in many electronic projects and brings a lot of advantages to your project i.e. connecting your microcontroller to PC and monitor data on a large colorful display instead of small monochrome LCD. When talking about connecting a device to PC, the most obvious way of communicating is USB port. But transmitting data over USB requires lots of programming. Another easy way is Serial Port (aka COM) and RS232 protocol that only needs a tiny electronic circuit to convert voltage levels and a little programming. So I made an RSS232-TTL UART adapter and published here to uses in all of my projects. But I faced a new problem, new motherboards and laptops have no COM port. Then I decided to make a USB-TTL UART adapter using famous FT232 IC for my projects. It works very well, but long wires from devices to PC are annoying me. Is it possible to have the serial port on the air like wireless mice and keyboards? Of course, it can be done using lovely WiFi module ESP8266, and by using WiFi you have not to make a dongle yourself and also you can have a serial port over the internet. Wow, I just wanted a wireless serial port, now I also have a serial port over the web. That's very exciting.

The video shows controlling an E-waste CNC (3D printer) using this device.

I want to share this project with you. If you like it, follow me.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Things You Need

  • 1x ESP8266-01 module
  • 1x 78L05 voltage regulator
  • 1x LF33CV voltage regulator
  • 1x BC547 transistor
  • 3x 100uF electrolyte capacitor
  • 1x 100nF MKT capacitor
  • 1x 4.7K resistor
  • 6x 10K resistors
  • 1x 1N4148 diode
  • 2x Small push buttons
  • 8x Female pin headers
  • 1x Power connector (female)
  • 1x Power connector (male)
  • 1x 3.5mm stereo audio connector (male)
  • Some wires
  • Some copper board
  • PCB making tools (sandpaper, glossy paper, laser printer, PCB file, acetone, ferric chloride etchant, plastic container, etc.)
  • Soldering tools (iron, wire, flux, wire cutter, etc.)
  • Some unusable plastic cards and glue to make a case

Step 2: Making the PCB

Print the PCB file with a laser printer on an A4 glossy paper without scaling. Cut some copper board, clear it with sandpaper, pour some acetone on the board, put printed papers on it and press them about 10 seconds and wait till it dries. Remove the papers, if there are parts that circuit does not reflect well fix them with a CD marker. Then soak board in ferric chloride etchant and wait till no copper parts can be seen. Wash the board with water, dry and clear it with sandpaper, then drill the holes. There are a lot of Instructables to show you how to make a PCB.

Step 3: Soldering Components

Solder components according to the text on the board and schematic diagram. Notice the direction of voltage regulators, transistor, diode, and electrolyte capacitors. There are a lot of Instructables to teach you how to solder. Notice that anode is at the center of power connector while connecting it to the board. Connect 3.5mm audio connector to the RX, TX and GND terminals on the board according to its diagram. Solder female pin headers to the place of the ESP8266 module.

Step 4: Programming ESP8266

Search this website for flashing ESP8266 with Arduino. You can find useful articles. I flashed it using my USB-TTL UART adapter and a small board that I made for flashing and testing ESP8266-01 (If you want to make it, download its files from this step and make your ESP8266 flasher). Download below code and flash your ESP8266. Then put it in its place on your board. The LF33CV voltage regulator prevents attaching ESP8266 module in a wrong direction.

Step 5: Making the Case

I cleared some useless plastic cards with sandpaper and made a case for this device by gluing them together. Don’t forget to make holes for cooling LF33CV.

Step 6: How to Use

I placed two connectors for the power supply (one male and one female) to be able to put this device easily between AC adapter output and the set that must connect to the serial port, so you have not to prepare another power source for this device. According to LF33CV datasheet, you can power this device from 3.5VDC to 18VDC.

Connect 3.5mm audio connector to the serial port of target device, and male power connector to the power supply of target device. Plug AC adapter output into "Serial Port over WiFi” DC input connector.

On your PC connect to “dihavSerialPort_XXXXXX” access point, device IP address in access point mode is “”.

Download the Windows application I uploaded here, and execute it on your PC. Type device IP, choose baud rate, stop bit, data bits, parity and click "Connect" button. Click “Allow access” button on “Windows Security Alert” window. You can send data by typing it into the box below "Disconnect" button as ASCII, hex or decimal and press related "Send XXX" button. Sent and received data will display in six boxes below "Send XXX" buttons.

There is an HTML-based interface that makes it possible to access serial port in a web browser on any OS. To access it type “” in the address bar of your internet browser and hit enter.

Step 7: Serial Data Forwarding

In many applications, there is a software that must connect to a device via serial port. To make this possible download com0com and install it on your PC. Create a pair of virtual ports choose one of them as the serial port in "dihav SerialPort over WiFi” software and select other in the software that controls your device. To establish connection press connect button.

Step 8: Connecting to a Router

You can also connect this device to a router instead of using it as an access point. To do this just browse to device settings page by typing “” into the address bar of your internet browser. On this page, you can change the device name, access point password and specify the router you want this device to connect to by typing its name and password. It is recommended to assign a static IP address to this device if you want it to connect it to a router. To find out how to do this just search the internet for “Assign static IP address ”. Note that if you connect this device to a router, the IP address is not "" anymore. To reset all these settings hold "Reset Passwords" button on the device for about 2 seconds.

Step 9: Serial Port Over Internet

Now we reached to the exciting part. To access serial port over internet search the internet for “IP forwarding ” to find out how to do this. Then forward ports 80 and 2321 of the device you made on the internet. Assigning static IP to this device will help you a lot in this step. Search for "My IP" in the Google, you can see your IP at the top of search results. It is the IP address that you must use it to access serial port from the internet.

Step 10: Directly Use WiFi in Your Program

If you want to make a program that directly connects to this device without using the software downloaded from step 6, use the following protocol, I've made for this device.

  1. Each [] is a byte.
  2. Baud rate on port 2321 is a 4-byte value that most significant byte will be sent first.
  • Connect:
    • HTTP (Port 80):
      • Request: POST con
      • bdrt=####&dbt=#&sbt=#&prty=#
      • Response: OK or ER
    • Port 2321:
      • Request: [1][bdrt][bdrt][bdrt][bdrt][dbt][sbt][prty]
      • Response: [0] or [1]
  • Disconnect:
    • HTTP (Port 80):
      • Request: GET dis
      • Response: OK
    • Port 2321:
      • Request: [2]
      • Response: [1]
  • Receive Data:
    • HTTP (Port 80):
      • Request: GET rec
      • Response: or ER
    • Port 2321:
      • Data bytes will be sent to a server created on the PC on port 2321.
  • Send Data:
    • HTTP (Port 80):
      • Request: POST snd
      • Response: OK or ER
    • Port 2321:
      • Request: [3][datasize(max255)]
      • Response: [0] or [1]
  • Test Connection:
    • Port 2321:
      • Request: [4]
      • Response: [44]

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    20 Discussions


    Question 6 months ago

    Hello, I have your code working on an ESP-12E Nodemcu V3 with a max3232 rs232 to TTL converter. Im trying to make a serial bridge to a PLC from the PLC software wirelessly. I have installed com0com and can get the PLC software commands to get as far as the ESP-12E. The ESP doesn't seem to be sending the commands through the converter to the PLC. I can see all the commands going through your software program but no returns.
    I was wondering if you have any suggestions.

    2 answers

    Reply 6 months ago

    Hi, Note that in a serial connection you must connect TX of side one to the RX of side two and RX of side 1 to the TX of side 2. I have no other idea, It must work.


    Reply 6 months ago

    Yes everything is correct, I'm chalking it up to a bad converter. New one on the way.


    Question 1 year ago on Introduction

    Hi I have a radio scanner I use a D 9pin serial lead to my pc to control is it possible to do this over bluetooth or wifi?
    Thanking you

    1 answer

    Reply 1 year ago

    Hi, It depends on the pins it uses. If it only uses the TX and RX it can be connected to this DIY device by an RS232-TTL converter. But if it uses other pins like DTR and ... you must change modify all parts of this DIY project (circuit, ESP8266 program, and Windows application) to make a wireless connection. Good Luck


    1 year ago

    Finally I flashed esp8266-01 ...
    I had one problem with ESP FLASHER and TESTER
    , I had to remove R4 and R5 and attach directly rx line to rs 232 adapter because I use 3,3 v.
    It work , thanks for shared this project

    1 reply

    Question 1 year ago

    Can I use Windows to flash esp8266?
    which program you suggest ?
    Which firmware i have to instal on esp8266
    Thanks in advance

    1 answer

    1 year ago

    Great job. Very useful application and it works. Thanks!

    1 reply

    2 years ago

    Amazing! even worked at first. I liked it a lot, it is very elaborate. Including all the possibilities of adjustment of serial port, makes that, it is a complete tool for communications. Thanks for sharing!!

    1 reply

    2 years ago


    great post. It is possible to put usb instead of the 3.5mm jack?
    also, can we connect mutiple usb devices?

    4 replies

    Reply 2 years ago

    Hi, No, USB and Serial Port (UART) are different. If you want the uses USB instead of Serial Port you must rewrite the program and write the code for recognizing all USB devices you want to connect to it. It is really hard work but not impossible. If you want to do this I advise you to use a raspberry pi or any other kind of mini-PCs with USB port and WiFi.


    Reply 2 years ago

    USB and Serial Port (UART) are different. If you want the uses USB instead of Serial Port you must rewrite the program and write the code for recognizing all USB devices you want to connect to it. It is really hard work but not impossible. If you want to do this I advise you to use a raspberry pi or any other kind of mini-PCs with USB port and WiFi.