Electronics vs. Dark Rooms

Despite its diminutive size, the white LED on the end of the Dell AC511 USB SoundBar lights up a dark bedroom surprisingly well:

Dell AC511 USB SoundBar - white power LED

Dell AC511 USB SoundBar – white power LED

That’s pretty much the only power-on indicator for the streaming players, so I didn’t want to just slap a strip of black tape over it. Instead, because white LEDs don’t emit much energy toward the red end of the spectrum, I made a cute little filter from a snippet of Primary Red gel filter material, surrounded by a black Gorilla Tape donut:

Red filter for Dell AC511 USB power LED

Red filter for Dell AC511 USB power LED

Two layers of Primary Red cut the light intensity to a dim glow that’s barely visible in daylight and completely inoffensive at night:

Red filter for Dell AC511 - installed

Red filter for Dell AC511 – installed

The blue activity LED on the SunFounder got the black electrical tape treatment, however, with just a sliver showing through to give a hint that it’s still active:

SunFounder RT5370 USB WiFi Adapter - masked LED

SunFounder RT5370 USB WiFi Adapter – masked LED

One of the other WiFi adapters has a pinhole over a red LED that’s barely visible. Another, seemingly identical one, lacks the red LED under the pinhole; when I asked the vendor about that, I was told it was removed “to save power.” Yeah, right. That was part of the motivation to try a different adapter next time around, with good results.

Of course, you must wrap an opaque black case around the Raspberry Pi to tamp down the red and green LEDs on the PCB. It’s possible to control them in software, with varying degrees of difficulty depending on which Pi you have, but …

,

1 Comment

Raspberry Pi WiFi Adapters

One might be forgiven for thinking these two USB Wifi adapters are essentially identical:

USB Wifi adapters

USB Wifi adapters

Turns out the SunFounder RT5370 (on the top, with the stylin’ curved case) has better performance than the Wifi With Antenna (on the bottom, with full-frontal chunk goin’ on), by a not inconsiderable 5 to 10 dB. Boosting the received power level in the fringe areas of our house from -70 dBm to -63 dBm makes all the difference between not working and steady streaming.

The built-in WiFi antenna on a Raspberry Pi 3 ticks along 10 dB lower, with -80 dBm (10 pW!) at the receiver making for poor communication: a Pi 3 works perfectly within reasonable line-of-sight of the router (even through our wood floor) and wakes up blind in fringe areas. Hacking an external antenna probably helps, but definitely isn’t a net win compared to ten bucks worth of USB adapter.

The wavemon utility (it’s in the Raspbian repo) comes in handy for figuring that sort of thing.

There is, of course, no way to determine anything important about the adapters from their product descriptions, which are essentially identical, right down to the price. Neither have any product identification on their cases. The back of the package for the SunFounder gadget gives some specs, none of which may mean anything (clicky for more dots):

SunFounder RT5370 USB WiFi Adapter Specs

SunFounder RT5370 USB WiFi Adapter Specs

I ordered another SunFounder adapter, Just In Case it comes in handy, with the hope that both behave the same way.

,

9 Comments

Raspberry Pi 3 Reset Switch

The (relatively) new Raspberry Pi 3 PCB layout puts the Run header in a different location than in the Pi 2, but a minute of filing gnaws a suitable opening:

Raspberry Pi 3 - Reset Switch

Raspberry Pi 3 – Reset Switch

As before, a hot-melt glue blob holds the switch in place. I’d prefer a black case, if only to hide the blob, but clear-ish is what’s available right now.

Remember those orderly shutdowns, even at the cost of a keypad button!

,

Leave a comment

IBM 5100 APL: Nested Emulators

A discussion about Raspberry Pi performance prompted this:

IBM 5110 Emulator - Javascript on Raspberry Pi

IBM 5110 Emulator – Javascript on Raspberry Pi

From the inside out:

Starting the show takes 17 seconds from clicking the Restart button (second from right, top row) to APL’s Clear WS prompt. I have no idea how that compares with a Genuine IBM 5100.

I distinctly remember writing APL programs, but that’s about as far as my memory will take me. [sigh]

9 Comments

Cast Iron Pan Seasoning: Round 3

After seasoning the pan after every meal for a few weeks, then not doing that for a few more weeks, its thick glaze began looking somewhat scuffed:

Cast Iron Pan - scuffed

Cast Iron Pan – scuffed

You may recognize some of those scars from the previous picture:

Wagner skillet - two weeks of use

Wagner skillet – two weeks of use

Perhaps the multi-layer seasoning was entirely too thick and prone to chipping; this time, I’ll try a thinner coating. Because it’s cast iron, the pan under the coating remains undamaged.

A few hours in a bucket of sodium carbonate solution with a battery charger driving a few amps through it removed most of the glaze and a few minutes with a sponge sanding block cleaned off the rest. Applying flaxseed oil and heating it to 400 °F on a regular burner (under close supervision!) produced a nice coating:

Cast Iron Pan - seasoned

Cast Iron Pan – seasoned

The single layer was way slick for veggies in the evening and handled the morning omelet with aplomb, so we’ll run with it until something interesting happens.

Leave a comment

Rabbit Head

Although we don’t think of this as a particularly tough neighborhood, this is the second severed head we’ve encountered in the last few years during our routine walks:

Rabbit Head

Rabbit Head

We doubt a predator would do such a tidy job of parting the head from the body, then discarding it. The eyes surely went to a bird, though…

It was across the Mighty Wappinger Creek, near the far end of Romca Rd. The Red Oaks Mill Civic Association is long gone and their building burned to the ground a few decades ago, but their name lives on.

5 Comments

Making and Mounting SD Card Backup Images

The process of creating, configuring, and backing up a Raspberry Pi goes a little something like this:

unzip /mnt/diskimages/ISOs/Raspberry\ Pi/2016-11-25-raspbian-jessie-lite.zip
sudo dcfldd statusinterval=16 bs=4M if=2016-11-25-raspbian-jessie-lite.img of=/dev/sdb
... Micro SD card to Pi, boot, perform various configuration tweaks ...
... card back to PC ...
sudo dcfldd statusinterval=16 bs=4M if=/dev/sdb of=Streamer5-2017-01-02.img
zip -1 Streamer5-2017-01-02.zip Streamer5-2017-01-02.img
rsync -ahuv --progress Streamer5-2017-01-02.zip /mnt/diskimages/ISOs/Raspberry\ Pi/

The ZIP operation crushes an 8 GB image down to 1.6 GB, obviously depending on most of the image being filled with binary zeros or foxes or something trivial like that. You could work around that with fsarchiver, at the cost of handling each partition separately.

You can pipe the incoming image through GZIP when you don’t need the image right away:

sudo dcfldd statusinterval=16 bs=4M if=/dev/sdb | gzip -1c > Streamer5-2017-01-02.gz

There’s an obvious gotcha when you try to write an image to a (slightly) smaller card than the one it came from. Writing a smaller image on a larger card works just fine.

With a raw image in hand, you must know the disk partition offsets within the image to mount them in loopback mode:

fdisk -l Streamer5-2017-01-02.img
Disk Streamer5-2017-01-02.img: 7.4 GiB, 7892631552 bytes, 15415296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc280d360

Device                    Boot  Start      End  Sectors  Size Id Type
Streamer5-2017-01-02.img1        8192   137215   129024   63M  c W95 FAT32 (LBA)
Streamer5-2017-01-02.img2      137216 15415295 15278080  7.3G 83 Linux

Knowing the offsets, the mounts go like this:

sudo mount -o loop,offset=$(( 8192*512 )) Streamer5-2017-01-02.img /mnt/loop/
... snippage ...
sudo mount -o loop,offset=$(( 137216*512 )) Streamer5-2017-01-02.img /mnt/loop/

Because a Jessie Lite system will fit neatly into a 2 GB SD Card, you can trim the disk image to eliminate most of the unused space:

sudo losetup -f
/dev/loop0

sudo losetup /dev/loop0 Streamer5-2017-01-02.img

sudo partprobe /dev/loop0

sudo gparted /dev/loop0
... resize ext4 partition from 7 GB to 1.8 GB

sudo losetup -d /dev/loop0

fdisk -l Streamer5-2017-01-02.img
Disk Streamer5-2017-01-02.img: 7.4 GiB, 7892631552 bytes, 15415296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc280d360

Device                    Boot  Start     End Sectors  Size Id Type
Streamer5-2017-01-02.img1        8192  137215  129024   63M  c W95 FAT32 (LBA)
Streamer5-2017-01-02.img2      137216 3833855 3696640  1.8G 83 Linux

truncate --size=$(( (3833855+1)*512 )) Streamer5-2017-01-02.img
... or, if you don't care about an exact fit, use ...
truncate --size=2G Streamer5-2017-01-02.img

The partition and filesystem will plump up to fill the SD Card during the first boot on the Raspberry Pi.

There exist automagic utilities for all that, but practicing simple stuff helps keep it all fresh…

,

2 Comments