How do I scan for Bluetooth devices

I have a hc05 and a hm10 bluetooth Module. Both are from china. I got the AT Commands working but I are not able to show me bluetooth devices around me.
I try to scan for my samsung galaxy s7. If the strenght of my galaxy is high i want to do some Code.

If it is not possible i wamt only scan for the galaxy and if it has bluetooth enable i want to do somecode.

On the hc05 and the hm10 I tried AT+INQ BUT I got an error. Same with AT+INIT.

Is it possible to scan for Bluetooth devices?

aggro600:
Is it possible to scan for Bluetooth devices?

I don't know the answer but it seems to me a much better title would be "How do I scan for Bluetooth devices?". Then maybe someone who knows the answer would respond.

If you edit your Original Post you can change your title.

...R

Thx you are right

You can programme HC-05 to auto-connect to a known bluetooth device, usually another HC-05. I assume it also works for a phone. In the case of HC-05, I believe AT+INQ has to be preceeded by preliminary commands.

I did the same as the guy from your link.

AT-Kommando-Modus =>
AT+RMAAD
OK
AT+ROLE=1
OK
AT+RESET
OK
AT+CMODE=0
OK
AT+INQM=0,5,9
OK
AT+INIT
ERROR:(17)
AT+INQ
ERROR:(1F)

but AT+INQ gives me always the same error

i tried it with Pin 34 High und Low

Why don't you use phone to scan for bluetooth, instead of bluetooth scan for phone?

I purchased a similar device, HC-05 which does not respond to all the AT commands. Specifically the AT+INQ & AT+INIT. Both returned errors.

I was able to find the hardware address of the slave I wanted to connect to and paired it successfully using the AT commands and did not realise it was actually paired. Look at the LED. For AT commands it blinks one long blink every 5 seconds, for no pairing it blinks about 5 times every second, and when paired blinks two short blinks every 5 seconds. Without this information I did not know it was actually paired.