I am using the note-arduino library, with an ESP32-S3 microprocessor, in my cellular IoT prototype. I use UART1 to talk to the Notecard. The ESP32-S3 supports reassigning serial ports to most any of the GPIO pins, and my PCB design takes advantage of this feature. The Arduino code would be Serial.begin (9600, 8N1, RX_PIN, TX_PIN);
The Note-arduino does not support the pin number arguments in Notecard.begin() but I’ve been able to succeed by defining them with this workaround code:
BUT beginning with V1.6.0 of the library, the workaround stopped working! I can see in the library that a Serial.end is now being issued before Serial.begin. This must be wiping out my pin definitions, I’m stuck on V1.5.4 of the library and worried my product will stop working in the future.
So I’m entering this as a fix/enhancement request: support optional definition of alternative Serial port pins in the Notecard.begin() function.
Apparently, ESP32 has extended the standard Arduino begin() method (shown below), and this is the source of the problem. I believe the bug you are experiencing is a side effect of Espressif’s implementation.
The standard Arduino HardwareSerial::begin method does not allow you to declare the pins, only a baud and configuration.