Remove +INQ the beginning of the inquiry


I am beginner in programming and I need your help.
I'm building a project with arduino and bluetooth (HC-05), for the inquiry 2 bluetooth devices closer.

what I can do so far is to run this command:

"BTSerial.println ("AT + INQ"); "

And get a reply like:


What do I need to do now is to assign the address of the devices and the signal strength for Variables.

Var1 = 1D:FE:720479 Int1 = 7FFF
Var2 = 11:9:150673 Int2 = 7FFF

how to do it?
Thanks for your help
sorry for my bad english

If you have a string like +INQ:1D:FE:720479,7A020C,7FFF you can separate the parts using the strtok() function which will allow you to split it apart. strtok - C++ Reference

Alternatively, if the string is of fixed length and format then you can use the positions of the characters within the char array in which the string is held to extract the parts you need.