Dear friends, please for help,
I am sending simply serial data from B4R (esp) to B4J
1) In B4R:
This is settings:in App start
In Timer
2) In B4J:
very magical situation for me is - when I upload B4R program to ESP then after this upload I see "Hallo1" and "Hallo2" in B4J, I get right result
but then
I disconnect ESP from USB and then I connect ESP again I get only bad result in B4J - �
In Logs in B4R I see each time everything right = HALLO. Only in B4J I can not get good result.
I have read this, but this threads not solved my situation:
https://www.b4x.com/android/forum/t...-using-asyncstreams-b4r-b4j-and-vb-net.81637/
https://www.b4x.com/android/forum/threads/cannot-receive-serial-data-from-b4r-to-net-program.107386/
Why please I get �? Where I am doing mistake, please?
p4ppc
I am sending simply serial data from B4R (esp) to B4J
1) In B4R:
This is settings:in App start
B4X:
Serial1.Initialize(115200)
astream.Initialize(Serial1.Stream, "astream_newdata", "astream_Error")
B4X:
' log("HALLO1")
astream.Write("HALLO2".GetBytes)
2) In B4J:
B4X:
Sub btnopenport
astream.Initialize(sp.GetInputStream, sp.GetOutputStream, "astream")
End sub
Sub astream_NewData (Buffer() As Byte)
Dim s As String
s = BytesToString(Buffer, 0, Buffer.Length, "UTF8")
Log(s)
End sub
very magical situation for me is - when I upload B4R program to ESP then after this upload I see "Hallo1" and "Hallo2" in B4J, I get right result
but then
I disconnect ESP from USB and then I connect ESP again I get only bad result in B4J - �
In Logs in B4R I see each time everything right = HALLO. Only in B4J I can not get good result.
I have read this, but this threads not solved my situation:
https://www.b4x.com/android/forum/t...-using-asyncstreams-b4r-b4j-and-vb-net.81637/
https://www.b4x.com/android/forum/threads/cannot-receive-serial-data-from-b4r-to-net-program.107386/
Why please I get �? Where I am doing mistake, please?
p4ppc
Last edited: