0

I am trying to personalize a screen depending on the person which stands in front of it.

My idea was to get the bluetooth adresses of their phones and check which of the devices is the nearest.

Because the project is already using a NodeMCU microcontroller, I wanted to add a HC-05 bluetooth module to the build.

Is there a way to check if a device is there if I have the full address without it being visible?

When I scan for devices with the AT+INQ command, I can only see visible devices (the bluetooth settings page has to be open).

DaBrot
  • 1
  • 1
  • Yes, there is a way. The simples one is to connect to SDP service. However it does not look like HC-05 supports such feature. So the other way is to try to query remote device name. If HC-05 executes real name reading than when device is turned ON the name can be read. If device is turned OFF - name reading should return error. Unfortunately I do not have any free HC-05 to test this but I hope it should work. – Mike Petrichenko Mar 23 '23 at 19:30

1 Answers1

0

I am answering my own question if someone stumbles across it.

Mike Petrichenkos comment on my question is the right approach. You can query the device name via the AT+RNAME command. If the device is not in range, the command fails.

Not every version of the HC05 module does support the command. I tested it with firmware version 3 (works) and version 4 and 5 (won't work).

DaBrot
  • 1
  • 1