Search found 115 matches

by blubb
Thu Aug 02, 2018 12:26 am
Forum: ESP8266 SDK
Topic: Measuring Battery Life
Replies: 7
Views: 4228

Re: Measuring Battery Life

system_get_vdd33() directly measures the supply voltage. No other pins are required for this. The SDK manual also says that TOUT pin needs to be suspended. I am using the very simple ESP-01 modules. I have no idea what they did to that pin, but it works just fine.
by blubb
Wed Aug 01, 2018 8:37 pm
Forum: ESP8266 SDK
Topic: Measuring Battery Life
Replies: 7
Views: 4228

Re: Measuring Battery Life

Why not just try it?

The 107th (0x6B) byte has to be 0xFF.
system_get_vdd33() returns the voltage in 1/1024 Volt.

So calculate system_get_vdd33() * 1000L >> 10 to get the battery voltage in mV.

It works here... (ESP-01)
by blubb
Wed Jul 11, 2018 5:12 pm
Forum: ESP8266 SDK
Topic: SPI Erase Sector OTA
Replies: 4
Views: 1966

Re: SPI Erase Sector OTA

You can only write zeros (0) into a flash memory. If you need to put a one (1) into a bit that was zero before, you have to erase the whole block and after that zero out the bits that need to be zero. Erasing is a totally different from writing. That is the short summary of how all flash memories wo...
by blubb
Tue Jul 10, 2018 5:36 pm
Forum: ESP8266 SDK
Topic: SPI Erase Sector OTA
Replies: 4
Views: 1966

Re: SPI Erase Sector OTA

That is for technical reasons. In flash memory only zeros can be written as single bits.
https://en.wikipedia.org/wiki/Flash_mem ... ck_erasure
by blubb
Fri Jun 22, 2018 9:47 pm
Forum: General Q&A
Topic: What determines the properties of the SPI flash: hardware or software ?
Replies: 2
Views: 3130

Re: What determines the properties of the SPI flash: hardware or software ?

You have to set the values according to your hardware. The chip reads the values in a fail-safe default mode upon boot and then switches to the given mode. Likewise it expects the images to be at the positions based on your flash map setting. https://github.com/espressif/esptool/wiki/Firmware-Image-...
by blubb
Sun Jun 10, 2018 11:53 pm
Forum: ESP8266 SDK
Topic: [solved] Network found by wifi_station_scan() but "no Network found, reconnect after 1s"
Replies: 3
Views: 2904

Re: Network found by wifi_station_scan() but "no Network found, reconnect after 1s"

Local non-static variables are not initialized, which typically means they contain garbage. struct station_config has more fields than ssid and password. Try stationConfig.bssid_set = 0; Edit: But it is better to zero out the whole thing first- for future compatibility. They added even more fields i...
by blubb
Wed Apr 25, 2018 2:02 am
Forum: ESP8266 SDK
Topic: Suppressing WiFi diagnostic messages
Replies: 2
Views: 1209

Re: Suppressing WiFi diagnostic messages

Have you tried this?

system_set_os_print(0);
by blubb
Thu Apr 12, 2018 5:33 pm
Forum: General Q&A
Topic: Which "sleep mode" is best for this purpose?
Replies: 1
Views: 1915

Re: Which "sleep mode" is best for this purpose?

If you send every 15 seconds, it is better to keep the wifi connection. How long does it take to reconnect? Try it.

You also need a timer, so modem sleep would be the best solution (the clock is halted in the higher sleep modes).
by blubb
Sun Apr 08, 2018 5:52 pm
Forum: ESP8266 SDK
Topic: system_phy_freq_trace_enable()
Replies: 3
Views: 1461

Re: system_phy_freq_trace_enable()

Documentation is very poor on this api.

If it is improved, I'd also like to know what the numbers mean. If enabled, new stuff like this is logged:

f r0, scandone
sta scan trace -19
reconnect
f r-19, scandone
by blubb
Sat Apr 07, 2018 7:07 am
Forum: ESP8266 HDK
Topic: Is there a serial number or unique ID in the chip
Replies: 10
Views: 47612

Re: Is there a serial number or unique ID in the chip

I've had 100+ esp modules on my lab desk and none had a chip id > 0x00FFFFFF, i.e. only 24 bits (3 bytes from the default mac address). For that reason I use (as unique id) the default mac address instead.

Go to advanced search