I brought a cheap (£10) HDMI-to-USB2 capture device based on the Macrosilicon 2109 - but I encountered a problem where it didn't appear at /dev/video* when plugged in, despite dmesg showing some recognition of the device. Fortunately, Nikola_F on the Arch Linux forums had already found the problem and offered a solution: The device is wrongly being treated as a USB audio device. You can confirm…
Summary & Background The Panasonic Lumix GX80 is a mirrorless, interchangable lens micro four thirds camera. Some people have used it as a streaming webcam by connecting the camera's HDMI output to a HDMI-to-USB capture card (cost ~£120). It also has wifi connectivity, and can be controlled remotely - including a live preview over wifi. I set out to see I could use that wifi live preview like a…
Motivation I've got a headset with a microphone, and a webcam with a built-in microphone too; I always want to use the headset microphone, but sometimes the OS or videoconferencing tools start up using the wrong one. The good news is Linux will let you disable your webcam's microphone without disabling its video. I've done this successfully on Ubuntu 18.04 How it's done We're going to do it with…
Summary You can generate Symantec VIP Access credentials and load them onto any Yubikey that supports TOTP or HOTP (i.e. any Yubikey that isn't blue). If you don't already have a Yubikey, you might also consider a Symantec VIP Hardware Authenticator which is less than half the price of the Yubikey I used - but I already have the Yubikey and the Hardware Authenticator doesn't ship to the UK TOTP vs…
Ever wondered how cheap digital verniers are able to produce good precision at very low prices? I did, so I took one apart. I'm not the first person to look at this - Grant Trebbin has some photos of a teardown , and has done a good job of finding patents like US5068653 Capacitive displacement measuring device with t-shaped scale coatings ; Nick Müller has inspected one with an oscilliscope and…
I was wondering whether the ESP8266 SPI flash could be used for atomic (or sort-of-atomic) write operations - so I wanted to understand how the underlying SPI operations work. TLDR API call SPI command Note spi_flash_erase_sector 0x20 Repeated status reads (command 0x05 ) until erase completes spi_flash_read 0xBB Dual SPI spi_flash_write 0x02 Single status read, test completed immediately Read on…
If you've got here from Google, it's probably because you've exported a CSV or TXT file from picoscope and it's come out with 1048579 lines - maybe 3 of which are headers and 1048576 are data. You can find several posts on their forum about the same thing. Seems like Excel worksheets are limited to 1,048,576 rows by 16,384 columns , and Picoscope silently truncates CSVs to that length. I'm not…
I want to do some battery powered sensing with an esp8266 - and to get a good battery life, I need to use the 'deep sleep' mode. Deep sleep requires a reset (including a bootloader and some radio calibration) to wake from. I decided to test how different pins behave when in deep sleep or undergoing a reset. Schematic By switching the Arduino Uno outputs between high, low and high impedance, we can…
One option to syntax-highlight some code in a web page is prism.js . I use it in some posts on this blog. It's fairly simple to set up - but there's a trick to getting it to work from a CDN. When you download prism.js from the project website, a configuration tool lets you choose the languages you want included, then gives you a prism.js with only those languages included. Importing support for…
So you've got an ubuntu box you want on during business hours, but you don't need it on outside business hours. Maybe it's a build server or something similar. Obviously, you could manually start it every morning - but you might be ill or go on holiday. Let's automate it with wake-on-RTC! The instructions below are for Ubuntu 14.04. First of all, create this file at /root/weekday-restart.sh (I use…
Certificate Transparency (CT) is a proposal that, when a certificate authority issues a certificate, they should log the details in a public, append-only log. This allows mis-issued certificates to be spotted by site owners - and hopefully revoked in short order. Browsers, when they know to expect a CT entry, can reject a certificate as fraudulent if the expected CT entry is missing. But CT will…
Here are some subjective opinions I've developed on software design - I'm "putting them out there" to see what other people think of them, and to explain to people who hear my opinions the thinking behind them. Even the greatest dependencies can go down. When you depend on another system, you should ask what you'll do if that system goes down. If anyone tells you "it will never go down", they…
Do you recognise these images? There's a good chance you've seen some of them before now, probably several times. Here's a hint: They all depict the same thing. 103 bytes 156 bytes 178 bytes 379 bytes 921 bytes 1,189 bytes They all look pretty similar - so why the size difference? A quick intro to PNG The basic PNG file is comprised of recurring chunks. Each chunk is comprised of four parts:…
Have you ever wondered how Google Maps can calculate driving directions so fast? Google can calculate driving directions in 100-500 milliseconds , whereas back in 1990s it took my father's 386sx about 30 minutes to calculate such a route. If you've done much programming, you probably already know the basics of this. Road maps can be represented, in the jargon, as "graphs", where junctions are…
A few months ago I was handed some change which I didn't look at closely. Later, I realised I'd been given a fake £2 coin. I searched online and found lots of press coverage about fake £1 coins, but not much about the £2 coin. So here are some pictures! As you can see, the fake is a slightly different colour and the detail is a lot less clear: The fake coin bimetallic - the gold outer ring is a…
So someone has just given you access to Kibana and you're having trouble answering the kind of questions you could have answered easily with a sql- or grep-based system. Hopefully this cheat sheet will help get you started! How do I do a basic search? The 'query' box works a bit Google: unstructured text search, with some special commands, and if you get the command syntax wrong it just does an…
After I saw Dirty PCBs on HN I decided to place a test order. I chose a 50mm x 50mm board and paid $12. I placed the order on the 13th April; the boards were reported as shipped on the 30th April, and they reached me (in the UK) the 14th May. Dirty boards tell me there was a hiccup at the board house, as they moved locations, so their normal turnaround time may be less. The customs value was $5,…
I tried collecting some stuff from an Amazon locker, to see what the customer experience is like. The locker address is presented as a normal delivery address in your address book. When your item is available, you get an SMS: "Hello. Your parcel with (Item Name Which May Be Truncated) was delivered to Amazon Locker. Use pickup code: ABCD1A for this parcel" The message arrived quite quickly - I…
So you've just downloaded the latest version of jd-gui for linux but it doesn't start. TLDR: sudo apt-get install libgtk2.0-0:i386 libxxf86vm1:i386 libsm6:i386 lib32stdc++6 More details: Here's the process I went through: $ ./jd-gui ./jd-gui: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory $ sudo apt-get install libgtk2.0-0:i386…
I'm playing around with an mbed LPC1768 for a project I'm working on. When you upload a new binary to the LPC1768 you have to perform a reset for it to run the updated binary; you can do this with a reset button on the board, or by triggering a soft reset by sending a break signal to a virtual serial port. To speed up my compile-upload-test cycle I wanted to be able to do this from the terminal,…
I've had an interest in barcodes and image processing for some time, and as a side project some time ago I put together a software barcode reader. One of the things I did for that project was start collecting photos of barcodes that didn't scan well - either to use the images for my unit tests, or to order the products for physical tests. You can use these photos of degenerate barcodes to test…
Perhaps you've read posts like Falsehoods Programmers Believe About Names and Falsehoods programmers believe about time . Maybe you've also read Falsehoods programmers believe about geography . Addressing is a fertile ground for incorrect assumptions, because everyone's used to dealing with addresses and 99% of the time they seem so simple. Below are some incorrect assumptions I've seen made, or…
Not so much a blog post as things I want to remember the URLs for! TLS (SSH) Server Name Indication patch for OpenJDK Webrev standards-compliant HTML patch Here's a robot: There should be a video here.