Code Monkey home page Code Monkey logo

Comments (11)

JiriBilek avatar JiriBilek commented on May 26, 2024

Thanks for the observation. I have to study it more as I want the library to be able to run with both cores. For that reason the enableWiFiAtBootTime() function is not an option, unfortunately.

Edit: According to the source there is a chance to use enableWiFiAtBootTime(). I will have to test it thoroughly.

from esp_atmod.

PixlRainbow avatar PixlRainbow commented on May 26, 2024

another related issue is that the current implementation of AT+CWJAP differs from the behaviour documented in the official AT command firmware, not sure if this is intentional.
Executing AT+CWJAP with no parameters should initiate an attempt to reconnect to the last AP with saved configuration, but in ATMod it is treated as invalid command.

from esp_atmod.

JiriBilek avatar JiriBilek commented on May 26, 2024

Executing AT+CWJAP with no parameters should initiate an attempt to reconnect to the last AP with saved configuration, but in ATMod it is treated as invalid command.

I try to make the commands as much as possible equal to the standard AT firmware from Espressif.

The older versions of AT-firmware (e.g. ESP8266_NONOS_SDK_V2.2.1_18_06_08) don't implement this feature so I didn't implement it either.
The new version of AT-firmware (ESP8266-IDF-AT_V2.2.1.0) recognizes simple AT+CWJAP and reconnects, but on the other side the commands AT+CWJAP_CUR and AT+CWJAP_DEF don't work. I assume that AT+CWJAP in newer firmwares works like AT+CWJAP_DEF in the older ones.

It would be easy to make AT+CWJAP get the credentials from the previous AT+CWJAP_DEF and connect but I am not sure this is what you want.

@JAndrassy : I haven't looked to your code yet, are you using AT+CWJAP_DEF for setting persistent connections? I assume so, because my firmware reconnects using AT+CWJAP_DEF after reset.

Edit: the ESP8266-IDF-AT_V2.2.1.0 firmware connects using TLS 1.2 so that it can be used instead of my fw (much to my regret 😊).

from esp_atmod.

JAndrassy avatar JAndrassy commented on May 26, 2024

the ESP8266-IDF-AT_V2.2.1.0 is very bad and they don't create new versions of AT 2 for esp8266.
AT2 has AT+SYSSTORE to control CUR/DEF

CWMODE should start remembered STA or SoftAP. but in esp8266 arduino I discovered problems yesterday. I investigate it.

from esp_atmod.

JAndrassy avatar JAndrassy commented on May 26, 2024

CWMODE should start remembered STA or SoftAP. but in esp8266 arduino I discovered problems yesterday. I investigate it.

the problem is only with core 3. setting WiFi.mode or using enableSTA() doesn't join the AP and enableAP() doesn't start the SoftAP. enableWiFiAtBootTime() doesn't change that. I ask the esp8266 core devs if that is intended.

from esp_atmod.

JAndrassy avatar JAndrassy commented on May 26, 2024

I tested it again and STA joins AP at start even without enableWiFiAtBootTime(). but I removed mode from setup() in the SoftAP PR.

@PixlRainbow which version of ESP_ATMod do you use?

from esp_atmod.

PixlRainbow avatar PixlRainbow commented on May 26, 2024

I haven't used ATMod in a year, the last version I used was d6ad63f

from esp_atmod.

JAndrassy avatar JAndrassy commented on May 26, 2024

CWMODE should start remembered STA or SoftAP. but in esp8266 arduino I discovered problems yesterday. I investigate it.

the problem is only with core 3. setting WiFi.mode or using enableSTA() doesn't join the AP and enableAP() doesn't start the SoftAP. enableWiFiAtBootTime() doesn't change that. I ask the esp8266 core devs if that is intended.

after proper testing:
STA) the STA requires WiFi.begin() (without parameters) to join AP after setting mode to WIFI_STA even in 2.7.4
SoftAP) the SoftAP starts good after setting mode to WIFI_AP in 2.7.4 and git master, but fails to properly start in 3.0.2

from esp_atmod.

JiriBilek avatar JiriBilek commented on May 26, 2024

Juraj,
I am a bit lost. Could you please post your tests (AT commands) so that I can reproduce the problem?

from esp_atmod.

JAndrassy avatar JAndrassy commented on May 26, 2024

Juraj, I am a bit lost. Could you please post your tests (AT commands) so that I can reproduce the problem?

It is not a problem with start at boot but with start of persistent SoftAP or STA rejoining AP after mode is switched. In normal AT fw setting mode starts SoftAP/rejoins AP. In arduino core, setting mode to AP starts the SoftAP too, but setting mode to STA doesn't rejoin AP. This is first problem. I will create a PR for ESP_ATMod to add WiFi.begin() in AT_CWMODE .

The second problem is that in core 3.0.2 there is some error with SoftAP started with setting mode . The SoftAP starts, but stations can't connect. This will be solved with release of core 3.1.0

To replicate you have to first setup persistent settings for STA and AP with AT+CWSAP and AT+CWJAP and set mode to STA with AT+CWMODE=1. Then reset.
After reset use AT+CWMODE_CUR=2 to turn off STA. then start it back with AT+CWMODE_CUR=1. STA starts again and should rejoin AP with persistent settings (maybe even with last CUR settings (I didn't test that)). Previous AT+CWMODE_CUR=1 turned SoftAP off. Entering AT+CWMODE_CUR=2 starts SoftAP with last (persistent) settings.

from esp_atmod.

JAndrassy avatar JAndrassy commented on May 26, 2024

correction AT+CWMODE=1 (or 3) doesn't rejoin AP in standard AT firmware. so current implementation of cmd_AT_CWMODE is OK

from esp_atmod.

Related Issues (8)

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.