hi.
i used esp in mode acsespoint and station together.
i connect android phone to esp directly.
when my modem ok and esp connected to it my android app connected normally as tcp client.
but if esp Failed to connect to modem (wrong password) when my app connected to esp as tcp socket it disconnected client after 2 second.
if i remove below code.its ok and not disconnected.
what was wrong?
i used esp in mode acsespoint and station together.
B4X:
server.Initialize(port, "server_NewConnection")
server.Listen
Log("StartAP: ", wifi.StartAccessPoint("esp"))
Log("My AP ip: ", wifi.AccessPointIp)
Log("My local ip: ", wifi.LocalIp)
If wifi.Connect2("modem", "password") Then
Log("Connected successfully : ")
Log("Local IP: ", wifi.LocalIp)
Else
Log("Failed to connect.")
End If
when my modem ok and esp connected to it my android app connected normally as tcp client.
but if esp Failed to connect to modem (wrong password) when my app connected to esp as tcp socket it disconnected client after 2 second.
if i remove below code.its ok and not disconnected.
B4X:
If wifi.Connect2("modem", "password") Then
Log("Connected successfully : ")
Log("Local IP: ", wifi.LocalIp)
Else
Log("Failed to connect.")
End If
what was wrong?