Making ezShare WiFi SD work seamlessly with OpenWRT, docker and other black magic

Basically an SD card with WiFi. At one time there were even Transcend cards with OpenWRT on them, but they ran out quickly and I didn’t manage to get my hands on any of them. They were replaced by cards with an obscure chip from some weird lzeal. I managed to find a little to no documentation on them, except for a wild guess that there must be no embedded linux involved.

This stuff has very weird specifications. For instance, it doesn’t work in client mode – only in access point mode. There is no webdav and only a crappy web interface. In this post I decided to sum up the ways to make this thing at least more or less usable using common tools.

(more…)

Useful scripts: Compiling big projects remotely

At the very start of the New Year I decided it’s big time to clean up all the trash from my ‘useful scripts’ folder. Wipe most, improve and document the most useful ones. (And check how the new syntax highlighting plugin works in wordpress and how the content shows up in Medium). I’ll start with the script I use to compile ‘heavy’ software on the ‘big’ server. (I’ll tell more about how I picked the hardware for the task later).

OpenWRT. Takes a while to build it with a bunch of packages enabled.
(more…)

Optimizing ESP8266/ESPHOME for battery power (and making an ice bath thermometer as well)

It’s been a long while I wanted to check for how long can an esp8266 with esphome last on a battery supply. Yet I didn’t have a reason to get it done. Time to fix that and add yet another battery optimization manual for ESP8266 to the internets.

And what’s the big reason? The story is simple. I decided to try ‘cold water immersion’ practice and make it a habbit.Yep, not the cold showers, but true hardcore ‘CWI’. I started back in summer when it was hot as hell and went all the way through to November. The weather gradually lowered the water temperature for me from ‘ah, cool and nice’ to ‘Awh shit this is cold!11’. Ideally that would become a habit.

However in November I had to pause that for a few weeks. And that meant the only thing: I had to start over again. And since the weather isn’t helping me any more, I’d have to take care and gradually decrease the temperature myself.

The first idea was to just order a dumb water thermometer. But why order when you have all the parts in stock and can just build one? And with cool features!

Hard as a rock, dumb as a brick (c)
(more…)

Getting rid of telemarketing, Pt. 1

Frequent calls from telemarketers, spam and espionage – these are the main reasons I try to use the loyalty cards and other stuff, and if I have to – tend to have a long chat about how much I do NOT want to receive any calls/messages or ‘super special deals’. However, it doesn’t stop many telephone spammers. I have to admit, I understand how miserable wok in such a call center might be, when nine out of ten people you call tend to explode and shout on you. However, there’s always a chance the call would be so inconvenient, that it will make you go nuts.

Anyways, I decided to deal with those folks using some of my dark tech magic. If successful, the plan would not only ward off any spam, but also give me an everlasting supply of pure fun. I made an IVR for all the incoming calls and put it on a dedicated number I now began to willingly share. If you want to learn the details of setting up your very own Asterisk/FreePBX server that will handle GSM calls for you with some advanced features, this post has all the details.

(more…)

LineageOS + Magisk adventures

I use LineageOS and Magisk root (A magic tool that help Android Pay and root access coexist). With Lineage you can receive updates every week on monday (for my Oneplus 5T) and so far they’ve been really stable. All was good until the last update of may bricked my cellphone. As it turned out Lineage build was perfectly fine, the bug was with Magisk (Once I removed it and flashed the update – everything worked, except for Magisk). In this blog post I’ll tell about Magisk’s epic fail, and will provide a link to fixed Magisk version that doesn’t turn your phone into a pumpkin brick.

(more…)

Verilog Simulators and ctest

If you are someone with a software engineering background getting your hands dirty with hardware design, first thing you’d want to use – some kind of testing framework/runner for all the tests you write. If you are using myhdl you’ll already use all the stuff python offers for unit-testing.

But if you are using more conventional tools for a bigger project with a bunch of third-party libraries, chances are you are not happy with shitty bash/csh tools and instead of wasting the precious minutes of your life writing those you’d want to use something existing. After all, why reinvent the wheel?

In this post I will describe the troubles of integrating verilog simulators with existing test runners. Namely – ctest (that comes from cmake).

(more…)

The painfull verilog preprocessor pitfall

Just a little note about how includes and `defines work in verilog which is VERY different from how they behave in most programming languages. This may not really hurt in a small project, but can become a real PITA in a big project with a dozen of third-party blocks.

TL;DR: Macro defines are have a global scope in verilog and propagate from file to file during one tool invocation.

(more…)

Weird Trickery: Compiling verilog VPI extension and unit-testing it using cmake/ctest

A few months ago I needed to write a VPI extension for verilog HDL and (just as I would normally do) I needed a proper buildsystem for that stuff. Unfortunately in terms of build/debug/test tools the folks doing ASIC are living… Well, not in the stone age, but in their own small isolated world and keep reinventing the wheel over and over again. OpenSource iverilog simulator didn’t go far away from the proprietary counterparts that tend to ditch commonly used in linux environments best practices.
Okay, now let’s stop bitching about the way things are and decide how to deal with that kind of stuff. In this note I’ll try to describe how to make a CMakeLists.txt for compiling a VPI extension and unit-testing it with ctest.

(more…)