I have developed an application on Android, which connects to a Bluetooth HM10, launches commands, and turns LEDs on and off through my Arduino. All of this works properly.
So, I want to make Bluetooth secure, so that nobody can connect to it, and keep it busy and I can't connect myself.
To do this, from my Serial Monitor I execute the corresponding configuration commands, but I never get it to link correctly on my Android.
I have tried many options, to no avail:
OPTION 1)
- AT+ROLE? = Ok+Get:0 (Slave or Periphe)
- AT+TYPE2 = Ok+Set:2 (Auth with PIN)
- AT+PASS123456
- AT+RESET
OPTION 2)
- AT+ROLE? = Ok+Get:0 (Slave or Periphe)
- AT+TYPE3 = Ok+Set:3 (Auth and bond)
- AT+PASS123456
- AT+RESET
In both cases (and more failed tests), I see the BLE device on my Android Bluetooth. I give it to connect and the window to enter the password pops up. I introduce 123456 And it always tells me that it could not be linked.
Any ideas for why?
Thank you.
AT+PASS123456
. Perhaps the space is part of the PIN in your case. Just a guess. Also, the question mark after PASS is used (AFAIK) to read the PIN, not to set it. Just some guesses, without knowing much about AT commands. Perhaps it works. Cheers.AT+PIN123456
.