I would like to add custom AT command to my Heltec Cube Cell module,
can someone provide details how to develop/add custom AT commands?
User-owned AT commands
Try this
bool checkUserAt(char *cmd, char *content)
{
if (strcmp(cmd, “BATTERY”) == 0)
{
if (content[0] == ‘?’)
{
uint16_t BatteryVoltage = getBatteryVoltage();
Serial.print("+BATTERY=");
Serial.print(BatteryVoltage);
Serial.println();
}
return true;
}
if (strcmp(cmd, “LED”) == 0)
{
if (content[0] == ‘?’)
{
Serial.print("+LED=");
Serial.print(LoraWan_RGB);
Serial.println();
}
return true;
}
return false;
}
Thank you for reply it helps a lot
When cube cell is in low power mode it give following error for command,
using “LoRaWan_downlinkdatahandle” example
DR=1
[00]ASR is Waked,LowPower Mode Stopped
DR=1
+ERROR: error input format
so, is there anyway to use your code with low power mode? how to change low power mode to normal mode?
You have to wake up the cubecell before you can type in at commands.
The first command will wake the cubecell after that all command will function until the cubecell will go to sleep again
i’ve remove the LoRaWAN.sleep() from the calling but device returns the same error
DR=1
[00]ASR is Waked,LowPower Mode Stopped
DR=1
+ERROR: error input format
Dont remove the sleep.
Just type in the commands two times in your serial console