I want to find all the Bluetooth addresses of connected devices using an HC-05/HC-06 Bluetooth module and an Arduino. I can't find any code related to this. Basically I need the addresses to put in an array. Is it possible to do this with an HC-05 or 06?

  • This question isn't really about Arduino, and the goal expressed in your responses to answers of having someone supply the entire unspecified solution isn't really compatible with the specific-question model of the Stack Exchange sites. Your city has several hackerspaces and similar creative communities, perhaps you would find it interesting to visit one of their open days and get a sense of how people create things like this, for themselves or as work projects. Alternatively, to get help on this and related sites, questions need to be about a specific, singular on-topic goal. Apr 1, 2017 at 19:00

2 Answers 2


The HC-05 has an AT command, AT+BIND?, that will tell you which slave device it is connected with currently. Since you can connect to one device only at the same time, your array is going to be a very short one.

AT+INQ will provide you with a list of nearby devices, to which it can connect.

  • can you please send me the entire code as i m new to arduino. It will be very helpful. Thank you. Apr 1, 2017 at 6:27
  • 3
    @OliviaJohnson Anyone can send you the entire code and do the job for you, if you accept to hire them for this task. StackExchange is not a site for that: you need to demonstrate what you have tried so far.
    – jfpoilpret
    Apr 1, 2017 at 11:01

You just have to send the above Bluetooth command via serial port to your Bluetooth module using print command.

For example yourserial.print("AT+BIND?"); OR yourserial.print("AT+INQ"); if you are using SoftwareSerial. Otherwise just use Serial.print("AT+BIND?"); OR Serial.print("AT+INQ"); when using Rx/Tx pins. That will do the job.

  • thanks. but can u also tell me which sensor should i use for this project Apr 1, 2017 at 7:55
  • and also please provide the entire code Apr 1, 2017 at 7:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.