Here is a revamped framework, which you can customize in the handleA and handleB procedures and extend further with your own message types.
I do not advise touching the other parts, because they require a knowledge of lists that I have not seen in your code yet.
BLE_Test_ABG.aia (179.2 KB)
All blocks are draggable into the Blocks Editor.




