-
Building an SPI Sniffer for ESP32
06/04/2020 at 15:51 • 0 commentsAs you could read in last Log post if you follow this project I'm slowly coding a new IDF component to act as an epaper driver.
And in that process I'm reverse engineering GxEPD that is the library we actually use in CALE Firmware.
Actual branch is:https://github.com/martinberlin/cale-idf/tree/refactor/oop
Since I'm refactoring the OOP part. And doing so I found out that even that I'm sending the same SPI commands and data than GxEPD some models are refusing to work. My father come up with a great idea:
If you have the face to reverse engineer an existing library then do it well!
Add an ESP32 SPI Slave sniffer and check exactly what the Epaper display receives.So I put my hands at work:
That's basically the setup, the one labeled as Ein is the SPI slave and the other ESP32 the master. Now that was not going to be so easy as finding an existing working code and modifying it to my needs. First tried with Espressif own SPI slave example in IDF framework. For some reason, mostly because I'm still a beginner with the framework, it didn't work. And then found an Arduino-framework version that did but it was outdated and didn't compiled. So I fixed it:
https://github.com/martinberlin/esp32-spi-slaveNow doing a SPI slave with a CPU based chip is not a task for the faint of the heart. Is not a native SPI slave device and according to Espressif documentation
The ESP32 SPI slave peripherals are designed as general purpose Devices controlled by a CPU. As opposed to dedicated slaves, CPU-based SPI Devices have a limited number of pre-defined registers. All transactions must be handled by the CPU, which means that the transfers and responses are not real-time, and there might be noticeable latency.And yes there is! Apart of that if you want to this in real-time and output the results via Serial, you will be limited by the UART speed, so the idea was to make the UART high like 500000 instead of default 115200 and also downgrade the SPI speed of the master.
It's working but still loosing 1 or 2 bytes each 44 which is still not good. In the way I found some strange things, like an 0x78 byte that is not sent by the master (otherwise epapers will not work) and also the challenging task of detecting what is a CMD ( in GxEPD a command puts additionally DC - data command GPIO low to send and high after sending) DATA puts only SS pin low/high (CMD toogles both SS & DC to send)
Doing that in real-time is not easy. Additionally I got a cheap Logic-Analyzer that will help me to find out why some of my Epapers won't update with my own class.If it happens to tick your interest then check the CALE-IDF repository that is starting to take form and soon will be the component, CalEPD epaper driver, detached and pushed in it's own repository so also another people can use it.
-
ESP-IDF version being build slowly
05/19/2020 at 07:31 • 0 commentsIf you want to join the efforts please put this repository under your Radar:
https://github.com/martinberlin/cale-idf
It will take time since I started beginning of 2020 really focusing my efforts to learn IDF, submodules, C++ classes "in deep" and more concepts.
It's exciting and a challenging build since there is not such a thing as GxEPD multi epaper class for ESP-IDF or at least I didn't found it and is a good oportunity to create something that can be not only used in the CALE project but also added as a component in any epaper Firmware.
-
CALE TFT Firmware is ready to be tested
04/24/2020 at 11:43 • 1 commentYou can download the right repository here:
https://cale.es/firmware-tftThis example Firmware does provides three things only:
- A way to download a JPG image from an external URL into ESP32
- An interpreter that reads this jpeg image and prepares a Buffer for the display (based on JPEGDecoder library examples)
- An authorization Token to make sure you don't need to leave your Calendar events open to the world (Bearer token)
Proof-of-concept video:
https://twitter.com/martinfasani/status/1253594911204655104
Half loading image bug has been solved. The problem is that sometimes in ESP32 WiFiClient the client.available() returns false and stops downloading. Circumvented it with an incremental counter. If you have a better idea just leave your comments
-
Register and get a 3D-Printed housing for your CALE
04/21/2020 at 08:53 • 0 commentsWe are offering to 3D-Print a T5S case for free just register in CALE.es
We will pay the shipping cost but only for Europe but if you live outside EU I will ask just to cover the difference to your area. This it how it looks the case when assembled:
CALE project has been sponsored by makers store digitspace.com
-
Announcing the Bluetooth Firmware + Android app the default configuration
04/13/2020 at 08:24 • 0 commentsThe master branch of the eink-calendar github repository now defaults to Bluetooth configuration sent over Bluetooth by an Android app.
Please read more about how the process goes here:
https://cale.es/firmware-bluetooth
It basically sends all configuration needed to the ESP32, screen URL and WiFi configuration, to the ESP32 in an easy step after scanning a QR code to list your screens in the App. This Android app and Bluetooth configuration that works in a few clicks is for us the state-of-the-art configuration for IoT devices.
No WiFi managers, no hardcoded C config, just send your Firmware the config per Bluetooth and let it restart and do it's job. This will allow us to ship pre-assembled displays withouth the need to have the user installing compiling tools on his computer and ultimately leating CALE be used by a broad amount of non-technical people that just wants it's functionality but not it's complexity.
CALE project has been sponsored by makers store digitspace.com
-
Adding service times and an internal API
04/09/2020 at 12:01 • 0 commentsAt CALE we are implementing this weekend a very fast and reliable API with the mission to serve content to the new CALE Android app, that is already published in Google play store, but I'm making the last updates for a more user friendly release in the next days
- Service times
With this feature we will be able to check if the display needs to be
updated on every wakeup. For exanple defining Monday -> Friday from 8 to 17:59 Hrs it will update the display only when it wakes up between this service times. How is done? The firmware will ping the new CALE API with their screen_id and the API will respond with a single byte: 0 or 1, when is 1 the refresh will take place Firmware update will be released on the weekend. This will enable us not only to make battery lifetime longer but also to spare API calls since not all the APIs are free (I use for example AWS Cloudwatch and it costs around 3 dollars per month) - Mobile API
Just for a preview, after login enter in: cale.es and preview the QR code. The idea is to enable the CALE App to scan this code and then the Android App will be connected to CALE. Planning to list screens, logs, and of course send send Screen configurations with one click, without need to copy/paste from the website
Please note that we are also offering to print T5S board housings for free if you register in CALE.es
CALE project has been sponsored by makers store digitspace.com
- Service times
-
Bluetooth configuration is ready to be tested
04/02/2020 at 12:56 • 0 commentsAfter about one week of work and 3 public repositories being updated:
1. CALE app | 2. C++ Firmware (cale_ble branch) | 3. CALE WebserviceI managed to get first Bluetooth app and Firmware working together. The idea is the config will be simplified to copying one JSON string only that will contain at the same time:
- WiFi SSID + Password 1
- WiFi SSID + Password 2
- Screen URL
- Bearer token
This will be sent to the Firmware per Bluetooth (Only ESP32 of course since ESP8266 does not have Bluetooth)
And it will save it on Preferences, restart, and Voila! Your display should refresh with the Screen URL and go to sleep until next refresh.
Now we would like to invite the project followers to try it. And of course if you have fellow hackers that like EINK displays, please give them a hint and invite them to test CALE.es
CALE project has been sponsored by makers store digitspace.com
-
A Firmware for the awesome ESP32 TyniPICO
03/24/2020 at 06:01 • 0 commentsSince Unexpected Maker’s tiny ESP32 project saw the light a few months ago I’ve been a great fan of it. Not only because it’s the makers dream ESP32, packed with a DotStar Neopixel and a very small mini design, but mostly because it beats many other boards out of there regarding low consumption. Optimizing it the best we could and following the authors library helpers we managed to get a 0.08 mA deepsleep. Please check this branch to try it out:
https://github.com/martinberlin/eink-calendar/tree/cale_tinypico
Please note that we are also offering to print T5S board housings for free if you register in CALE.es
CALE project has been sponsored by makers store digitspace.com
-
New case for the Lilygo T5 board: 2.13“ eink (250x122 pix)
03/09/2020 at 06:04 • 0 commentsIf you want a WiFi „Post-it“ ePaper this is your thing. For about 15 u$ in Aliexpress this small eink boards with ESP32 included are an absolute beauty. The even have a mini speaker and amplifier inside.
Firmware: https://github.com/martinberlin/eink-calendar/tree/cale_t5
https://www.thingiverse.com/thing:4209788 Download and print
T5 Case and project has been sponsored by www.digitspace.com electronic parts storePlease note that we are also offering to print T5S board housings for free if you register in CALE.es
This board is slightly bigger than 2.13" is 2.7" and has 264*176 pixels to display
CALE project has been sponsored by makers store digitspace.com
-
cale administrator is online
02/20/2020 at 12:57 • 0 commentsCALE is already launched and generating E-Ink bitmaps
This will let you connect with external APIs such as google Calendar and create Screens for your ESP32 displays
Register hereServer architecture and request/response flow
Please note that we are also offering to print T5S board housings for free if you register in CALE.es
CALE project has been sponsored by makers store digitspace.com