Git Product home page Git Product logo

esp8266_at's People

Contributors

atdeveloper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp8266_at's Issues

It's possible to increase passive receive buffer size?

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.

at_tcpclient_recv sends data back asynchrously filling arduino buffers

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.

[Request] AT Command for checking WiFi connection's status .

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.

Fatal Error: arduino uno wifi

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).

Operating mode reverts back to 3(softAP+station) after restart

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.

Files

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.

Specify connections for server

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:

  • User enables server at specific port
  • ESP creates new connections and listens at specific port
  • When connection is accepted, ESP creates new empty connection to listen on same port
  • And so on, which means there is always one connection active and ready to accept new connection, except if we reached max connections.

We should be able to limit the number of connections and for example only allow server to use them:

  • uC sends AT+CIPSERVERCONN=1,0
  • uC sends AT+CIPSERVERCONN=1,1
  • uC sends 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!

Missing file upgrade.h

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"

missing +IPD

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...

+IPD - I found out how to get it answered immediately

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.

note:
this is indicate into some PDF for terminate also AT+CIPSEND without the length of sending message

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

AT+CIPSTART bug when using UDP and DNS lookup

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

Task priority with AT example

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 ?

+IPD is missing every time

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!

Incorrect AT command line handling

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)

WPA-PSK password

password for connecting, AT+CWJAP, is clear or encypted ?
encripted as linux wpa_passphrase command ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.