What is Error 511: could not fit"" into 1 byte in app so what is actual problem to solve and where to modify

to connect Bluetooth module

As a blind guess, I imagine you are feeding a BlueTooth SendBytes block an empty text instead of a list of numbers in the range 0-255.

Show us?

Please download and post each of those event block(s)/procedures here ...
P.S. These blocks can be dragged directly into your Blocks Editor workspace.

See Download Block Images for a demo.