The problem I am having is with the AT command it says it does not receive the right AT head format.
Command Info: https://reyax.com/products/rylr896/
ESP32 connecting via UART0 pins as UART2 is being used by another device. The radio only requires 2.8v to 3.6v and a max of 43mA. The 3.3v and 40mA should be enough power as the radio is responding with the error code. I can always use the vcc 5v and add a resistor to get the correct V if I need more power to increase transmitting range later on.
// Define the RX0 and TX0 GPIO pins for Serial0
#define RXD1 3
#define TXD1 1
// Define GPIO_PIN to supply the 3.3V needed for the radio
#define GPIO_PIN 23
#define RADIO_BAUD 115200
void setup() {
// Set up the GPIO pin 23 to supply power
pinMode(GPIO_PIN, OUTPUT);
digitalWrite(GPIO_PIN, HIGH);
delay(100);
// Initialize Serial0 for communication with the RYLR998
Serial.begin(RADIO_BAUD,SERIAL_8N1,RXD1,TXD1); //Serial0,UART0
delay(500);
Serial.println("\nSerial Setup Complete");
// Sending and Seciveing AT commands
Serial.println("Response: " + Serial.readStringUntil('\n')); //Response:
Serial.print("AT\r\n"); //Sending to radio
Serial.println("Response: " + Serial.readStringUntil('\n') + "\n"); //Response:
}
void loop() {
}
20:12:06.287 ->
20:12:06.287 -> Serial Setup Complete
20:12:06.287 -> Response: +READY
20:12:06.287 -> AT
20:12:06.287 -> Response: +ERR=2
20:12:06.287 ->