Hello Mani
Not enough to go on!
507: Unable to connect. Is the device turned on?
That could be either the Bluetooth on your phone or the other device is not switched on. Also, Phone Location should be switched on (recent Google security measure).
Also this Block is wrong:

Use a Maths number Block here, content -1 to get all bytes available.
What is your App communicating with exactly?