Hm10 details (#614)
* Add infos and change HM10 speed to a macro * remove unnecessaries macros
This commit is contained in:
1 parent
489ce99659
commit
f6fa1e52da
3 files changed
+11
-11
No files matched your search
+1
-7
@@ -665,12 +665,7 @@ bool BTtoMQTT()
|
||||
#else // arduino or ESP8266 working with HM10/11
|
||||
|
||||
#include <SoftwareSerial.h>
|
||||
|
||||
#define STRING_MSG "OK+DISC:"
|
||||
#define QUESTION_MSG "AT+DISA?"
|
||||
#define RESPONSE_MSG "OK+DISIS"
|
||||
#define RESP_END_MSG "OK+DISCE"
|
||||
#define SETUP_MSG "OK+RESET"
|
||||
|
||||
SoftwareSerial softserial(BT_RX, BT_TX);
|
||||
|
||||
@@ -686,7 +681,7 @@ void setupBT()
|
||||
Minrssi = MinimumRSSI;
|
||||
Log.notice(F("BLEinterval: %d" CR),BLEinterval);
|
||||
Log.notice(F("Minrssi: %d" CR),Minrssi);
|
||||
softserial.begin(9600);
|
||||
softserial.begin(HMSerialSpeed);
|
||||
softserial.print(F("AT+ROLE1" CR));
|
||||
delay(100);
|
||||
softserial.print(F("AT+IMME1" CR));
|
||||
@@ -702,7 +697,6 @@ void setupBT()
|
||||
|
||||
bool BTtoMQTT()
|
||||
{
|
||||
|
||||
//extract serial data from module in hexa format
|
||||
while (softserial.available() > 0)
|
||||
{
|
||||
|
||||
@@ -35,6 +35,7 @@ extern void MQTTtoBT(char * topicOri, JsonObject& RFdata);
|
||||
#define MinimumRSSI -100 //default minimum rssi value, all the devices below -90 will not be reported
|
||||
#define Scan_duration 10 //define the time for a scan --WARNING-- changing this value can lead to instability on ESP32
|
||||
#define HM-10
|
||||
#define HMSerialSpeed 9600 // Communication speed with the HM module, softwareserial doesn't support 115200
|
||||
//#define HM-11 // uncomment this line if you use HM-11 and comment the line above
|
||||
//#define HM_BLUE_LED_STOP true //uncomment to stop the blue led light of HM1X
|
||||
#define BLEdelimiter "4f4b2b444953413a"
|
||||
|
||||
Reference in new issue
Block a user