General

Using Compiler and ELF to Avoid Ifdef and Flags Hell for Selecting Runtime Features

Using Compiler and ELF to Avoid Ifdef and Flags Hell for Selecting Runtime Features

I was digging into redis source recently and i came to realise some lesser know features
of gcc/clang needs some more publicity, so i will write about them here.

The problem: You want to get best of the CPU/Hardware/Features but usual way to do this
is either build for specific hardware or use runtime checks both have drawbacks.
First on a new hardware you need a new build and results in

Vevor 7 In 1 Weather Station - send data to Windy and Home Assistant

Vevor 7 in 1 Wifi to Windy and HomeAssistant

For a long time i wanted to install a weather station but since
i have to put it on a roof which is easily accessded by outside
people i needed something on the budget side.

So during a recent Ali promotion i got one - Vevor 7 In 1 WiFi
model.

You need the WiFi version, there non-WiFi version which you can work
with too but you need to have RTL SDR dongles and recode radio data send
from the outdoor unit to the sensor. This post is about the WiFi only.

Getting Started with STM8 MCUs under linux

SDCC

Install from distribution repositories but you need at least version 3.7.0.

Source code is available at  http://sdcc.sourceforge.net/ .

When building you may want to disable some of the supported MCUs.

 

stm8-bin utils – get from https://stm8-binutils-gdb.sourceforge.io/

SPL Patches – get from https://github.com/gicking/STM8-SPL_SDCC_patch

Get the SPL for your device from st.com:

– STM8S/A: “STSW-STM8069”
– STM8L10x: “STSW-STM8012”
– STM8L15x-16x-05x-AL31-L: “STSW-STM8016”
– STM8TL5x: “STSW-STM8030”

How to update makefiles - use examples as base

 

How to debug : need a jtag connection or a serial output for hardcore printf debugging

Happy First Birthday!

Hi, Dear Reader!

 

Just to note that we have had an exceptional first year!

More to come …

 

Thank you!

 

ESP32 is comming

Espressif announced on 05/11/2015 the upcoming ESP32 chip:esp32ann

 

While the specs are impressive a lot of questions a rise :

  • Support – Espressif is a small company as far as we knew – would they be able to support both chips in the long term?
  • Compatibility with esp8266?  – The new ESP32 will use the RTOS based SDK and most APIs are said to be compatible with the esp8266 SDK.
  • Price – The price will be higher than esp8266  but not much higher.

Beta testing program is coming soon.

Getting there

A Teaser of What to expect from our upcoming WiFi connected 2 channel relay board.

Web UI of the relay board

Main control screen and part of the configuration

Main control screen
webui

Part of the configuration
webui6

Schedule editor
webui8

Use User’s Geo Location for Smart Control

There are some products on the market of smart thermostats/controllers that rely on knowing the user Geo Location to act “smart” – is this really smart?

When user is at given location there are several methods to figure it out:

Active:

  • Pinging an IP address presence
  • Checking current WiFi network name
  • Using arping to check mac address presence

Passive:

  • Listening for specific packets

All above are good if you do not need an extra time to react and that’s the problem. You can shutdown all the lights when no one is present.

ESP8266 Secure CA Verification

While working on a secure cloud for the gang of the esp8266 based devices we are developing we need SSL – real and secure.

And this August is the month of the SSL issues , it seems , but thankful to the Espressifs’ quick support they are on the way out.

SSL Memory Leak

The latest SDK v1.3.0 introduced a bug that simply didn’t call the disconnect callback of esp connections under some circumstances and that in turn leaked memory.  It’s not clarified but the case was when you had a tcp listener and ssl connection after the ssl connection is over, your tcp listener connections did receive disconnect callbacks anymore.  You can get the fix from bbs.espressif.cn

IOT DESIGN MANIFESTO

Hi,

I have signed the IoT Design Manifesto – if you are into IoT. You should too.

Here is the link Sign The Manifesto.

These are the highlights of it:

  1. We do not belive the hype!
  2. We design useful things!
  3. We aim for the win-win-win!
  4. We keep everyone and everything secure!
  5. We build and promote a culture of privacy!
  6. We are deliberate of what data we collect!
  7. We make the parties associated with an IoT product Explicit!
  8. We empower users to be masters of their own domain!
  9. We design things for their lifetime!
  10. In the End We Are Human beings!

 

ESP8266 building OTA firmware for 2MB boards

During the past weeks i’ve worked on getting the FOTA upgrades work on the 2MB boards by Olimex.

The wonderful esp-link project by Thorsten von Eicken was a great example of  two things:

  1. How to concatenate the espfs filesystem image with the firmware images.
  2. How to properly write a new image to the flash.

It was a nice example to start with.

So after a lot of fiddling with  Makefiles, cgi routines and esptool  – i’ve finally got the OTA working.