Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Hasenradball
@hasenradball
No that not what I mean, I want to encrypt it during sending
console I mean the developer area -> F12where you can see the post data and son on...
Drzony
@drzony
yes
you will always see the data there, even when using SSL (i.e. https)
SSL only protects from man-in-the-middle attacks
for example when someone like your ISP wants to see the data
do you want to make ESP directly visible on the internet?
or are you afraid of bad actors in your local network?
Hasenradball
@hasenradball
no I am not afraid :-)
But I want to check out how I will work on the ESP.
Hasenradball
@hasenradball
@drzony and I heard that the https faster than http ist this right?
Drzony
@drzony
no
on ESP one https request takes about 3 seconds
(client one)
the server one will probably be even longer
https = http inside SSL, so it cannot be faster
Drzony
@drzony
@earlephilhower Either way I don't think that @hasenradball really needs https
Considering that most browsers will give warnings about self-signed certificates
and all the fuss with setting up https
Hasenradball
@hasenradball
Thanks for the Info I will have a look at the https examples, but if its not faster than http it is not an benefit for me. :-)
Earle F. Philhower, III
@earlephilhower
HTTP's auth is insanely insecure (plaintext b64!) so using TLS to protect that is generally a good practice (but slow on the 8266). But yes, there's no way to keep the browser itself from knowing the password...that's just kind of silly. Anyway, the examples do show both methods so he should be able to choose accordingly. Good luck!
Hasenradball
@hasenradball
:-)
Drzony
@drzony
@earlephilhower If it's only required for sending passwords, then I would go with encrypting it in JS with some master password. Using TLS without validating server cert (i.e. clicking through self signed warning) is also insecure (third party can trick you into entering password on their server)
Hasenradball
@hasenradball
Hello is it possible to send a post request to the ESP8266Webserver with json-formatted data or has the data always be in the type of x-www-form-urlencoded?
2 replies
Chris Dalby
@moose4621

Hoping for some knowledge from the brains trust here. I have been battling with a problem with the Arduino IDE for several weeks where I cannot upload to a Wemos D1 mini via the usb port, on all three computers, all running Ubuntu 20.04, Arduino 1.8.13, and esp core 3.0.2 but also tried 3.0.0 and 2.7.4 from GitHub.
I have been playing with the Wemos D1 mini's for a few years now and are usually having no trouble uploading via USB. I can upload to AVR boards via USB without problem. It seems specific to the esp8266 based boards.
The fault I get in Arduino is as follows:

Arduino: 1.8.13 (Linux), Board: "LOLIN(WEMOS) D1 R2 & mini, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:1MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

Executable segment sizes:
ICACHE : 32768           - flash instruction cache 
IROM   : 355044          - code in flash         (default or ICACHE_FLASH_ATTR) 
IRAM   : 29385   / 32768 - code in IRAM          (IRAM_ATTR, ISRs...) 
DATA   : 1524  )         - initialized variables (global, static) in RAM/HEAP 
RODATA : 2736  ) / 81920 - constants             (global, static) in RAM/HEAP 
BSS    : 28368 )         - zeroed variables      (global, static) in RAM/HEAP 
Sketch uses 388689 bytes (37%) of program storage space. Maximum is 1044464 bytes.
Global variables use 32628 bytes (39%) of dynamic memory, leaving 49292 bytes for local variables. Maximum is 81920 bytes.
esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._____....._____....._____
Traceback (most recent call last):
  File "/home/chris/arduino-1.8.13/hardware/esp8266com/esp8266/tools/upload.py", line 66, in <module>
    esptool.main(cmdline)
  File "/home/chris/arduino-1.8.13/hardware/esp8266com/esp8266/tools/esptool/esptool.py", line 3552, in main
    esp.connect(args.before, args.connect_attempts)
  File "/home/chris/arduino-1.8.13/hardware/esp8266com/esp8266/tools/esptool/esptool.py", line 529, in connect
    raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

It looks like a Python fault, but thats ...errrr.... above my pay grade. ;-)

This is what's weird. If I run a VM Win7 from within the same Ubuntu 20.04, I can upload via USB no problem from the windoze Arduino ide which is running in the VM on the Ubuntu host.

No doubt someone is looking at this and slapping their forehead while muttering "why doesn't he just do ??this", but the solution is not obvious to me. Any help would be appreciated.

Sorry 'bout the formatting.
Chris Dalby
@moose4621

In addition, I have two versions of Python installed.

chris@chris-Inspiron-5593:~$ python -V
Python 2.7.18
chris@chris-Inspiron-5593:~$ python3 -V
Python 3.8.10

Apparently it is most unwise to uninstall the distro's default Python 2.7.x.

d-a-v
@d-a-v:matrix.org
[m]
This issue is coming from esptool. You can get your sketch's binary file (from /tmp/arduino_build_nnnn) and try to flash it with esptool:
esptool.py --chip esp8266 --port /dev/ttyUSB0 --baud 115200 --trace write_flash 0x0 sketch.bin
Chris Dalby
@moose4621
Thanks for the suggestion @d-a-v:matrix.org .
Unfortunately
A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header
Seems esptool or Python is the issue.
Earle F. Philhower, III
@earlephilhower:matrix.org
[m]
Check your kernel version. There was a regression in a late model Linux kernel in a USB-to-serial driver that made it incompatible with the way ESPtool uses it.
Fixed in linux mainline, no idea if it's fixed in Ubuntu kernels yet
Chris Dalby
@moose4621
@earlephilhower:matrix.org Well spotted. I will check that out. Sounds like my problem.
Chris Dalby
@moose4621
@earlephilhower:matrix.org That helped a lot. Thank you. Seems 5.4.0-89 and 5.4.0-88 are both affected. The only other kernel I have loaded is 5.3.0-050300-generic which cured the fault.
So deciding if I go further an load other kernels looking for the point of failure or just sit on 5.3.0 and wait for an update.
Chris Dalby
@moose4621
5.15.0-051500-generic kernel now installed. All good except....
I cannot see the OTA ports in the ide now.
Jeroen88
@Jeroen88
@earlephilhower:matrix.org I have ported the BearSSL library to the ESP32 and I am currently working on a generic Client that takes another Client as parameter in it's constructor and adds TLS to it. probeMaxFragmentLength() is already working, dynamically creating the IO buffers, as is setting certificates as TAs. Also I think I can get setInsecure() and fingerprints going. However, allowSelfSignedCerts() will be difficult. But what is the real reason for this method? It is almost the same as setInsecure() apart from checking a self signed cert. But if someone wants to spoof the server, adding a self signed cert is very easy. What is the added value of checking self signed certificates?
Earle F. Philhower, III
@earlephilhower:matrix.org
[m]
@Jeroen88: That's a good question. This method was added to support axTLS backwards compatibility. I would not add it to a new port. There really is no added security with it.
Jeroen88
@Jeroen88
Thnx @earlephilhower:matrix.org !
Clemens Kirchgatterer
@everslick
bearssl on esp32 sounds very cool! I'm looking forward giving it a try.
Shelby Merrick
@forkineye
@d-a-v:matrix.org I noticed LWIP 2.1.3 was released recently - https://lists.nongnu.org/archive/html/lwip-users/2021-11/msg00001.html. Are you all planning to pull it into the core?
d-a-v
@d-a-v:matrix.org
[m]
Yes
Paulo Cabral Sanz
@paulocsanz
Hi, I'm on master and am getting a Software WDT Reset on this line https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp#L626, would there be anything on my side that could cause this? or it's probably a bug?
0x4021f788 in __esp_delay at /home/no/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/core_esp8266_main.cpp:152
0x4021f7e1 in esp_try_delay(unsigned int, unsigned int, unsigned int) at /home/no/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/core_esp8266_main.cpp:171
0x40214cac in esp_delay<ESP8266WiFiGenericClass::hostByName(char const*, IPAddress&, uint32_t)::<lambda()> > at /home/no/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/coredecls.h:66
 (inlined by) ESP8266WiFiGenericClass::hostByName(char const*, IPAddress&, unsigned int) at /home/no/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp:628
1 reply
Hasenradball
@hasenradball
Hi together,
Is it necessary on the ESP8266 to set the pinMode(A0, INPUT), when using the analogRead(A0) function?
2 replies
Hasenradball
@hasenradball
Does anybody know if I can also use Google test in PIO with the ESP8266 core, or doe i have to use the Unit test with ist provieded by PIO?
1 reply
Hasenradball
@hasenradball
Hi guys, is there an wax to query the actual rf_mode?
WAKE_RF_DEFAULT, WAKE_RFCAL, WAKE_NO_RFCAL, WAKE_RF_DISABLED. (GPIO16 needs to be tied to RST to wake from deepSleep.) 
The chip can sleep for at most ESP.deepSleepMax() microseconds.
If you implement deep sleep with WAKE_RF_DISABLED and require WiFi functionality on wake up, 
you will need to implement an additional WAKE_RF_DEFAULT before WiFi functionality is available.
Hasenradball
@hasenradball
My question corresponds to this in the documentation: