ESP-CAM serial connection to SIM800L

Hi All,
I hope someone can give me a hint to help getting unstuck from this very strange situation.

I am trying to connect an ESP-CAM to a SIM800L via serial using UART2 but I can't receive anything back from the SIM800L.
What is driving me to pull my hear out is that if I use the same wiring to connect the ESP-CAM to an Arduino UNO with a simple echo program, it works well. If I connect the Arduino to the SIM800L it also works well. But the ESP-CAM to the SIM800L doesn't produce any results. What is the difference I'm missing?

The SIM800L is powered from its own source. It turns on fine and blinks as it should, so it's alive. I connect GND to the ESP-CAM GND, SIM800L TX to ESP-CAM GPIO16 and SIM800L RX to ESP-CAM GPIO 13.
The ESP-CAM is connected to my computer using an FTDI interface, using 5V (I also tried 3.3V with the same results).

Here is the program I'm using, then I use the Serial Monitor to send an 'AT' command, expending the SIM800L to respond with 'OK', but the result is nothing.

#include <HardwareSerial.h>

HardwareSerial mySerial(2);

void setup() {
  Serial.begin(115200);
  mySerial.begin(115200, SERIAL_8N1, /* RX */ 16, /* TX */ 13);
  Serial.println("$ Setup done");
}

char c;
void loop() {
  while (Serial.available()) {
    c = char(Serial.read());
    mySerial.print(c);
    Serial.print(c);
  }
  while (mySerial.available()) {
    Serial.print(char(mySerial.read()));
  }
}

Same idea using an Arduino UNO - except using SoftwareSerial and GPIO 10 and 11 - works well, 'AT' results on an 'OK'.

Flashing a super simple echo program on the Arduino UNO and connecting that to the ESP-CAM, using the Arudino's GPIO 0 and 1 (hardware serial), with the same wiring and program on the ESP-CAM works fine, receives the results no problem.

Maybe there's some electrical difference that the UNO is resolving better than the ESP-CAM?

I'm completely lost, any ideas greatly appreciated.

Julian

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.