S Scantech Well-Known Member Licensed User Longtime User Aug 2, 2022 #1 Private Sub ConnectToServer(Host As String, PORT1 As Int) Log("Trying to connect to: " & Host) CloseExistingConnection Dim client As Socket client.Initialize("client") client.Connect(Host, PORT1, 10000) Wait For Client_Connected (Successful As Boolean) If Successful Then xui.Msgbox2Async("Connecting True", "", "OK", "", "", Null) ClientConnected(True) Else xui.Msgbox2Async("Connecting False", "", "OK", "", "", Null) ClientConnected(False) End If End Sub Click to expand... The code above will connect succesfully. Sub ClientConnected (Success As Boolean) Try If Success Then client.TimeOut = 0 astream.Initialize(client.InputStream, client.OutputStream, "AStreams") If astream.IsInitialized Then lblStatus.Text = "Astream is ok" End If Click to expand... The ClientConnected method has a problem with astream not being initialized? Only with IOS. Android is working good. Any ideas??
Private Sub ConnectToServer(Host As String, PORT1 As Int) Log("Trying to connect to: " & Host) CloseExistingConnection Dim client As Socket client.Initialize("client") client.Connect(Host, PORT1, 10000) Wait For Client_Connected (Successful As Boolean) If Successful Then xui.Msgbox2Async("Connecting True", "", "OK", "", "", Null) ClientConnected(True) Else xui.Msgbox2Async("Connecting False", "", "OK", "", "", Null) ClientConnected(False) End If End Sub Click to expand... The code above will connect succesfully. Sub ClientConnected (Success As Boolean) Try If Success Then client.TimeOut = 0 astream.Initialize(client.InputStream, client.OutputStream, "AStreams") If astream.IsInitialized Then lblStatus.Text = "Astream is ok" End If Click to expand... The ClientConnected method has a problem with astream not being initialized? Only with IOS. Android is working good. Any ideas??
hatzisn Expert Licensed User Longtime User Aug 2, 2022 #2 I cannot be sure but have you tried to set #ATSEnabled: False in project attributes in Main? Try it and let us know. Upvote 0
I cannot be sure but have you tried to set #ATSEnabled: False in project attributes in Main? Try it and let us know.
S Scantech Well-Known Member Licensed User Longtime User Aug 3, 2022 #3 #ATSEnabled: False is set. Still no success. Upvote 0
S Scantech Well-Known Member Licensed User Longtime User Aug 3, 2022 #4 Forgot to add s with Astream_Newdata event. Should be Astreams_Newdata. Its really hard to debug b4i while using OBD2 wifi. Last edited: Aug 3, 2022 Upvote 0
Forgot to add s with Astream_Newdata event. Should be Astreams_Newdata. Its really hard to debug b4i while using OBD2 wifi.