Using LoRa (Long Range) communication with the Semtech SX1261/1262/1268 modules

Introduction to LoRa Beside of the wireless communication systems WiFi, Bluetooth and GSM/LTE, there is a less known technology called LoRa that enables 2 devices to communicate with each other over a longer range, in perfect scenarios over kilometers without the need of WiFi access points,  repeaters or cell towers. Available since quite some time with different protocols, the long range communication system is using a license free (at least in most countries) Sub-1GHz radio band called ISM ( industrial, scientific

Read more

ESP32 application log output in the same format as the core log output

I love the ESP32 core level log output. It is easy to configure and gives me the file name and line number where the log output was created:

But when I want to use the same log functions for log output from my application, I have the problem that all output is mixed up and it is difficult to see the logs from my application between all the lines of the core log output:

What I want is

Read more

painlessMesh and Android

Links Source code (Open Source, MIT license) App on Google Play App on F-DROID (pending) painlessMesh Intro Some time ago I got interested in painlessMesh for ESP8266 and ESP32. painlessMesh is a mesh network for ESP8266 and ESP32 and it is quite easy to implement in your ESP projects. The advantage of a mesh network is that your sensor and actuator nodes are not depending on a connection to your home WiFi network. There are several different possibilities to build up

Read more

ESP32 Using the HW timers

When I started programming on the ESP32 there was no Ticker library available as I was used to from the ESP8266 and Arduino. So I decided to write some code that makes it easy for me to use the ESP32’s hardware timers. But before I explain the code, some essentials about the HW timers. There are only 4 HW timers available, so the code snippet I made is supporting only 4 timers. The code snippet for the HW timer wrapper

Read more

Change partition size (Arduino IDE)

DEPRECATED. The partition size can now be choosen from the Tools–>Partition Scheme menu. To change the partition size for ESP32 using Arduino IDE I recommend this approach: Create a new partition description file in <LOCATION_OF_ARDUINO_ESP32>/tools/partitions , e.g max.csv

The above example gives you a partition size of 0x1E0000 or 1966080 bytes on cost of a smaller SPIFFS partition. Edit <LOCATION_OF_ARDUINO_ESP32>/boards.txt Make a copy of the board description that you want to change the partition size for, in this example

Read more

ESP32 WiFi setup over Bluetooth Serial (ESP32 code)

In my other post I wrote about setting up the ESP32 WiFi credentials over BLE. While testing and playing around with different phones, I found that even a quite new (but as well very cheap phone) I have does not support BLE. So I sat back in front of my development IDE and wrote something similar, but this time using Bluetooth Serial as communication. Most of the code is the same as in ESP32 WiFi setup over BLE so I

Read more

ESP32 WiFi setup over BLE (ESP32 code)

Most small applications that we write have the WiFi credentials integrated in the code. But sometimes you do not want to have your WiFi credentials in the source code, specially if it is open source and maybe accessible as a repository on Github or Bitbucket. Having the WiFi credentials in the code is as well not practical if you sell your devices to others that need to setup the WiFi credentials according to their local network. There are several solutions

Read more

ESP32 Bluetooth Serial and BLE server running together

There is a new kid coming into the arduino-esp32 world. A Bluetooth Serial library that allows you to use Bluetooth (not BLE) like a serial port. This way you can connect the ESP32 over Bluetooth to an Android app like the Serial Bluetooth Terminal and use it as a serial in/out interface. The library is not yet in the arduino-esp32 repository, but I grabbed a preview from copercini’s repo. It is working fine, I could connect my Android tablet to my

Read more

WiFi connection problem – NVS corrupted

If you have WiFi connection problems where WiFi.status() always returns WL_NO_SSID_AVAIL even you are sure that the AP is available and working, it might be that the NVS storage has been corrupted. The NVS storage is the place where esp-idf stores the WiFi credentials. See issue wifi connection problem on Arduino-esp32. To check if your NVS storage is corrupted you can use ESP32-Show_nvs_keys provided by stickbreaker. If your NVS storage is corrupted you can use the following code snippet to

Read more
Free Link Directory