i am not able to detect any android device on my bluetooth HM-10 module which is connected to arduino. i am able to see my bluetooth module on my android phone. but i want to see android phones on arduino serial monitor for that i used AT+DISC? command. it shows AT+DISCS and than AT+DISCE with a 2 second interval. help me to solve the issue thanks in advance
The HM-10 is a BLE-only device.
Android phones do not normally transmit BLE advertisements, so there is normally nothing about an Android phone for it to discover.
The exception would be if you have software on a late Android version with the capability, which you have set up to intentionally transmit BLE advertisements, or else if software you put on your Android phone is actively responding to advertisements you had the HM-10 transmit.
Essentially, you are expecting something that his not normal behavior, but will only be achieved by adding your software on both devices.
Detecting the physical Bluetooth layer is likely different from detecting the underlying protocol. So it might be that the Arduino code is waiting until it sees a specific Bluetooth protocol. I am guessing that it wants to use a serial Bluetooth protocol (as oppose to music or some other protocol). You have not given enough details to determine if this is the problem. However, I would next test your devices / hardware by loading up what is assumed to be working code on both your Android and your Arduino to test the connection. The code in this project looks promising: