Android Question Trial version can't use Socket correct?

Jim Hsu

New Member
Dear Members,

I use B4A to write a socket program communicate to my microchip MCU vir a Ti Ethernet to UART interface board. The design is work correct when I use VB 2010 to control, But when I use B4A program to control is fail, I can't read and write data via B4A Socket command,I'd like to know the function be disable in trial version? Socket1_Connected is Successful, But can't read data "EditText.Text= "A" & tr.ReadLine" and also no any event happn in "Sub AStreams_NewData (Buffer() As Byte)".


Sub Socket1_Connected(Successful As Boolean)
If Successful=True Then
EditText1.Text="Connect ok!"
tr.Initialize(Socket1.InputStream)
tw.Initialize(Socket1.OutputStream)
AStreams.InitializePrefix(Socket1.InputStream, False, Socket1.OutputStream, "AStreams")
End If
End Sub

Sub AStreams_NewData (Buffer() As Byte)
Dim msg As String
msg = BytesToString(Buffer, 0, Buffer.Length, "UTF8")
ToastMessageShow(msg, False)
Log(msg)
End Sub

Thanks.
 
Top