ESP32-PoE-ISO UART1 issue

Started by bartgrefte, May 17, 2026, 06:54:41 PM

Previous topic - Next topic

bartgrefte

My apologies for the kick.

@ninousf and @_AndreaS_ , did you end up solving it? Running the 16MB build of ESPEasy here, I'm trying to use the MOD-RS485-ISO with HW serial1 on GPIO's 36 (Rx) and 4 (Tx).

So far no luck.

LubOlimex

The way to test UART of ESP32-PoE-ISO is pretty simple, connect RX and TX (with a jumper wire with female-female connectors) and open terminal and type something and see if there is echo (e.g. what you type gets printed back). If there is echo - the UART is fine and the issue is somewhere else.

I think the issue is just wrongfully using MOD-RS485-ISO, it is not a basic bare convertor. It has a main microcontroller and own firmware, and while it can be used with Modbus or similar, it is meant to be used with own firmware and commands.
Technical support and documentation manager at Olimex

bartgrefte

Ah, there did my message go, a notification that it was split off to a separate topic would've helped ;)

Well, why does the MOD-RS485-ISO manual not indicate the LED's should be on in passthrough mode? It's only listed on the wiki, the LED's where off, since they (according to the schematic in the manual) are connected to the ICSP-connector I thought the LED's being off was normal.

Turns out the MOD-RS485-ISO wasn't set to factory default before shipping, a reset solved that, but not the actual problem.

Then I took my multimeter and checked if the RS485-side was actually active (voltage measurements), no problem there.

Just now I figured out why it is not working: According to the continuity mode of my multimeter, the UEXT-pin for GPIO36/U1RXD isn't connected to anything, which the schematic (rev M) seems to confirm. While both the GPIO4/U1TXD on UEXT and the side of the board and GPIO36 on the side of the board are actually connected to the ESP32.

Can you confirm that the schematic does not contain a connection between UEXT-pin GPIO36/U1RXD and the other GPIO36 and the ESP32?

LubOlimex

No, but I can confirm the opposite. Let me explain why you are measuring wrong:

1. Notice how we named GPIO36 as GPI36. This is not naming error. GPIO36 can only be input which is fine for RXD. This is the way the ESP32 chip and modules were designed, some pins can only be inputs. So GPIO36 actually can't be output or serve for TXD.

2. There is D4 SCHOTTKY diode to prevent parasitic powering over the RXD pin and act as protection.

3. I have no idea where are you looking at the schematic but the connection between GPI36 and the main module is visible. Here is an excerpt with wire path circled:



I believe the issue is somewhere in the pass part of the firmware, which is probably not a real problem for you, since you can use the I2C pins, but can be a problem for somebody that doesn't have the free pins.

Meanwhile, I will try to create simple Modbus demo for Arduino IDE to demonstrate using Modbus between two ESP32-POE-ISO boards and two MOD-RS485-ISO.
Technical support and documentation manager at Olimex

bartgrefte

#4
"GPIO36 can only be input which is fine for RXD"

I am aware of that, GPI(O)36 is selected for Rx1 (HW Serial1 in ESPEasy) and 4 for Tx1 and ESPEasy is also aware 36 is input only (there's an arrow next to it indicating input only, can't even select 36 as Tx). But that does not explain why a continuity test does work between the GPI(O)36 pin on the side of the pcb and the ESP32, but not between UEXT pin 4 (GPI(O)36/Rx1) and both the other GPI(O)36 as well as the ESP32, doesn't it?

"I have no idea where are you looking at the schematic but the connection between GPI36 and the main module is visible. Here is an excerpt with wire path circled"

I am looking at https://github.com/OLIMEX/ESP32-POE-ISO/blob/master/HARDWARE/ESP32-PoE-ISO-Rev.M/ESP32-PoE-ISO_Rev_M.kicad_pcb in KiCad, where I followed the trace and couldn't find a connection to the solderpad of UEXT pin4. That, plus the failed continuity tests and data being send but not received, made me think UEXT pin4 isn't connected to anything.

"I believe the issue is somewhere in the pass part of the firmware, which is probably not a real problem for you, since you can use the I2C pins, but can be a problem for somebody that doesn't have the free pins."

Well, I was planning on using the Rx/Tx pins since I2C will be used by other things.

"Meanwhile, I will try to create simple Modbus demo for Arduino IDE to demonstrate using Modbus between two ESP32-POE-ISO boards and two MOD-RS485-ISO"

I have been using ESPEasy for that, specifically plugin https://espeasy.readthedocs.io/en/latest/Plugin/P078.html , but instead I also tried the serial server and then ModBus Poll on Windows through a virtual comport. Again, data is being send, nothing received.

bartgrefte

As for the schottky diode, I did a continuitytest over the diode, beep in one direction, no beep other way round. No beep between UEXT pin 4 and GPI(O)36 pin on the side of the board, in either direction.

LubOlimex

#6
Well, read again slowly your last reply. Voila. That is how Schottky diodes work - it blocks current from travelling in reverse direction and also why the Schottky is fine on GPI36 (it has only one direction).

Just take my word for it - there is a hardware connection between ESP32 module pin #4 and UEXT pin #4 and it is visible in both the schematic and the PCB. It is not a straight wire, it has a diode on its way, and there is also pull-up resistor on the wire....

Listen, just do the following test, it is the easiest test, which people that test UART do first:

- Connect RX to TX via jumper wire like this:



- Open Arduino IDE, install the ESP32 support for Arduino and use this code:

uint32_t c = 0;

void setup() {
  Serial.begin(115200);
  Serial2.begin(115200, SERIAL_8N1, 36, 4);
}

void loop() {
  Serial2.printf("P%lu\n", c++);
  delay(500);

  if (Serial2.available()) {
    Serial.println(Serial2.readString());
  } else {
    Serial.println("BREAK");
  }
}

- Download it to the board, refer to my settings (you'd have different COM port):



- Open serial monitor - you'd see pX every half a second; remove one side of the wire, message will change to BREAK, connect it back pX will resume again. Like here:



Now when it is clear that issue is not with the UART. You'd realize the problem is elsewhere, it is in the compatibility between MOD-RS485-ISO's firmware and the software libraries (ESPEasy, Modbus) you'd want to use.

Honestly, after analyzing and working on this for a few hours I don't think the default firmware of MOD-RS485-ISO would work with ESPEasy or Modbus - the main problem is that the board is designed for full duplex and ESPEasy and Modbus are made for half duplex; standard libraries like Modbus, ESPEasy, etc. expect either a dumb transceiver with controllable DE/RE or an auto-direction adapter. The firmware gives them neither in default pass mode. Also the firmware of MOD-RS485-ISO is like an alternative of ESPEasy and Modbus, it was made for people that want to use simple commands. There is no point of using MOD-RS485-ISO if you are going to use Modbus, that is what I am saying, since MOD-RS485-ISO has more hardware than required, and it is more expensive than a dumb transceiver. Like all possible ways forward are:

- Get another simpler RS485 transceiver and leave MOD-RS485-ISO for another task that doesn't require ESPEasy or Modbus;
- Use MOD-RS485-ISO without ESPEasy with its own commands, implement similar behavior to what ESPEasy does;
- Re-write parts of ESPEasy/Modbus so that it is compatible with MOD-RS485-ISO;
- Re-write the MOD-RS485-ISO firmware.

The software effort to modify ESPEasy or the firmware would be huge and would require a lot of knowledge.

That being written, take into account that the software of MOD-RS485-ISO is open source and sources are available to improve and study and modify.
Technical support and documentation manager at Olimex