Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 01:40
    atesin commented #1184
  • 01:40
    SinglWolf commented #686
  • Sep 29 17:18
    stale[bot] unlabeled #1157
  • Sep 29 17:18
    stale[bot] commented #1157
  • Sep 29 17:18
    simonttp78 commented #1157
  • Sep 28 23:24
    RoboticNerd commented #1141
  • Sep 27 17:34
    slimline33 commented #1210
  • Sep 27 14:56
    slimline33 commented #1210
  • Sep 26 14:20
    me-chiel commented #1147
  • Sep 25 16:35
    gibo77 commented #1190
  • Sep 25 16:23
    Pablo2048 commented #1190
  • Sep 25 16:13
    softhack007 commented #1190
  • Sep 25 16:11
    softhack007 commented #1190
  • Sep 25 11:11
    Napoleon-BlownApart closed #1213
  • Sep 25 11:11
    Napoleon-BlownApart commented #1213
  • Sep 25 11:11
    Napoleon-BlownApart commented #1213
  • Sep 25 11:11
    Napoleon-BlownApart reopened #1213
  • Sep 25 11:11
    Napoleon-BlownApart commented #1213
  • Sep 25 11:11
    Napoleon-BlownApart commented #1213
  • Sep 25 11:10
    Napoleon-BlownApart closed #1213
OnurNP
@K0rkunc
hi how to detect wifi password is wrong
Hamza Khan
@hamza765
@K0rkunc maybe checkout WiFi.status()
Hamza Khan
@hamza765
void onBody(AsyncWebServerRequest *request, uint8_t *data, size_t len, size_t index, size_t total){
  if(!index){
    Serial.printf("BodyStart: %u B\n", total);
  }
  for(size_t i=0; i<len; i++){
    Serial.write(data[i]);
  }
  if(index + len == total){
    Serial.printf("BodyEnd: %u B\n", total);
  }
}
server.on("/connect", HTTP_POST, [](AsyncWebServerRequest * request) {
    Serial.print("connect");

    request->send(200);

  }, onBody);
  server.onFileUpload(onUpload);
  server.onRequestBody(onBody);
Any clue why my code isn't printing anything out when i send call that route and send it a message of 'ping'?
RW
@mm108
hi to the good people on gitter
suddenly ran into a somewhat weird issue with what I think points to ESP Async WebServer
it was all working fine and then this error pops up on PlatformIO
.pio/libdeps/esp32dev/ESP Async WebServer/src/WebAuthentication.cpp:74: undefined reference to `mbedtls_md5_starts'
.pio/libdeps/esp32dev/ESP Async WebServer/src/WebAuthentication.cpp:74: undefined reference to `mbedtls_md5_starts'
did some research and the it seems to be related to not having the latest version ... but mine's the absolute latest version - of all the libraries
including PlatformIO, VS Code etc
the cause seems to be the now deprecated mbedtls_md5_starts which is replaced by mbedtls_md5_starts_ret()
RW
@mm108
void onBody(AsyncWebServerRequest *request, uint8_t *data, size_t len, size_t index, size_t total){
  if(!index){
    Serial.printf("BodyStart: %u B\n", total);
  }
  for(size_t i=0; i<len; i++){
    Serial.write(data[i]);
  }
  if(index + len == total){
    Serial.printf("BodyEnd: %u B\n", total);
  }
}
server.on("/connect", HTTP_POST, [](AsyncWebServerRequest * request) {
    Serial.print("connect");

    request->send(200);

  }, onBody);
  server.onFileUpload(onUpload);
  server.onRequestBody(onBody);

Any clue why my code isn't printing anything out when i send call that route and send it a message of 'ping'?

Not an expert on ESP Async Web Server but couple of things I can think of - is the method on the client side correct? ( GET or POST )?

And I am guessing the serial port has been initialized with the correct baud rate ...
Oops didn't notice the date - that seems to be 10 days old issue :-E

hi to the good people on gitter

I did post this issue on the ESPAsyncWebServer github repo but I thought I'd ask here - perhaps someone has run into a similar problem

Mike Dunston
@atanisoft

did some research and the it seems to be related to not having the latest version ... but mine's the absolute latest version - of all the libraries

Latest released version via lib manager or latest from GitHub? There is a big difference as the error you are reporting has been fixed on GitHub but the library version was not advanced thus it is not available via lib manager.

RW
@mm108
oops ... from the PlatformIO library registry
then I guess I can download a copy gtom Github and add it to the project for now?
Mike Dunston
@atanisoft
you can adjust your platformio.ini file to have it automatically pull and maintain it
RW
@mm108

did some research and the it seems to be related to not having the latest version ... but mine's the absolute latest version - of all the libraries

Latest released version via lib manager or latest from GitHub? There is a big difference as the error you are reporting has been fixed on GitHub but the library version was not advanced thus it is not available via lib manager.

you can adjust your platformio.ini file to have it automatically pull and maintain it

Cool, thanks

Mike Dunston
@atanisoft
declare the lib_deps entry for it as https://github.com/me-no-dev/ESPAsyncWebServer.git and it should pull automatically
RW
@mm108
at least now I know where the error most probably lies ...

declare the lib_deps entry for it as https://github.com/me-no-dev/ESPAsyncWebServer.git and it should pull automatically

Wonderful thanks

thanks a ton
Mike Dunston
@atanisoft
you may also need a similar line for AsyncTCP (it will have a similar pattern)
RW
@mm108
Ok cool ... will do that too
Normally I add libraries from the PlatformIO lib registry ... but it seems that that isn't always the best thing to do :)
I was living under the impression that the libs are the latest cos I keep updating them - via the "Libraries" tab in PlatformIO
Cool thanks a ton -
Mike Dunston
@atanisoft
generally yes the library manager is a good approach, unfortunately things can get out of sync when updates are put in without a newer version applied to them.
RW
@mm108
my libs are all generally declared this way in the ini: me-no-dev/ESP Async WebServer @ ^1.2.3
unless a newer version has some issue in which case I restrict the version to something that's tried and tested

generally yes the library manager is a good approach, unfortunately things can get out of sync when updates are put in without a newer version applied to them.

Hopefully that will get fixed in time to come. PlatformIO has generally been wonderful to use

Mike Dunston
@atanisoft
Hopefully that will get fixed in time to come. PlatformIO has generally been wonderful to use
Don't count on it, it is a library author issue and not a PlatformIO issue. The same would happen over on Arduino IDE. People forget to update the version when they update their library with a bug fix and then it goes out of sync
RW
@mm108
Oops :)
My experience with PlatformIO is kinda limited ... cos for the most part once the libs are installed then it is generally only the code to be dealt with ...
but I learnt something new - so I guess next time I have one more area to look at when something like this happens
Earlier I was so sure that the libs are latest, that I did not even care to check that part
which I should have :-E
lol ... I nearly started replacing the deprecated functions with newer ones ---- lucky I had my hesitation and reservations doing that .. it just didn't seem right
RW
@mm108

declare the lib_deps entry for it as https://github.com/me-no-dev/ESPAsyncWebServer.git and it should pull automatically

That compiled without issues! Thanks a zillion

GUEST.it
@guestisp
Hi guys. I'm struggling trying to execute a VERY LONG task triggered by a websocket message. workflow is as follow:
  1. Client send a message to the ESP32, via websocket, asking to run a very long task
  2. the handler gets the message and start a freertos thread (without the thread , the watchdog kills everything) with a struct containign a reference to the asyncwebsocketclient
  3. when the thread is finished , i try to reply to the client but every time I do this, guru meditation 1 reboot the esp
any idea or a sample code ? What I need is simply: ability to run very very long tanks in a non-blocking mode and being able to reply (when done) via websocket
GUEST.it
@guestisp
Also, is AsyncJson mandatory when using inside an async websocket handler ? If yes, why and which error I would get without using it ?
GUEST.it
@guestisp
Any idea on how to transmit, almost in real-time the value got from analogRead to a websocket client without triggering the watchdog or similiar ? In other words, a web interface, communicating via websocket, has to read the ph value in realtime. and to do so, I need the analogread.
Alex Hope-O'Connor
@alexhopeoconnor
anyone getting errors like this? 'HTTP_POST' conflicts with a previous declaration
2 replies
zhivko
@zhivko
Guest.it check poolmaster esp32 project, but it is using arduono I think
It is also measuring ph
Dorward Villaruz
@dorwardv:matrix.org
[m]

I'm getting core panic'ed

13:50:53.007 -> invoked /coordinates
13:50:53.007 -> from
13:50:53.007 -> 192.168.10.2
13:50:53.007 -> 0
13:50:53.007 -> Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
13:50:53.007 -> 
13:50:53.007 -> Core  1 register dump:
13:50:53.007 -> PC      : 0x400e5803  PS      : 0x00060030  A0      : 0x800d2cce  A1      : 0x3ffd1870  
13:50:53.007 -> A2      : 0x00000010  A3      : 0x74756465  A4      : 0x0000000a  A5      : 0x0000ff00  
13:50:53.044 -> A6      : 0x00ff0000  A7      : 0xff000000  A8      : 0x00000000  A9      : 0x3ffd1850  
13:50:53.044 -> A10     : 0x00000002  A11     : 0x00000000  A12     : 0x0000000a  A13     : 0x0000ff00  
13:50:53.044 -> A14     : 0x00ff0000  A15     : 0xff000000  SAR     : 0x00000015  EXCCAUSE: 0x0000001c  
13:50:53.044 -> EXCVADDR: 0x0000001f  LBEG    : 0x4008a771  LEND    : 0x4008a781  LCOUNT  : 0xffffffff  
13:50:53.044 -> 
13:50:53.044 -> 
13:50:53.044 -> Backtrace:0x400e5800:0x3ffd18700x400d2ccb:0x3ffd1890 0x400db255:0x3ffd18d0 0x400d8eb1:0x3ffd1920 0x400d8fc1:0x3ffd1970 0x400d91a9:0x3ffd19c0 0x400d56b9:0x3ffd19e0 0x400d5749:0x3ffd1a10 0x400d5d52:0x3ffd1a30 
13:50:53.092 -> 
13:50:53.092 -> 
13:50:53.092 -> 
13:50:53.092 -> 
13:50:53.092 -> ELF file SHA256: 0000000000000000
13:50:53.092 -> 
13:50:53.092 -> Rebooting...
13:50:53.092 -> ets Jun  8 2016 00:22:57
13:50:53.092 -> 
13:50:53.092 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
13:50:53.092 -> configsip: 0, SPIWP:0xee
13:50:53.092 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
13:50:53.092 -> mode:DIO, clock div:1
13:50:53.092 -> load:0x3fff0030,len:1184
13:50:53.092 -> load:0x40078000,len:12804
13:50:53.092 -> ho 0 tail 12 room 4
13:50:53.092 -> load:0x40080400,len:3032
13:50:53.092 -> entry 0x400805e4
13:50:53.505 -> Initialize Pins
13:50:53.505 -> 
13:50:53.643 -> setupAP start
13:50:53.736 -> 192.168.10.1
13:50:53.736 -> setupAP end

Here is the corresponding html form

                <input type="text" placeholder="Longitude" id="longitude" />
                <input type="text" placeholder="Latitude" id="latitude"/>
                <input type="submit" value="Set Coordinates"/>
            </form>

and here is the server code

  server.on("/coordinates", HTTP_GET, [] (AsyncWebServerRequest *request) {
    Serial.println("/coordinates HTTP_GET");
    Serial.print("invoked ");
    Serial.println(request->url());
    Serial.println("from");
    Serial.println(request->client()->remoteIP());
    //temporary start
    Serial.println(request->args());
    int args = request->args();
    for(int i=0;i<args;i++){
      Serial.printf("ARG[%s]: %s\n", request->argName(i).c_str(), request->arg(i).c_str());
    }//temporary end    

    destLatitude = request->getParam('latitude')->value().toDouble();
    destLongitude = request->getParam('longitude')->value().toDouble();    
    Serial.println(destLatitude);
    Serial.println(destLongitude);

    request->redirect("/control");
  });

I understand that the core panic'ed is caused by longitude and latitude not in params. However, it seems I'm not getting any parameters received on the server at all. Can someone point me in the right direction?

Cheers,
Wardy