Bluetooth Eror: 507 in EV3 app

I am new to App Inventor, but have taken on the task of implementing an application to control an EV3 robot. And during the testing of the application I had a problem Error 507: Is the device turned on? Solutions from the forum did not help me, I tried through the UUID but alas could not find the uuid for the Samsung Galaxy M11. The application code is attached below

Excuse my English, I am not from an English-speaking country.

EV3_App.aia (8.4 KB)
This is the aia file of my project. I hope this attachment will help you solve my issue.

Dear @junior1,
welcome to the community.
In your post you talk about UUID, which is typical for BLE BT devices, but in your code you use the blocks relevant to the standard BT devices.
I'm not aware of what kind of BT is used in the EV3, but before going further, you should better be sure of the type of interface is used by your robot.

I found this information "

Starting around July 2015, LEGO started shipping EV3 with a different Bluetooth chip. (Running hciconfig -a shows that the new chips have BT 4.0, but they do not actually support BTLE)."

But what does this mean? Does my code work?

I haven't tested it on a real robot.

According to what you have found, EV3 does not support BLE, but the standard BT, then your code is correct..
Therefore you have neither UUID nor Services to set.
The error message says that there is no link between your phone (I suppose that you want to connect it with the EV3) and the Robot.
At system level have you paired the phone with the robot ? That is: in the BT configuration of your phone are they paired ? without this pairing before, the app you developed cannot connect the EV3.

Thank you! It really work on robot.

Dear @junior1 ,
nice to read from you again, and glad it's working. Have fun !