D
Deleted member 103
Guest
Hi,
I've been ordering my BLE modules from Aliexpess for a long time, and until a month ago I had no problems with them, everything works perfectly.
But for a month now, everything I order no longer works, although the Bluetooth modules look the same.
It is about 50 pieces of "AT-09 BLE Bluetooth 4.0" where the name and the baud can no longer be changed.
I've always used this script below to change the name and baud.
Maybe someone has already had the same experience here and has a solution, that would be great.
I've been ordering my BLE modules from Aliexpess for a long time, and until a month ago I had no problems with them, everything works perfectly.
But for a month now, everything I order no longer works, although the Bluetooth modules look the same.
It is about 50 pieces of "AT-09 BLE Bluetooth 4.0" where the name and the baud can no longer be changed.
I've always used this script below to change the name and baud.
Maybe someone has already had the same experience here and has a solution, that would be great.
B4X:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
void setup() {
// put your setup code here, to run once:
mySerial.begin(9600);
Serial.begin(9600);
sendCommand("AT");
sendCommand("AT+NAMEMyName");
sendCommand("AT+BAUD8");
}
void sendCommand(const char * command){
Serial.print("Command send :");
Serial.println(command);
mySerial.println(command);
//wait some time
delay(100);
char reply[100];
int i = 0;
while (mySerial.available()) {
reply[i] = mySerial.read();
i += 1;
}
//end the string
reply[i] = '\0';
Serial.print(reply);
Serial.println("Reply end");
}
void loop() {
}