Your options are:
As you guessed, you could set the name with
AT+NAME=
, and only use the names matching some pattern. It would work if you're only user so you just want to ignore other BT devices, but is problematic if you're having multiple independent users (each with its different set of HC05s) who might be in range (you could set different pattern for each user, though).build a database of addresses (read-only with
AT+ADDR?
), and only access those devices that are belonging to that user. It would avoid problem above with multiple users, but would require some logistics on your part (for example, when you sell user the app and HC05s, in the registration process you'll need to assign exactly which HC05 address that user my access. Or you might want to allow user to pick which devices are his, by having him specify specify PIN for pairing set withAT+PSWD=
)third way is to use custom Inquire Access Codeuse custom Inquire Access Code instead of GIAC so only that set of devices is scanned. HC05 allows setting it with
AT+IAC=
. However, as it is more complex and nonstandard that (2), and you'd probably still need to registration to differentiate which user is allowed which IAC, I'd recommend you do (2) instead.