Hi,
I'm trying to control my Microtik router through a telnet session (locally, so no need for SSH).
When I do a telnet session I get something like:
I tried to implement this with an AsyncstreamText, but it seems the NewText as never called, so I tried Asyncstreams:
I then only receive 6 "funny' characters ...
What am I missing ?
Thanks
I'm trying to control my Microtik router through a telnet session (locally, so no need for SSH).
When I do a telnet session I get something like:
B4X:
MikroTik v6.39.2 (stable)
Login:
I tried to implement this with an AsyncstreamText, but it seems the NewText as never called, so I tried Asyncstreams:
B4X:
Public Sub Connect (server As String, password As String)
sck.Initialize("sck")
sck.Connect(server, 23, 30000)
End Sub
Private Sub sck_Connected (Successful As Boolean)
If Successful Then
ast.Initialize(sck.InputStream, sck.OutputStream, "ast")
End If
End Sub
Private Sub ast_NewData (Buffer() As Byte)
Log (BytesToString(Buffer, 0, Buffer.Length, "ASCII"))
End Sub
I then only receive 6 "funny' characters ...
What am I missing ?
Thanks