I want to use mqtt server send 800 bytes from pc to esp8266 ,but i can get any data and Message Arrived not fire , If I send less than 50 bytes, the result is ok .
wtb:
1. i send 800 bytes from pc to pc ,the result is ok .
2. on b4r i up StackBufferSize to 5000
Sub Button1_Action
Dim bc As ByteConverter
TextField1.Text="5CCF7FEF7BAB;send;ir;14000000A7000000560000000B0000000C0000000A000000220000000B000000220000000B0000000C0000000A000000220000000B0000000C0000000B000000220000000B0000000C0000000B0000000C0000000B000000220000000B000000220000000B0000000C0000000B000000220000000B000000220000000B000000220000000A0000000D0000000B0000000D0000000A0000000C0000000B0000000C0000000B0000000C0000000B0000000C0000000A0000000D0000000B0000000C0000000B0000000C0000000A0000000D0000000B0000000C0000000B0000000C0000000B0000000C0000000B0000000C0000000B0000000C0000000B0000000C0000000B0000000C0000000B0000000C0000000B0000000C0000000B0000000C0000000B0000000C0000000B0000000C0000000A000000220000000A0000000D0000000A0000000C0000000B0000000C0000000B0000000C0000000B0000000C0000000A0000000D0000000A0000000D0000000B0000000C0000000B000000220000000A000000220000000A000000;"
mqtt.Subscribe(mqtt_Topic, 0)
mqtt.Publish(mqtt_Topic,bc.StringToBytes(TextField1.Text,"UTF8"))
End Sub
B4R Code
B4X:
Sub Mqtt_MessageArrived (Topic As String, Payload() As Byte)
Log("Message arrived. Topic=", Topic, " payload: ", Payload)
End Sub
You are hitting a limit somewhere. Sending strings is very inefficient. Parse this message in B4J to three fields of strings and the other data as bytes.
Use B4RSerializator to convert the array of objects to bytes and vice versa.