After writing the topic just think of one thing, if the phone as a client (not connected to the case of the router), the wireless Phone connection module will assign an IP address,,, this IP address in advance I do not know .... I'll see if there's an instruction in the AT command that prints the IP address of the device after connecting to its own WiFi signal.
I can't find ......... .......
OK, I connect directly with the phone, look at the IP address assigned by the phone, and then set up the module
App can be in Baidu Mobile assistant, Android Market, 91 assistant, download install (search "small Five things")
Let's still set the module's operating mode to mode 3.
AT+CWMODE_DEF=3
Send at+cipmux=0 start single connection, first get single connection
At instruction single connection can be done through the transmission
At+cipmux=0
Then let the module connect to the server
At+cipstart= "TCP", "192.168.4.2", 8080
Now send data with your phone
Now send the module to the phone
The send instruction is at+cipsend=x on a single connection, x is the number of bytes sent
Now send a command to pass the module, send the data before sending instructions, so that the module automatically forwarded
Although it is set, but it seems not possible ....
But it seems like a change of command.
At+savetranslink=1, "192.168.4.2", 8080, "TCP"
It seems to have been modified, and has been made to save the mode, the power outage will also save the settings,
The new version of the AT command seems to be done specifically to save the settings inside the module, set up the next time the power automatically work, not two times configured ...
Also, this command can be sent directly, without configuring a single connection or multiple connections, no matter how the configuration but the connection or multi-connection to this command does not affect
Therefore, the establishment of TCP through the direct sentence can be
At+savetranslink=1, "192.168.4.2", 8080, "TCP"
Exit Pass is send "+ +"
But that instruction is also stored inside the module, and the module will be automatically connected and transmitted through a power-off.
To clear this command, first send "+ + +"
Then At+restore reset to factory settings
The new version of the instructions are very good, more convenient than before, too late to sleep,,,,
Write the multi-connection mode another day
13-51 single-chip microcomputer ESP8266 Learning-at instruction (ESP8266 as a TCP client, connect a TCP server, use the Serial debugging assistant and the phone TCP debugging assistant test)