ESP8266 Treppenlichtsteuerung mit OTA zum Firmware Upload
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

doku.md 1.2KB

3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. Hardware Timer didnt work https://github.com/khoih-prog/ESP8266TimerInterrupt#why-using-isr-based-hardware-timer-interrupt-is-better
  2. => Software Timer https://ullisroboterseite.de/esp8266-timing.html#timer
  3. ### __Zum aktivieren von GDBStub:__
  4. ```c
  5. #include <GDBStub.h>
  6. ...
  7. void setup() {
  8. Serial.begin(460800);
  9. gdbstub_init();
  10. ```
  11. ### __Achtung !__
  12. GDB muss dafür compiled werden
  13. GDB-Version aus Arduino Toolchain hat Support
  14. ```sh
  15. $ ./start_xtensa_gdb_stub.sh
  16. ```
  17. ### __Achtung !__
  18. Don`t forget __\r__
  19. ESP-OTA wird von ufw oder Defender geblockt.
  20. - Windows -> Python needs to be granted with rights
  21. - Linux -> open udp port in ufw ->
  22. ```sh
  23. platform.ini
  24. upload_flags =
  25. --host-port <PORT>
  26. ...
  27. $ sudo ufw allow tcp/<PORT>
  28. ```
  29. ```c++
  30. server.streamFile(f, mime::getContentType(SRH::_path), requestMethod);
  31. =====>
  32. const String& p = SRH::_path;
  33. if(p.endsWith(".gzip")) {
  34. server.sendHeader("Content-Encoding", "gzip");
  35. server.streamFile(f, mime::getContentType(p.substring(0, p.length()-5)), requestMethod);
  36. }
  37. else
  38. server.streamFile(f, mime::getContentType(SRH::_path), requestMethod);
  39. ```
  40. Webserver on v0.3.0 now working with LittleFS
  41. TODO:
  42. - check dir for files automatic
  43. - move handleNotFound to httpserver.h
  44. - maybe compress files ?