espressif / esp8266_at Goto Github PK
View Code? Open in Web Editor NEWThis project is not maintained, please use https://github.com/espressif/esp-at.
This project is not maintained, please use https://github.com/espressif/esp-at.
In SDK v0.9.5 http://bbs.espressif.com/viewtopic.php?f=5&t=154
included binaries AT v0.21 without source code
(AT+RESTORE, AT+UART, AT+PING)
AT+CIPRECVMODE says
"1: passive mode - ESP8266 will keep the received TCP data in an internal buffer (default is 2920
bytes), and wait for host MCU to read the data. If the buffer is full, the TCP transmission will be
blocked."
It's possible to increase this buffer to eg. 2MB? There is around 6MB free ram in ESP8266, this would save our company lot of time in the future.
I wish to get the received data synchronously and with desired max buffer lenght. I know the AT firmware would need to buffer the received data itself to get this behaivour but that is much harder for arduino with 2KB of data memory.
There may exist asynchronous recv notifications but with no data, only notification of mux so it does not fill receiver buffers.
I have tried to find AT Command for checking WiFi Station mode's conection-status.
But I can't found any AT Command.
Is there any AT Command for checking WiFi-connection status?
If the current ESP8266 AT firmware doesn't have , request for the AT Command too.
Thank you very much.
BTW. Sorry for my poor English.
Using pip installed version 1.1, esptool.py generates:
A fatal error occurred: Failed to connect to ESP8266
for several of the read functions ( read_mac, flash_id , etc) when the Arduino1.7.10 IDE EspRecovery sketch is loaded onto Arduino Uno WiFi and the ESP8266 is put in bootloader mode.
The issue appears to be due to a single line of code introduced in commit:
24404b5f4f24221ee197cd4198f9731fbe11952e
as:
def __init__(self, port=0, baud=ESP_ROM_BAUD):
self._port = serial.Serial(port)
+ self._slip_reader = slip_reader(port)
# setting baud rate in a separate step is a workaround for
Removing self._slip_reader = slip_reader(port), resetting the arduino board, re-uploading the sketch and running esptool behaves as expected.
If setting self._slip_reader in the init is necessary for other functions, I believe is should call:
slip_reader(self._port)
as port is a string (untested).
I am not sure if this is the desired behavior of the module or not, but after setting the operating mode via AT+CWMODE=2, and issuing AT+RST a while later(or power cycling the module), the operating mode automatically reverts back to 3(softAP+station)
I tried to have a look at the code here to see how the SSID is saved, but it seems this is handled automatically by the SDK.
In the BIN directory - it is not quite clear which USER file to use - and can you add a note for the FLASH ADDRESSES please.
When device is in server mode, it can happen that at some point, all connections are used for server and there is no support to use client mode at that time.
What we should have option to set is which connections are available for server.
Correct me if I'm mistaken, but current server approach is like this:
We should be able to limit the number of connections and for example only allow server to use them:
AT+CIPSERVERCONN=1,0
AT+CIPSERVERCONN=1,1
AT+CIPSERVERCONN=1,2
These 3 commands would enable connections 0,1,2
only for server. If ESP got more than 3 connections at a time, they should wait before one of these 3 is available again.
If we then try AT+CIPSTART=1,...
from uC, we should got an error because connection is reserved for server only! In this case, we can use connections 4,5
for client.
This allows us to have better control from uC, specially on devices with small amount of RAM.
I'm waiting for your response!
File upgrade.h missing in dir at/user . Please upload the file.
make[1]: Entering directory `/opt/esp/SDK/at/user'
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH -I include -I ./ -I ../../rom/include -I ../../include/ets -I ../include -I ./ -I ../../include -I ../../extra_include -I ../../include/lwip -I ../../include/lwip/ipv4 -I ../../include/lwip/ipv6 -I ../../include/espressif at_ipCmd.c
at_ipCmd.c:28:21: fatal error: upgrade.h: No such file or directory
#include "upgrade.h"
hi, I'm using my esp8266 module as a TCP server. when sending data from multiple client devices it oftenly shows data missing, In that cases +ipd is missing in my received data. expecting your valuable suggetions and solutions on this issue.
My settings are as follows:
AT+CWMODE=1
AT+CWDHCP=0,0
AT+CIPSTA="STA_IP","GATEWAY","SUBNET MASK"
AT+CWJAP="SSID","PASS_WORD"
AT+CIPMUX=1
AT+CIPSERVER=1,2000 I'M USING PORT 2000
AT+CIPSTO=0
AFTER the setting starts connect to the device from client and sends data.. the +ipd missing occures when data receives frommultiple clients...........please help me to resolve this issue...
after the server has finished to send back to client te response,
i wait for 2 milliseconds delay
then send three times the character '+' (without any delay between them, and without any cr lf)
the wait again for 2 millisecond delay.
here a little part of arduino sketch....
void loop() {
// listen for incoming clients
EthernetClient client = server.available();
if (client) {
Serial.println("new client");
while (client.connected()) {
if (client.available()) {
char c = client.read();
Serial.write(c); //echoing
if (c == '.') {
Serial.println("\r\n'.' received - send back 6 analog channels...");
client.println();
for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
int sensorReading = analogRead(analogChannel);
sprintf(s,"ch%02d: %4d",analogChannel,sensorReading); //local echoing
Serial.println(s);
client.print("analog input ");
client.print(analogChannel);
client.print(" is ");
client.print(sensorReading);
client.println();
}
//-- part added ---
delay(2);
client.print("+++");
delay(2);
//-----------
break;
}
}
}
// give the web browser time to receive the data
delay(1);
// close the connection:
client.stop();
Serial.println("client disconnected");
}
}
----------------- at client side ----------
AT+CIPSTART="TCP","192.168.43.177",80
CONNECT
OK
AT+CIPSEND=1
OK
busy s...
Recv 1 bytes
SEND OK
+IPD,2:
+IPD,13:analog input
+IPD,1:0
+IPD,4: is
+IPD,3:811
+IPD,2:
+IPD,13:analog input
+IPD,1:1
+IPD,4: is
+IPD,3:258
+IPD,2:
+IPD,13:analog input
+IPD,1:2
+IPD,4: is
+IPD,2:88
+IPD,2:
+IPD,13:analog input
+IPD,1:3
+IPD,4: is
+IPD,2:37
+IPD,2:
+IPD,13:analog input
+IPD,1:4
+IPD,4: is
+IPD,2:61
+IPD,2:
+IPD,13:analog input
+IPD,1:5
+IPD,4: is
+IPD,2:18
+IPD,2:
+IPD,3:+++
---- NOTE -----
the "+IPD..." response is made when AT+CIPMODE=0
when AT+CIPMODE=1 the response is only the text (without +IPD)
.
.
.
at client side:
AT+CIPMODE=1
OK
AT+CIPSEND
OK
analog input 0 is 823
analog input 1 is 339
analog input 2 is 210
analog input 3 is 199
analog input 4 is 229
analog input 5 is 169
+++AT
OK
Please drop in a LICENSE.md file so this topic is clearly defined. Thank you
The ESP8266 is an awesome module! I just have one question.
Is there a specific reason why the transparent mode is disabled when using the module as a server? https://github.com/espressif/esp8266_at/blob/master/at/user/at_ipCmd.c#L1371
Hi Espressif team, well done for a great product
I hope this is the correct place to post but I have found a debug in the AT command implementation.
I am using at_v0.20_14_11_28 to contact a NTP server via UDP. If I use the IP address it works ok as below
AT+CIPMUX=0
AT+CIPSTART="UDP","134.130.4.17",123
AT+CIPSEND=48
NTP Recieved OK
However if I use a domain name, the DNS lookup works correctly but the following AT+CIPSEND hangs with no > data prompt
AT+CIPMUX=0
AT+CIPSTART="UDP","pool.ntp.org",123
AT+CIPSTATUS returns +CIPSTATUS:0,"UDP","217.114.59.3",123,25349,0
AT+CIPSEND=48 - hangs with no > data prompt
I have looked at the source code for AT+CIPSTART in 'at_ipCmd.c' and i see that for a UDP start with IP address
espconn_create is called at line 818 (TCP calls espconn_connect). However if a DNS lookup is required, the callback function
at_dns_found calls espconn_connect for both TCP and UDP !
I think at_dns_found should call espconn_create for UDP ?
Also at line 731 "ALREAY CONNECT\r\n" should be "ALREADY CONNECT\r\n" or even better english is "ALREADY CONNECTED\r\n"
I hope you can correct this problem. If you like to post new user.bin file I can test it out
Thankyou
Dennis Tricker
UK
Hi,
there seem to be some files missing in the RTOS version of the SDK: https://github.com/espressif/esp_iot_rtos_sdk
It would be nice, if you could fix this, so that the AT+ app could be compiled using the RTOS version of the SDK.
Hi,
I've noticed that when I run a user task (like this : https://github.com/Karang/Ardunet/blob/master/src/user/user_main.cpp#L49-L62), the wifi doesn't work anymore (In station and AP mode). Is there a particular reason?
Where can I find the internal architecure of the esp8266 ? I would like to understand how tasks are implemented on the chip.
Regards
Hi,
I've tried to edit the AT example, by adding the loop code given in the basic example (taken from here : https://github.com/esp8266/source-code-examples ).
Because the uart use task priorities 0 and 1, I've been trying to use USER_TASK_PRIO_2.
But the task seems to never be called. If i use USER_TASK_PRIO_0 the task is called, but as expected the uart don't work well.
Any idea ?
Hi Team,
I created TCP socket connection to a TCP Server. Next SSL handshake is intiated. Client has sent Hello msg and TCP Server replied with Hello msg, Cipher suite and Certificate. TCP Server sends this reply in multiple messages to TCP client - This has been verified in Wireshark logs.
But ESP8266 acting as TCP Client is not sending any +IPD messages to my application.
Following are the commands sent to ESP8266 from my application:
AT\r\n
\r\nOK\r\n
AT+GMR\r\n
AT version:1.2.0.0(JuL 1 2016 20:04:45)\r\n
SDK version:1.5.4.1(39cb9a32)\r\n
Ai-Thinker Technology Co Ltd.\r\n
Dec 2 2016 14:21:16
\r\nOK\r\n
AT+CWMODE_CUR=1\r\n
\r\nOK\r\n
AT+CIPMUX=1\r\n
\r\nOK\r\n
AT+CWJAP_CUR?\r\n
No AP\r\n
\r\nOK\r\n
AT+CWJAP_CUR="XXXX",""\r\n
WIFI CONNECTED\r\n
WIFI GOT IP\r\n
\r\nOK\r\n
AT+CWJAP_CUR?\r\n
+CWJAP_CUR:"XXXX","64:a2:f9:56:d6:c3",5,-49\r\n
\r\nOK\r\n
AT+CIFSR\r\r\n
+CIFSR:STAIP,"192.168.43.37"\r\n
+CIFSR:STAMAC,"bc:dd:c2:fe:20:df"\r\n
\r\nOK\r\n
AT+CIPDOMAIN="a2......com"\r\n
+CIPDOMAIN:52.41.230.253\r\n
\r\nOK\r\n
AT+CIPSTART=0,"TCP","52.41.230.253",8883\r\n
0,CONNECT\r\n
\r\nOK\r\n
AT+CIPSEND=0,159\r\n
\r\nOK\r\n> \r\n
** 159 bytes are sent from application **
Recv 159 bytes\r\n
SEND OK\r\n
** Here Expected is +IPD msg. Since no msg was recieved, application closed the socket **
AT+CIPCLOSE=0\r\r\n
0,CLOSED\r\n
\r\nOK\r\n
Is there anything needs to be done to get +IPD msg OR is it issue with ESP8266 in handling multiple TCP packets at a time?
Please let me know how to proceed with this issue?
Thanks in advance!
The AT description page states that
AT instruction ends with โ\r\nโ
however this is not correct AT command behaviour. The ITU V.250 specification (previously V.25ter), which is the official specification for AT commands, specifies the following with regards to the AT command line syntax:
5.2.1 Command line general format
A command line is made up of three elements: the prefix, the body, and the termination character.
...
The termination character may be selected by a user option (parameter S3), the default being CR
Notice that the command line is terminated by a single character, being \r
for all practical purposes.
Could you fix the code to behave like a proper modem and support proper command line termination?
Still accepting (incorrect) line termination with "\r\n"
is both possible and common for modems, so this fix should not imply breaking changes for any existing clients/code.
Hm, looking into the source code I see some other issues as well.
case at_statRecving: //push receive data to cmd line
...
else if(pCmdLine >= &at_cmdLine[at_cmdLenMax - 1])
{
at_state = at_statIdle;
}
pCmdLine++;
break;
Here you abort processing if the given command line input is too long and there is principally nothing wrong with that, however not giving out an ERROR final result code for this is totally unacceptable. How is the client sending the AT command line supposed to understand that the command line was too long and that it was not processed?
Also the termination is too early, it should continue to "parse" (e.g. ignoring) the command line up till, including the terminating character. The current code will falsely trigger parsing at
in cats in the example below as an AT command.
AT+QUESTION="...some 100+ character beginning ... do you like cats?"\r
The V.250 specification is crystal clear on how the proper behaviour should be:
5.5 Issuing commands
...
If the maximum number of characters that the DCE can accept in the body is exceeded, an ERROR
result code shall be generated after the command line is terminated.
(DCE = modem, Data Circuit-terminating Equipment)
password for connecting, AT+CWJAP, is clear or encypted ?
encripted as linux wpa_passphrase command ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.