cross-posted from: feddit.org/post/21185587

So I am working on an Arduino project and have trouble communicating over UART.

I have a SIM7600G-H 4G Module from Waveshare and hooked it up to an Arduino Nano ESP32. The connections are as follows: SIM7600 <-> ESP32 TXD <-> RX0 RXD <-> RX0 VIN <-> VUSB GND <-> GND CTS <-> D3 RTS <-> D12

It mostly works, I can send AT commands and receive responds. However sometimes I only receive parts and chunks are missing or being send to the next command. I strongly suspect RSPs (“unsolicited result code”) to be the reason behind it. As documented in the manual RSPs are being send without an implicit action and happens for example if the module receives a call or SMS.

I have read about hardware flow control which seems to theoretically solve the problem of those module talking over each other and have connected the CTS and RTS pins to generic digital pins. According the manual the SIM Module it has hardware flow control enabled as an default.

On the Arduino side of things I have added these lines in hopes of enabling it, however I do not see a change, they do not return any error but I still see data missing. I have also tried swapping CTS and RTS just for fun, but without any luck.

Serial0.setPins(-1,-1,12,3);
Serial0.setHwFlowCtrlMode(UART_HW_FLOWCTRL_CTS_RTS);

Has anybody on here have more experience with UART? Maybe I am better off implementing flow control myself. It might be not too much work, however as there seems to be an API for that I wanted to try that out first, I expected the Serial0.print(message) to wait until the SIM module is not busy and vice versa.