I am using prefix mode to send a test array to an ESP32 using code I have used before without issue and based on B4r tutorial
Send array
The receiver code is
This is the only response
From PAD
4950515253545556
Out of bounds error. Array length = 40, Index = 65535
So the data is arriving, the problem seems to be in ConvertBytesToArray
I found someone else had this issue with Bluetooth resolved by Baud rates
I have also increased StackBufferSize =600
Any ideas please
Send array
B4X:
Dim SendArray(8) As Byte = Array As Byte(0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38)
The receiver code is
B4X:
Log("From PAD")
Log(Buffer(0),Buffer(1),Buffer(2),Buffer(3),Buffer(4),Buffer(5),Buffer(6),Buffer(7))
Dim be(40) As Object 'used as a storage buffer. Can be a global variable
Dim Data() As Object = ser.ConvertBytesToArray(Buffer,be)
Log(Data(0)," ", Data(1), " ",Data(2)," ",Data(3)," ",Data(4)," ",Data(5)," ",Data(6)," ",Data(7))
This is the only response
From PAD
4950515253545556
Out of bounds error. Array length = 40, Index = 65535
So the data is arriving, the problem seems to be in ConvertBytesToArray
I found someone else had this issue with Bluetooth resolved by Baud rates
I have also increased StackBufferSize =600
Any ideas please