Serial wireless bridge (not full spec RS232)

Technically this project has nothing to do with HA, it would be just tool to have a remote Arduino MySensors Gateway.

This thread was actually started on Tasmota on Sonoff Zigbee Bridge - Unable to flash zigbee module because I was having problems installing the Tasmota ZBBridge program on my ESP-12F.

So this thread actually starts with the 14 Jan 2026 entry and continues here after @ShadowFist posted. Thanks for the reply, @ShadowFist!

I see that I didn’t explain my project.

My goal is a wireless RS232 cable. That is: connect RS232 the RX/TX of the ESP-12F (powered by 3.3V power supply, EN to 3.3V, GPIO15-10kΩ-GND). Connect the other end similarly. For testing the two ends have a PuTTY terminal emulator.

Tasmota ZBBridge seemed to have that capability.

There is no Zigbee involved. I understand that Zigbee is a wireless mesh network. This is not what I’m try to achieve. I have a long RS232 cable and I want to make it wireless. Yes, I see that I would be using WiFi; I’m OK with that. (I can connect to an access point that is not connected to the internet, th sole purpose of which is to facilitate the bridge.)

As I currently have it configured, the ping command from the console of either side confirms that both are connected to the network.

My next step is to try a slower BAUD rate, but I sincerely doubt that this is the problem.

I admit this is old, archaic, obsolete tech, but there are plenty of old devices that can be repurposed if there were an RS232 connection.

But I need help.

-OSD

Using 9600 BAUD had the same results: no data transfer.

Im sure the mod will merge them.

RS232 is the mechanical and electrical way things are connected - a standard. It is commonly used to denote a serial connection, but doesn’t have to. It describes a physical layer in the seven level OSI model.

Show your code. [Formatted </> please] for both ESP12F devices. Also show your wiring.

Serial is everywhere. Your USB cable, your internet connection, your ZigBee connection. You just don’t see it as it happens on a different level. Even your ESP does it for WiFi.

Usually RS232 is used to connect things together. What is your end use? What are you trying to achieve - to connect to? What’s at the higher layers of the OSI model? There may be a more elegant approach.

These devices are readily available. Amazon is a good source. Here’s an example Monoprice unit that supports wired or wireless. Amazon.com: Monoprice 6-Zone Home Audio RS-232 to IP Adapter : Electronics

I found this page Serial communication over TCP - TasmoCOM
which implies that using the default ESP-12F serial port (GPIO 1 & 3) won’t work. The author used GPIO 13 and 15, but requires a 2.2kΩ between 12 and 15 and a schottky diode between 15 and the RS232 serial cable/device.

RS232 voltage swings are defined as +/- 12 volts DC. Your ESP does not support those voltages without translation.

Asking again. You may be solving the wrong problem.

I appreciate your comment, @mterry63 ! It is important to note this information for people that are looking to do the same or similar.

I am cost conscious and retired and it is my hobby to find the most cost effective reliable solution. Also I have found that devices like the one you link are often suspect. Note that it has bad ratings, there is no link to a manual, probably does not come with a power supply, and two are required. Amazon is caveat emptor, too.

Here’s my material list:

Power supply (2x) ~$5
Power cord ~$4 (easily found for free)
ESP-12F (2x) ~$5
10kΩ (2x), 2.2kΩ (2x), schottky diode (2x), hook up wire, solder, etc. ~$2
3D printed box (2x) ~$5

So <$20 compared to $170, though Amazon is fast delivery and is easy to return.

Is that power supply supplying 3.3volts for your ESP as well as +/-12 volts for your RS232 components, or are you using three of them, or is your design not actually RS232 compliant?

Note that some devices are not fully RS232 standard compliant, relying on the device on the other end to sense a small voltage swing instead of the full voltage swing specified in the standard. In this case your device will fail to communicate, or perform unreliably if it doest have that negative swing.

From the simple circuit you have linked to, it looks like it is one of those. In which case, why do any voltage translation - just link the TX of one ESP direct to the RX of the other and vice versa and one common ground - three wires on each end. Of course, cable length and crosstalk and noise quickly become an issue, which is why the RS232 standard requires such large voltage swings to function reliably over any reasonable distance.

FWIW, I have one of those connected to monoprice amplifier and it works perfectly. Of course that’s the use case they sell it for. I find that RS-232 requires too much technical knowledge for the non-technical buyer.

If you open it up you’ll find it’s an ESP with level shifters.

I understand the interest in building to make it cheaper, but sometimes you just don’t want to spend the extra time.

RS232 standard has been around for more than half a century. Well documented and widely understood. Since superseded by faster methods such as USB and RS485, yet still widely used in industry.

Nearly every processor chip supports one or more serial ports - it is a fundamental part of how they communicate with the outside world.

The trick is how they are connected, both physically (RS232 is but one option), and logically (speed, handshaking, number of bits, error correction, and the suchlike)

If the two devices connected match, you communicate. If they don’t, you may get garbage, or at worst, smoke.

In my case, I want to connect an Arduino Nano MySensors Gateway to HA, but do it wirelessly. I envision: Nano–(Serial)->ESP-12F–(WiFI)–>Router–(WiFi)–>ESP-12F–(Serial)–>Serial-to-USB–>Host Computer–>Virtual Box–>HA–>MySensors Integration. The Nano is powered by a 90-240VAC to 5V power supply, The associated ESP-12F is powered from the 3V3 of the Nano (I haven’t tried this yet). The other ESP-12F is powered by the Serial-to-USB (this works)

All of the serial connections are at the same voltage levels. I should have used the term Serial instead of RS232 which implies a specification. I’m pretty much using the hardware and transport layers. The higher levels are in the Arduino and HA.

The advantage of the Nano Gateway over the ESP Gateway is the the Nano has more analog ports and is not as sensitive to over voltage, but does not have WiFi. The two working together make a good team.

This is what I do, but there are complications on the ESP side (See Serial communication over TCP - TasmoCOM reference above)

A very good reason to go wireless instead of a very long cable.

That’s why I’m documenting this here so that the next person doesn’t have to take the time.

And it’s good that people ask these questions and make comments to ensure that the next person understands the nuances of the challenge.

I fully appreciate the dialog and I’m sure others do, too.

1 Like

Why bother with the two lots of translation? How about a shield on your Nano that has Ethernet and just go straight to your HomeAssistant server across your LAN? A shield that has a ESP8266 or ESP32 directly on it, all the pinouts and voltage matching done for you.

Alternatively, connect your Nano to one ESP-12F, TX to Rx, and Rx to TX and have that connect wirelessly to your WiFi router, sending data as correctly structured MQTT packets, directly to your Mosquitto integration in HomeAssistant, similar to those more recent boards like the “Nano ESP32” that has both chips on the one board, with one power supply, matching pins etc. No ESP-12F needed at the other end. The data arrives, correctly formatted, on the correct port, wirelessly as required.

In any case, you will have to structure your data flow from your Nano in a controlled fashion so it can be forwarded correctly to the network, either via Ethernet, or WiFi to end up in a format HomeAssistant can interpret. Separate programs for each processor, working together.

What are you sensing? What is connected to your Nano? Is an analog expander port added to a ESP32 over I2C (oh no, not another serial protocol) going to be a better option, getting everything onto one processor chip?

Eat your chocolate elephant one bit at a time. Plan carefully what you want to achieve and then get each part working well independently, and then fully integrated.

Late update while browsing: Does this sound like your solution? Yes, it uses I2C, a faster serial protocol, mostly used for interchip communications and the power of ESPHome to get directly into your HomeAssistant ecosystem. The Nano programming part is already done for you.

Yes! that was considered, but the cost of the ethernet “shield” is more than two ESP-12F’s and the serial-to-USB.

MySensors is actually an amazingly powerful environment, the discussion of which is outside the subject of this thread. I suggest you read up on it. In reference to your protocol concerns, read MySensors Gateway and MySensors HA integration

I have several MySensors applications; one is my Low Cost Energy Meter

The Arduino Port Expander/ESPHome to which you refer is essentially the MySensors environment without the ESPHome overhead (just the MySensors overhead :).

MQTT gateway on your ESP12?

The MQTT is the ‘glue’ that enable both ecosystems to share common data.

Yes! MQTT Gateway can also be build[sic] on a ESP8266 module.

Of course the MQTT broker is somewhere else, perhaps enabled in HA.

Not always true, as in the case of the Serial Gateway, thus the idea for the serial over WiFi

You might want to look at these two projects as they may do what you want :-

I’m trying to do something that sounds similar. I have an old APC UPS with only a serial connection that is used in a room a distance away from my Home Assistant pc, so that running a serial cable to it isn’t easy. I want to get it to show in Home Assistant using the APC integration like I do with my other two APC UPS that have network cards fitted. I was hoping to connect an ESP to it using something like one of those projects, but haven’t been able to get it to work correctly. The serial information is being sent and received but it is being corrupted in some way so that the readings are useless. I’m still trying to get it to work.

My limited research was not conclusive. Is your APC serial interface TTL levels (0-5V) or RS232 (-12 - 12 V) signals.If the latter, you would need a level converter.to TTL levels to get it to talk to the ESP.

I have linked two important documents Serial communication over TCP - TasmoCOM and Serial to TCP Bridge which I am going to use to develop my concept. I am lacking a schottky diode so I ordered one. (actually, quite a few)

I looked at the GitHub pages and they are a little too light on detail for me to make heads or tails of them. Part of my problem is I don’t use nor understand the reason for ESPHome. I use MySensors or Tasmota for device reading and control

I’ll be back after I’ve wired up and tested.

Check which pins from the RS232 are being used for the UPS. Some are not serial at all, but just a state - on or off. RTS, CTS, DTR, DSR, DCD, RI are all potential signals, and each vendor uses different combinations. You may be able to just connect directly to a GPIO pin rather than do serial decoding.