Introduction: A Problem Hiding in Plain Sight Direct I/O ( O_DIRECT ) has been a contentious feature in Linux since its introduction. Linus Torvalds famously called it a design “by a deranged monkey on some serious mind-controlling substances” back in 2002. Yet for years, it continued to work—mostly. Applications used it, databases relied on it, and virtual machines benefited from its…
Introduction I’ve been working on a new project that required high-performance UDP load balancing with dynamic weight adjustment. Traditional userspace load balancers introduce latency that’s unacceptable for our use case, so I decided to implement a kernel-level solution using eBPF (extended Berkeley Packet Filter). The result is ebpflb_udp_wrr , an eBPF-based UDP load balancer that…
Introduction: The Illusion of Sequential Execution When you write code, you naturally think in terms of sequential execution: instruction A happens, then instruction B, then instruction C. This mental model works perfectly—until you start writing concurrent code or working with hardware. Then you discover that modern CPUs, compilers, and memory systems conspire to execute your code in ways you…
A Networking Mystery Over the past two days, I found myself conducting a complete forensic analysis of my network. Something unexpected had changed the IP address of my main host’s bridge0 interface. Given that a critical React Server Components vulnerability had been released ( GHSA-fv66-9v8q-g76r ), and I had recently deployed several new Docker containers—some with access to the host…
The Hardware Testing Challenge When developing hardware, the challenging phase begins after the prototype is designed and PCBs are manufactured. The easy part—conceptualization and board design—is behind you. What follows is infinitely harder: Making boards electrically alive and verifying proper operation with electrical jigs and test equipment Programming and validating firmware behavior Testing…
Why ESP32C5? I’m researching hardware options for an upcoming project, and the ESP32 family appears to be the best fit for our current requirements. For years, a major drawback of Espressif chips was limited support to 2.4GHz WiFi only. Why does this matter? Having a 2.4GHz device on a WiFi network degrades performance for all other devices, forcing users to set up separate WiFi routers just…
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…
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…
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:…
Catching up with the latest ESP8266_NONOS_SDK_V2.0.0_16_07_19 – got into some issues. Seems like Espressif integrated some time compatibility functions into libmain.a which i already had into the tree, most likely due mbed tls port If you have millis(), micros(), mktime() and friends then you may need to comment them out. There is one exception – open soruce xtensa gcc provides time() which is…
Espressif announced on 05/11/2015 the upcoming ESP32 chip: 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…
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 Part of the configuration Schedule editor
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…
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…
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: We do not belive the hype! We design useful things! We aim for the win-win-win! We keep everyone and everything secure! We build and promote a culture of privacy! We are deliberate of what data we collect! We make the parties associated with an IoT…
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: How to concatenate the espfs filesystem image with the firmware images. 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…
Engineering Internet Of Things Secure network for our upcoming IoT service. Goals: Security Redundancy End to End Security Secure Firmware Upgrades Threats: DoS Attacks DDoS Attacks DNS spoofing /don’t even think of DynDNS/ Sniffing man in the middle Security: Using a VPN -> takes the problem away and requires extra settup. Not user friendly. The only pro is that it can use an existing…
Which goes where – when using a bootloader for FOTA. The files: master_device_key.bin – Obtained from Espressif Cloud esp_init_data_default.bin – Stores default RF parameter values boot.bin – bootloader user1.bin and user2.bin – user firmware blank.bin – blank settings , flash to get default parameters 512KB master_device_key.bin 0x3E000 esp_init_data_default.bin 0x7C000 blank.bin 0x7E000 boot.bin…
Finding the Right Development Board When developing IoT applications with the ESP8266, two key requirements immediately become apparent: you need sufficient flash memory for your application and firmware, and you need a board that fits comfortably on a breadboard for prototyping and testing. I faced this challenge and needed to evaluate my options. Soldering additional flash chips onto bare…
Hi, A simple i2c driver for the Microchip’s TCN75A thermometer – supports up to 8 thermometers. Driver works in one shot mode which is suitable for battery powered operations. The chip is with quite good specs for its price. Code at github esp_i2c_tcn75a . Usage: checkout user/user_main.c for example usage. Enjoy! 73
After a lots of lots of wasted hours debugging an I2C driver it came out that the noise from the connected cheep USB2TTL converter is way too much. Would have lost months without the help of the new DS1054z scope i’ve got. So i came up with this – a simple UDP debugging. Simple socket to send udp messages. dbg Call dbg_udp_start(0) and you are ready to go. If you prefer not to flood your LAN with…
I’ve got a new tool at the LAB! The Box: The Tool: Having an oscilloscope is just priceless. You may need it rarely but there are times when you are just lost blind without it. The video lists all you should now about it and a bit more If you are considering to get one and you are in EU. I can recommend Silcon.cz – you will get a nice service there.
When repairing stuff with a motor the first question is: “Is it the motor or is it the board that failed?” For a recent Inverter Air Conditioner board repair the following tool helped to answer that question. Simulate the circuit The circuit can act as Induction Motor aka asynchronous motor . Inverter Air Conditioners which use AC motors take the 220V from the grid and turn them into about 150V…
While working on a current project i’ve faced an issue with code reuse. Espressif sdk allows only one interrupt handler for all GPIOs. That’s fine for monolithic code but since we like modular code a dispatcher comes handy. The little inconvenience i’ve had was like this. I wanted to use the drivers/key.c code but it does use the data argument , so i’ve had to modify it to use a global variable.…
$ open devlog I’ve back imported footprints for a .cmp file and I’ve misunderstood kicad’s question about the imported footprints visibility, so all went visible. And surprise, you can not edit visibility for all fields at once. So little utility was born – fixvis . Usage is pretty simple: ./fixvis file.sch fieldid newval where fieldid is: 0 - Reference 1 - Value 2 - Footprint 3 - Datasheet 4+ -…
Spend last weekend trying to make apache with proxy_wstunnel to work. The solution recommended is to add this in the apache config: ProxyRequests off ProxyPass /mqtt ws://127.0.0.1:8082 ProxyPassReverse /mqtt ws://127.0.0.1:8082 But no matter what it is a no go. So, where is the problem? It’s the libwebsockets it doesn’t understand custom http headers X-… but apache adds some. To add support for…
The esp8266 chip is made by Espressif Systems . ESP8266 is a highly integrated chip designed for the needs of a new connected world. It offers a complete and self-contained Wi-Fi networking solution, allowing it to either host the application or to offload all Wi-Fi networking functions from another application processor. The chip have both certifications FCC and CE. You can sell your products to…
Here you will read about the latest research and development at the lab. I follow the latest trends in technology with bias to the Open Software and Hardware.
R&D Blog Here you will read about the latest research and development. I follow the latest trends in technology with bias to the Open Software and Hardware. Contact Us Your email: Your message: Send
Current focus is on the Internet Of Things hype. Why call it a hype? A lot of people were doing it for the past decades – just like anything that gets conquered by the internet. So now is time to connect it. What to connect: Your Door Bell Your presence at every room Your fridge Your car Your house Your appliances Your …. dog ?