Table of Contents

October 2024 newsletter

(Our next Folk open house is on the evening of Wednesday, November 20, at our studio in East Williamsburg, Brooklyn.)

What we've been up to

Talks and presentations

Multiple talks and presentations this month:

Applications and demos

Desksaver

Andrés added a “desksaver”, like a screensaver, that has a welcome message and useful metrics (Folk clock time, CPU, RAM, disk usage, uptime, git branch, and most recent commit) when there are not programs out on the table. When there are programs, the desksaver instantly goes away.

While the basic feature is implemented, next week Andrés is going to make a few updates to the implementation (migrating web pages into their own Folk pages rather than web.tcl) and add a setting so individual Folk instances can turn this feature off at will.

20241030-221705.jpeg

Gadget/system improvements

Andrés and Omar have been showing the gadget a lot lately, both at outside presentations and at open houses, so Omar has made a lot of small gadget-related fixes.

These all come together to make the gadget feel much more like the computational flashlight we want it to be:

(these improvements all apply to the system more generally – so the gadget is paying off for the normal ceiling systems as well – but have been particularly acute or frequent with the gadget, because it has more tags at the fringe, it moves more, it has less RAM, etc)

Gadget-specific improvements

These apply only to the gadget camera (or to any other system that uses Pi cameras instead of USB webcams) – they're improvements to the camera-rpi.folk driver:

EDID fix

The combination of the Pi 5, ribbon-type micro-HDMI to HDMI cable, and pico projector (Ultimems HD305D1-C1) seems to sometimes (maybe only at the Linux fbcon level? outside when Folk controls Vulkan) produce garbled output. I figured out this is because the EDID data doesn't get through properly to provide a reasonable default resolution?

Solution: hard-code the EDID to 720p in /boot/firmware/cmdline.txt.

Vulkan fix

Sometimes you only see llvmpipe (the not-useful software renderer) and not the actual Pi 5 GPU on vulkaninfo --summary. I've found that this gets fixed by doing sudo rpi-update (brings back a good Pi kernel with good GPU support?)

Cat printer printing

Omar: I wanted printing that we could take on the go (to the SPC demo night and abroad), so I revived Ian Clester's indexcard layout for printing on cat printer receipts & got cat printer printing over BLE to work.

The receipts are about playing-card width, so I've been carrying around a deck of playing cards and attach each program to a card (to make it flat and also feel more object-y).

20241031-070741.jpeg

(only the print layout changes are really part of the Folk codebase, but it's still nice to see all this come together and understand the Linux and CUPS steps needed)

Folk sees the cat printer as just another CUPS printer (that you manually configure to use indexcard layout in setup.folk); I've been installing and running NaitLee Cat-Printer which provides CUPS interface to the printer; Ian got this to work on his system last year, but we hadn't tried it ourselves & we hadn't updated the layout as the printing system has changed.

Cat printer cards

Finally, I made cards to scan for and connect the printer, so you don't need a laptop to do it (in theory):

20241031-070811.jpeg

Here's the “Connect printer” card:

20241031-073701.jpeg

Its source code:

Wish $this is labelled [exec curl -s \
  -X POST http://localhost:8095/connect -d {{"device":"MX06,DF:07:26:13:53:BB"}}]

RFID localization

Omar: I've been picking this up again in October because I want to get it to work.

And I have good news: I fixed the bug that had me stuck in May and June, where the in-band reader would crash after the first round completed. It turned out that the problem was that I was using the % (mod) operator in the hot transmit loop (to decide the index of the sample to send out), millions of times per second, and that operator is actually pretty slow. I added another counter and if statement instead, and that works great:

Now it can run as long as you want, which means we should be able to use it live (move a tag around and see how it responds), and (most important) we should be able to use it alongside the out-of-band radio, so we can start to actually localize again.

So I've started working on out-of-band, which does exist in the repo but has bitrotted a lot (with all the optimizations and refactoring done to in-band to make RFID reading actually work on time, all the code it shared with OOB has been broken/removed).

We need to build the OOB logic again (what samples to transmit and receive), which isn't too bad since it's much less intelligent than IB and not on a deadline, it's mostly just bookkeeping and hopping, and we also need all the server and synchronization stuff to boot OOB, timesync OOB with IB, feed the samples to the PC.

Anyway, with the IB RFID reader working, I feel optimistic that we can bring this all together and release it in some useful form.

Unreliability of IB reader

One issue has been that reading the tags is finicky (sometimes you have to move it, or it doesn't work as well on my home system, etc) because the new fast decoder is so much less robust. (maybe continuous reading instead of one-round will help with this once we get it?)

(the reader is live & on a deadline now, so it's just using a binary threshold on amplitude, and it only uses the first few samples to compute that threshold; the old decoder looked at the whole stream and tried to decode it in the optimal way).

How to threshold something like this? So much stuff that's in the middle even on visual inspection.

You often get read failures when the tag responses are sketchy like that right now.

Friends and outreach

Some demo lessons

Hard-won experience from what things we needed (& what things broke down) (and what questions we got) at mobile demos over the last couple of months:

(at Hex House or at home, we have a little more scope to just restart things, we have laptops and other tools around, the Wi-Fi is known-good, etc, so these problems are not as acute)

Daniel's escape hatches: bring a laptop, bring a mobile hotspot, ssh, use the web ui

What we'll be up to in November

Omar

Andrés

Arcade