From dca93e053d4d2f53d006b758696df86a6538678d Mon Sep 17 00:00:00 2001 From: Dawid Cieszynski Date: Sun, 12 Nov 2017 19:27:07 +0100 Subject: [PATCH] bluetooth feature --- src/TinyGsmClientSIM800.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/TinyGsmClientSIM800.h b/src/TinyGsmClientSIM800.h index 6eaf63d..074dddc 100644 --- a/src/TinyGsmClientSIM800.h +++ b/src/TinyGsmClientSIM800.h @@ -331,6 +331,28 @@ public: return true; } + bool enableBluetooth() { + uint16_t state; + + sendAT(GF("+BTPOWER=1")); + if (waitResponse() != 1) { + return false; + } + + return true; + } + + bool disableBluetooth() { + uint16_t state; + + sendAT(GF("+BTPOWER=0")); + if (waitResponse() != 1) { + return false; + } + + return true; + } + /* During sleep, the SIM800 module has its serial communication disabled. In order to reestablish communication pull the DRT-pin of the SIM800 module LOW for at least 50ms. Then use this function to disable sleep mode.