Here is a sample conversion procedure and a sample call using your codes...
All blocks are draggable into your Blocks Editor.
Notice that a single SendBytes call replaces your sequence of single byte calls.
Try it and let us know if it works for you?
P.S. I improved on the parameter name, changing it from hex to hexText , but it didn't stick to the board post. Change it manually if you like.

