Heltec CubeCell - send AT commands programmatically

I want to send to the CubeCell AT-Commands by Code.
For example Serial.write(“AT+XXX\r”) doesnt work.
Any ideas how to solve that?

Thanks a lot in advance…

Try sending without the carriage return

No, that has no effect…

That about defining the commands as char ?

Something like:

char command1[] = “AT+XXX”;

and then

Serial.write((uint8_t *) command1);

Didn’t tested this one - only as a rough thought about your problem…
Perhaps you could create a string with the “base” ‘AT+’ plus the actual command ‘XXX’.
Don’t forget to include

#include “string.h”

at the beginning.

Example may be like that:

char start[]=“AT+”;
char command[]=“XXX”;
char end[] = “\r\n”;
Serial.write((uint8_t *) start);
Serial.write((uint8_t *) command);
Serial.write((uint8_t *) end);