View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

So, I’ve learned about realtime Linux before from my experience with Linux Audio, ALSA, JACK, and the like. So, I have a nifty Raspberry Pi trick up my sleeve related to this. Despite the common conception in Raspberry Pi hardware projects that all high frequency hardware control requires a microcontroller, indeed there are some important circumstances where an additional microcontroller is not needed. Most importantly, by being able to eschew with a microcontroller where it is not needed, you can reduce the cost of your final product.

Review of Linux Audio with ALSA/JACK

So, let’s review. How does realtime Linux Audio with ALSA/JACK work? First of all, you must make sure your Linux kernel is realtime capable. In the past, during the heyday of Linux kernel 2.6.x on x86 CPU hardware, getting good realtime performance meant tweaking the kernel config, applying the Linux realtime kernel patches, and custom compiling your own kernel. However, in later versions of Linux, after kernel 3.x or so, it was no longer necessary to custom compile your kernel to get good realtime performance.

Read on →

So, I started looking around on the Digi-Key website, and I noticed that they have quite a bit of useful general information on their site too, in addition to the parts that they sell. Interestingly, Digi-Key employs a lot of people 24/7 to help with customer support, like their Applications Engineering department that is filled with nearly one hundred Engineers and technicians. Not only do they help answer customer questions from hobbyists and professionals alike, but they learn a bit of new things along the way.

Digi-Key created a KiCad library of real Digi-Key components that you can use if you are using KiCad. Indeed, I must admit, KiCad is getting really popular to use nowadays, more so than competitor gEDA.

20181227/https://www.digikey.com/en/resources/year-in-review
20181227/https://www.digikey.com/en/blog/the-start-of-the-digi-key-kicad-library

Chip-on-board LEDs give a bright, uniform light source that can be viewed from a wide angle, due to being able to pack the individual LED modules much more densely. The main disadvantage is the limited number of colors available. Chip-on-board LEDs typically require an external driver circuit.

20181227/https://www.digikey.com/en/articles/techzone/2016/aug/the-basics-of-chip-on-board-cob-leds

Read on →

Playing with plush toys via direct hand manipulation is easy, fun, and useful for telling some kinds of stories. However, at some point, the more advanced user is going to want some semblance of hands-free animation. So, that being said, let’s revisit some more general terms, that of “puppet,” and review the more advanced form typically controlled by remote strings, marionette.

20181226/https://en.wikipedia.org/wiki/Puppet
20181226/https://en.wikipedia.org/wiki/Marionette
20181226/https://en.wikipedia.org/wiki/Supermarionation

So, here’s the deal. If you want to use a plush toy unmodified for hands-free animation, you must use some method which is more similar to that of the marionette, where the strings attach on the outside. There are some puppet forms where the strings attach on the inside and are controlled from there, but of course that would require modification of an existing plush toy.

So, now let’s talk electronicifcation. This is, of course, on the subject of Raspberry Pi, so of course we must use a Raspberry Pi or Arduino microcontroller of some sort. Since these microcontrollers are so cheap and tiny, why not embed the microcontroller as close to the plush toy being controlled as possible? This means the battery pack must aso be carried close to the plush toy. Also, since we are talking mechanical movements, of course we will also be using motors and rotational resolver sensors. Finally, an important element of having such close embedding to the plush toy means that we can’t use strings for control, but must rather use a rigid armature as an exoskeleton.

Read on →

Why are printer papers bunched into reams of 500? Beyond thinking about the nice number of sheets that this makes in its own right, I’ve come to realize there’s another important reason. This makes the stack somewhere around 2 inches to 2.5 inches tall. These dimensions help ensure that the package is relatively easy to handle by hand, both inside and out. As it turns out, the height of my dust suppression DSLR lens changing and film negative box has an opening of 4.5 inches, which allows it to be realtively easy for most hand sizes to reach inside. DLSR cameras themselves have a grip with a few inches in height, similar to these dimensions. Finally, cereal boxes themselves have this approximate thickness in their dimensions.

How do you setup a GNU/Linux server so that it will go into standby (i.e. suspend) after a specific amount of time, unless there has been recent network traffic on a specific port? Well, well, this is an interesting question. First of all, the default settings for suspend (via GNOME power manager) only check for mouse and keyboard activity to determine if the computer is being actively used. So, if you want to control suspend using a different metric, you’ve got to do a bit of customization.

20181218/DuckDuckGo linux suspend based off of network activity on port
20181218/DuckDuckGo server power management network activity

In this first StackOverflow article, there is an interesting technique used to wake a computer up when another computer tries to access it. Basically, a Raspberry Pi computer runs all the time and listens for ARP request packets for the computer that went to sleep. Note that these request packets will not be sent when the computer is awake. When one of these packets is detected, the Raspberry Pi sends a wake-on-LAN magic packet to the target computer, and it will then wake up.

Read on →

How do you programmatically check if a URL is archived on the Wayback Machine? This would be important for verifying that the timestamped URLs in my blog indeed are available in the Wayback Machine.

Good news, there is a simple, easy-to-use API for doing this. Use it like the following example.

http://archive.org/wayback/available?url=example.com&timestamp=20060101

20181217/DuckDuckGo programatically check if a url is archived wayback machine
20181217/https://stackoverflow.com/questions/33811582/how-to-access-wayback-machine-programmatically
20181217/https://archive.org/help/wayback_api.php

Additionally, the Wayback Machine supports the Memento protocol, so you can use that, too. My understanding is that the Memento protocol is more complex for this simple task, though.

SQLite vulnerability

2018-12-17

Categories: security  
Tags: security  

Security notes! An SQLite vulnerability allows for remote code execution in many applications at large. A fix was implemented in a patch version. The details of the exploit were not published in the interest of pushing vendors to upgrade.

20181217/https://thehackernews.com/2018/12/sqlite-vulnerability.html

So, again, from the SYFY movie channel on a random TV screen that I saw, I searched the sechdule to find out what was currently playing and the name of that movie. This time, it is the movie Enemy of the State, showcasing NSA surveillance technology determined as plausible in the 1990s.

20181217/http://www.innermind.com/sfc/lists/sfc1812.htm
20181217/https://en.wikipedia.org/wiki/Enemy_of_the_State_(film)

Interestingly, the movie crew hired a “technical surveillance counter-measures consultant” to determine how to setup the depiction of NSA technologies used. That is, someone who professional investigates for spy devices and how to rid them.

20181217/https://en.wikipedia.org/wiki/Countersurveillance

Nevertheless, there were a few fictional things in the movie like the 3D reconstruction when Daniel Zavitz bumped into Robert Clayton Dean and slipped the video disc into his groceries bag. Surely, the on-premises security cameras wouldn’t have been the high definition color video cameras nor in sufficient quantity to perform a high definition photogrammetric reconstruction, unless the place was already placed under NSA surveillance using NSA placed bugs. Were they on-premises cameras, the NSA still would have had a hard time getting the data reasonably quickly, a mailout of the data being the only fast way to deliver the data at the time.

Indeed, the Wikipedia “Talk” article does discuss this implausibility.

20181217/https://en.wikipedia.org/wiki/Talk:Enemy_of_the_State_(film)#3D_Recording_Technology?

On the subject of building keyboards. I happened to remember an IEEE Spectrum article about building a keyboard into a typewriter by the way of shifter registers. Why exactly did they choose to use shift registers instead of a standard keyboard matrix? Indeed, it is simpler and uses less circuitry to use a conventional keyboard matrix. The shift register design was purely for making the custom construction and fitting into a myriad of different typewriter designs easier. The shift registers mean that the microcontroller board can be external to the typewriter, and only a few wires need to be run to connect them together. This is important because many typewriters may not have much space to put the microcontroller board within. Also, another benenfit of the shift register design is that it forms somewhat of a repeating pattern on the circuit board internal to the typewriter, so the board can be cut to any length without repercussions. Also, interestingly enough, they choose to use the Atmel ATmega68 microcontroller for the project too, the same microcontroller that is used in the Arduino board.

Lo and behold, this is an oldie but goodie: the IEEE Spectrum article is from 2011.

20181216/DuckDuckGo ieee spectrum keyboard shift register
20181216/http://spectrum.ieee.org/geek-life/hands-on/a-typewriter-is-a-terrible-thing-to-waste

Read on →

So, I was thinking about swamps and humans’ relationships with them, and I realized something interesting. In earlier times in Europe, there was quite a bit of wetland, swamp land included. The swamps and wetlands were a subject of much folklore, cultural works, paintings, and so on. Many artists and scientists liked to venture out into the wetlands for creative inspiration or scientific study. But, the people’s appreciation of the wetlands stops here. The wetlands harbored organisms that caused hazards and diseases to humans. The wetlands could not be farmed efficiently. You could not build a house or an office on the wetlands. Owners of wetlands were appraised with lower real estate property values than non-wetland owners. In summary, human society around the area thought of the wetlands mainly as a giant playground, but ultimately they had no practical business use. In light of economic pressures, or the sheer desire to make more money for oneself, many people drained the wetlands to increase the real estate property value, decrease their insurance rates, and in general improve the economy as they saw it. That’s how we got to the wetland barren world that we live in today.

The wetlands were an example of an “ugly place.” Despite this fact, they were a wildly popular subject to paint. The same phenomenon can be observed in photography. Does a building look ugly or junky? All the better for photography. Now, as we have learned, this is where things can get dicey. The creative photographer loves to photograph run-down buildings, but the owner of the building in question is rarely as enthusiastic. So, yeah, this is one very important difference between between photographing the natural world versus photographing the artificial world. But, when legal considerations are permitting, there really isn’t much that would be considered “ugly” from the eyes of a creative photographer.