Preferences library – max key name length

According to the Preferences Example StartCounter.ino the namespace is limited to 15 chars! This is valid not only for the preferences name, but as well for the preferences keys. For example a key name bluetooth_status will fail while the key name bluetooth_stat works fine. Example and debug output: Key name with 16 characters length:

will fail to write the key value with the following error:

Changing the length of the key name to 14 characters works fine:

Read more

Expansion of NVS partition requires adapt default app partition address in esptool

If you want to increase the size of the NVS partition, the start address of the app partition changes as well. But Arduino IDE (using esptool to flash the ESP32) has the start address hard-coded. If, for example, you change your partition table into

The new start address for the application would be 0x20000 instead of 0x10000. Arduino IDE would flash the application, but to the wrong address. To flash the app to the correct address there are 2

Read more

WiFi AP and STA active at the same time

When the ESP32 is activating it’s accesspoint and then tries to connect as a client to another WiFi AP, the connection can fail. Reported by user josmunpav in issue 653. Possible solution is to set WiFi first into WIFI_MODE_APSTA mode first. Example initialization sequence:

Read more

TTGOV2 SD card support

The SD card library fails to work on the [TTGOV2]( board. User JamesGKent found a solution how to initialize the SD card:

What JamesGKent found is … from my reading here SD cards can be used in 3 modes, one of which is SPI and the other two are SD specific. on AVRs the SPI mode is normally used because there is hardware built in for it, so it is faster that software emulating either of the other two modes. on the

Read more

ESP32 framework installation on Windows XP

On Windows XP the installation of arduino-esp32 fails with an error thrown by get.exe. User JamesGKent found an explanation and partly solution. Explanation: The issue with esp32 on windows xp is get.exe, esptool.exe are basically a compiled version of the python scripts, they’ve been built with a new version of pyserial library that does not work on windows XP. Solution: Modify the platform.txt file so that it uses python like the Linux version does. Note that you’ll need to have

Read more

Problem with Adafruit FONA library

Default pin settings of the Adafruit Fona library are not working on the ESP32. User mobimation found a solution. Following changes are necessary.

needs to be


Read more

WiFi Auto Reconnect problems

User mickeypop investigated and found some solutions:

Additional explanations: While one bypasses some library issues the other uses the WiFi.onEvent() service, both simply detect when a connection is broken and re-initiate a new connection. While some have noted after several hours they keep getting bumped, this is almost certainly a function of the lease time of DHCP server in the router. If the lease time of the router is not the same sometimes devices “forget” to update causing a no IP

Read more

Alternative to install arduino-esp32 for Arduino IDE (Windows)

Same as in the original instructions, you need to have Arduino IDE and Git already installed on your computer. In Arduino IDE open the preferences. On the top you see “Sketchbook location”. For me that is “B:\Arduino-Dev”. Open git bash and go to your Sketchbook location, create a folder hardware and inside hardware create a folder espressif. This is folder where you start to clone arduino-esp32. See a list of commands below. For me the folder structure looks like:

Read more

Initialize Bluetooth Serial and BLE server

If both BLE and Bluetooth are required to operate in the code, the initialization sequence seems to be critical. Complete initialization of a BLE server and then separate initialization of Bluetooth Serial didn’t work. The correct sequence seems to be

Here is a code extract that worked for me

Full code example for the initialization can be found in this Github repo.

Read more
Free Link Directory