B4R Question esp8266 mqtt problem?

bagazhou

Member
Licensed User
Longtime User
Hi

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
 

bagazhou

Member
Licensed User
Longtime User
Thank you for your reply . this is my code

B4J Code
B4X:
  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
 
Upvote 0
Top