If you carefully examine the exception you see its actually an BluetoothConnectionExpetion,
BluetoothConnectionException (JSR 82 Bluetooth API and OBEX API)
And according to the javadocs the "security block" means: Indicates the connection failed because the security settings on the local device or the remote device were incompatible with the request.
Though I have noticed that you get this exception when the actual device is out of range. I have some code that are using connects to detect if a device is in proximity or not. The reason to do it with a connect is because I drop any connection if I do a discovery, while i do not drop other connections while attempting connecting a device.
Anyway shouldn't the exception rather be Timeout instead when a device is not in range? Reading the docs it sounds like the one to expect: "Indicates the connection to the server failed due to a timeout."