Readit News logoReadit News
sephalon commented on Show HN: Rotary Phone Dial Linux Kernel Driver   gitlab.com/sephalon/rotar... · Posted by u/sephalon
niccl · 7 months ago
There was a deep technical reason for it, too. I suspect I'm one of the very few living people that know what it was., so I'll share it with HN so the knowledge doesn't die :-)

A relatively early type of mechanical telephone exchange was the rotary exchange [0]. The pulses from the phone cause a clutch to connect the rotary driver in the exchange which then moved the switching stuff around (details can probably be inferred from the linked article). One of the issues with the rotary exchange is the pads of the clutch wear, leading to unreliable connections. Aotearoa/NZ had an existing number plan when they decided to install rotary exchanges. Some bright spark knew of the wear issue, and calculated that, given the existing number plan, if they had the 1 position on the dial giving 9 pulses (etc.) then the overall wear on the pads would be much lower and so the maintenance requirement would be less. And that's where it started.

And another fun fact. I believe Norway chose the same configuration for their rotary phones. I'm not sure if it was for the same reason, though.

[0] https://en.wikipedia.org/wiki/Rotary_system

sephalon · 7 months ago
The driver supports alternate keycode mappings specifically for that reason, but before reading your comment I was unaware of the motivation behind reversing the pulse order. Thanks!
sephalon commented on Show HN: Rotary Phone Dial Linux Kernel Driver   gitlab.com/sephalon/rotar... · Posted by u/sephalon
jtwaleson · 7 months ago
Shameless plug for those who like rotary phones: I converted mine into a fully functional bluetooth headset, including dialing phone numbers with the rotary dial. The HN post didn't do well but it got featured on hackaday.

https://hackaday.com/2024/10/31/bakelite-to-the-future-a-195...

https://blog.waleson.com/2024/10/bakelite-to-future-1950s-ro...

Creating an alt mode for a bluetooth rotary numpad shouldn't be difficult ;) Now if I could only find some time.

sephalon · 7 months ago
Nice one! Using an ESP32 is a much more economical choice these days, but well, I really wanted to write a Linux kernel driver ;-)
sephalon commented on Show HN: Rotary Phone Dial Linux Kernel Driver   gitlab.com/sephalon/rotar... · Posted by u/sephalon
jeroenhd · 7 months ago
Very nice! I love these minimal driver implementations. It shows off how little actual code you need for a driver (but also how many flags and kernel methods you need to know exist to make a basic driver work).

>Initially, I intended to reimplement the driver in Rust to explore the state of the Rust for Linux project. Unfortunately, I soon realized that the necessary bindings simply are not available yet, so that part will have to wait.

That's interesting (and quite disappointing, though hardly unexpected). I think documenting your approach and the setbacks you've encountered could make for an interesting blog post, if you care about writing such things.

sephalon · 7 months ago
Unfortunately only a handful of subystem APIs have Rust bindings right now, so I did not get far enough to write up anything meaningful. Maybe next year support has matured to make a reimplementation in Rust feasible; then I will happily write about my experiences :-)
sephalon commented on Show HN: Remote-Controlled IKEA Deathstar Lamp   gitlab.com/sephalon/death... · Posted by u/sephalon
larusso · 8 months ago
That sounds awesome. How much noise makes the motor during open/close cycle? I remember that the plastic had quite some friction on its own.
sephalon · 8 months ago
Yes, noise is a problem, which unfortunately makes the lamp quite unpopular with my girlfriend ;-) Some is indeed coming from the folding mechanism itself, but the majority of noise is actually caused by the stepper motor, despite limiting the current to the necessary minimum. One could try to switch to a more advanced (i.e. silent) stepper motor driver than the A4988 (I mainly picked that one because ESPHome already has a driver for it), or use a servo motor instead.
sephalon commented on Show HN: Remote-Controlled IKEA Deathstar Lamp   gitlab.com/sephalon/death... · Posted by u/sephalon
badmonster · 8 months ago
Can the Deathstar lamp firmware be customized to add new modes, like an automatic opening and closing cycle synced to music or other triggers?
sephalon · 8 months ago
The firmware is based on ESPHome, which integrates particularly well into Home Assistant, a popular home automation software; therefore I would recommend to implement such features on a higher layer than the firmware. See here how to e.g. implement a "sundial" function: https://gitlab.com/sephalon/deathstar_lamp#home-assistant-in...
sephalon commented on Show HN: Remote-Controlled IKEA Deathstar Lamp   gitlab.com/sephalon/death... · Posted by u/sephalon
larusso · 8 months ago
Cool project indeed. I used to own the first model and thought about how one could motorize the lamp. I used to own the one which didn’t have the reflected coating on the inside panels. At least in Germany they changed that a few years back from plain white to silver or gold reflection. And now the lamp is also available in bigger sizes. I bought it like most because of the interesting design. But was never really pleased with it. Practical use of keeping it closed is zero. I guess that was the reason to motorize it ;) But even in the open configuration it’s so dark that it’s unusable as a promised light source.
sephalon · 8 months ago
Part of the reason for automating it was that I wanted to integrate the lamp into my home theater setup: When the movie starts, the lamp slowly closes and synchronously dims out (guests always react with a smile to this). Pressing the pause button dims it up again and gives one just enough light to find the bathroom ;-)
sephalon commented on Show HN: Remote-Controlled IKEA Deathstar Lamp   gitlab.com/sephalon/death... · Posted by u/sephalon
sephalon · 8 months ago
Thanks for letting me know about the video playback issue, I used the following script to create the timelapse:

  ffmpeg \
   -pattern_type glob \
   -framerate 30 \
   -i "img/*.JPG" \
   -i "star_wars_style_march.mp3" \
   -s:v 1920x1080 \
   -c:a libopus \
   -c:v vp9 \
   -shortest \
   deathstar_timelapse.webm
I actually thought that VP9 and Opus are well supported everywhere by now, but maybe that is not the case…

Regarding GitLab, as a general rule, I try to avoid products dominating the market, and I quite like their OSS policy…

sephalon · 8 months ago
I have converted the timelapse to H.264/AAC, hope this plays everywhere now.
sephalon commented on Show HN: Remote-Controlled IKEA Deathstar Lamp   gitlab.com/sephalon/death... · Posted by u/sephalon
timzaman · 8 months ago
Didn't know anyone still used gitlab. Also video not working..
sephalon · 8 months ago
Thanks for letting me know about the video playback issue, I used the following script to create the timelapse:

  ffmpeg \
   -pattern_type glob \
   -framerate 30 \
   -i "img/*.JPG" \
   -i "star_wars_style_march.mp3" \
   -s:v 1920x1080 \
   -c:a libopus \
   -c:v vp9 \
   -shortest \
   deathstar_timelapse.webm
I actually thought that VP9 and Opus are well supported everywhere by now, but maybe that is not the case…

Regarding GitLab, as a general rule, I try to avoid products dominating the market, and I quite like their OSS policy…

u/sephalon

KarmaCake day243February 15, 2025View Original