D
#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() {
}
I have already bought at various sellers at Aliexpress and even at Amazon, in total I have more than 60 pieces, and nobody works.I had a similar issue with a HC05. The name was impossibile to write, reported null name. Seems than the flash memory was non working.
I've always used this script below to change the name and baud.
Thanks for your answer, but the problem is described here:Hi, you can do a test, to see if the problem is in the code or it is the module.
Open the arduino serial monitor, sending the commands and also setting the nl \ cr.
my 2 cents
I have always bought it to the same seller, but for a month I always get the wrong one.Then you should buy the version 4.1, or it isn't available anymore?
It looks the same, but I look at it again exactly.Your modules have the same hardware (chip)?
I'm reading hereThe modules look the same and the chip is also the same.
View attachment 112361
Thank you very much, but I already know this website, unfortunately it didn't help either.I'm reading here
MLT-BT05 BLE module – a clone of a clone?? | Arik Yavilevich's blog
Previously I covered the HM-10 Bluetooth Low Energy (BLE) module and its clone, the CC41-A. Those are two popular modules that allow simple BLE communication through a serial interface and are handy with Arduinos and other hobby micro controllers. Make sure you read that article first as it...blog.yavilevich.com
BleManager.Scan2(Array(FFE0), False)
BleManager.Scan2(Null, False)
BleManager.Scan2(Array(UUID("FFE0")), False)
'utility to convert short UUIDs to long format on Android
Private Sub UUID(id As String) As String 'ignore
#if B4A
Return "0000" & id.ToLowerCase & "-0000-1000-8000-00805f9b34fb"
#else if B4I
Return id.ToUpperCase
#End If
End Sub
Oh I see.Problem solved!
The problem was in B4a
Hi Erel,Try it with:
B4X:BleManager.Scan2(Array(UUID("FFE0")), False) 'utility to convert short UUIDs to long format on Android Private Sub UUID(id As String) As String 'ignore #if B4A Return "0000" & id.ToLowerCase & "-0000-1000-8000-00805f9b34fb" #else if B4I Return id.ToUpperCase #End If End Sub
Private FFE0 As String = "0000ffe0-0000-1000-8000-00805f9b34fb"
Thanks for the hint, I'll try it.Oh I see.
Next time use the "App nRF connect" to test the hardware. Very usefull.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?