Doorgaan naar hoofdcontent

UHURA update: my sister on board, and still talking without the internet

Last week UHURA got a feature that Mum came up with herself: Call & Listen. After a wellbeing call her box listens back for thirty seconds, so I can hear her even when she can't reach the button. A lot has happened since. Some of it is done, some of it is still a plan on paper. I'll keep the two neatly apart here.

Sketch of the UHURA box at Mum's: one button per person and a red MIC ON light

Mum gets the real box with buttons. On a laptop, the same panel now appears on the screen.

Done: my sister can join in

Mum will get an ESP32 box with real buttons. But where are my sister and I during the day? Usually behind a Windows laptop. I don't want to ask my sister to install Linux or some heavy app. So now there is uhura.exe: a single file of about 800 KB, with a text file uhura.txt next to it that holds her name and the other stations. Unzip, double-click, done. No installer, no extra DLLs.

On screen it works just like the box: hold the mouse button to talk, release to listen. I wrote a short manual for my sister to go with it.

For the techies: the core of UHURA, the code that handles the sound, the protocol and the safety rules, needed not a single changed line for Windows. I simply build the .exe on my Linux machine. That the split between core and platform works this cleanly may be the best result of the week.

On top of that, more than one person can now use Call & Listen on Mum's box. Mum puts both my sister and me on her list. But when my sister calls, those thirty seconds of sound go to her only, never to me at the same time. Privacy per call, not per family.

Windows Defender thought it was spyware

The first version of uhura.exe went straight into quarantine. Looking back, that makes sense. The program had no name and no version number, and at startup it did two things at once: open the microphone and open a network port. That is exactly how eavesdropping software behaves.

The fix was in the code itself. The microphone now only opens when you actually talk, and closes as soon as you let go. So the Windows microphone icon only lights up when UHURA is listening. The file also has a proper name, version and Windows manifest now. After that, Defender left it alone. Honestly, I think this is simply better behaviour: an intercom your mother trusts should not keep a microphone open in secret.

Decided: safe, even without the internet

The following parts have been thought through and written down, but not built yet.

Security. Every speech packet will be locked and checked on its own. If a run of packets is lost on bad Wi-Fi, the encryption does not get out of step: the next packet simply opens. To a firewall, every packet looks like random noise. And a forged packet is thrown away before the sound is even unpacked, so nobody can overload the box. All this adds just two small C files (Monocypher), not a big library. To be fair: until this is done, the Call & Listen confirmation does not use a secret key yet. I said so last time too.

Without the internet. Say I'm in the attic, Mum is in the living room and my sister is in the shed, and the fibre in the street is down. Many smart devices stop working then, because their cloud server can't be reached. UHURA has to keep working. The boxes find each other on the home network with a tiny beacon every five seconds, and then talk to each other directly. Encryption and Call & Listen keep working too, because the key comes from the circle word that every box in the house knows.

No date, no problem. After a power cut without internet, a small computer often thinks it is 1 January 1970. Many devices then refuse to work. UHURA never uses the date or the clock, only the time since it started. So even after a power cut, Mum can talk again right away.

Our own switchboard. For connections between houses, the switchboard will run on two servers of my own in Amsterdam, a main one and a spare.

What's next?

The next step is the real hardware again: the ESP32 box with an I2S microphone, an amplifier, and the buttons and lights. After that comes the security from this story.

All designs are in the docs folder of chat-l18l/uhura_intercom. You can also follow UHURA on Elektor Labs.

This article is part of the series Building with AI agents: projects I build together with AI agents. That link takes you to every part of the series, including new ones.

Lees dit artikel in het Nederlands: UHURA-update: mijn zus aan boord, en blijven praten zonder internet

Reacties

Populaire posts van deze blog

Denon DHT T100 DESIGNED TO FAIL : bad caps (ceramic caps this time)

A friend gave me a Denon DHT-T100 to look at. Do not spend much time on it.. ok. It had a problem, it started clicking and ticking after power on, and after some time. (a so called intermittent problem) Sometimes it did not tick or click, but it was basically not usable. The clicking had a sharp click in one channel and repeated after about a second, then sound recovered and it would click and drop out again. He told me, do not spend any time on it, yeah, right. ;-) like I would give up after 15 minutes. I wanted to know what was going on with this thing, I found some schematic online and started measuring the usual things. The power supply, 24V did it drop down when a tick occurred ? Difficult to find out because sometimes the thing would play for hours without a glitch. I eventually found out the 24 V PSU, the step down SMPS on board and the LDO's were all ok, all power rails remained within spec, but it still glitched sometimes. (while power was ok) I inves...

Fixed voltage on cheap buck converter (MP1584) conversion with single 0805 resistor

Everywhere I look on the Ali and Ebays I see these step down converters based on MP1584. I bought a couple and actually they are not bad at all. The output voltage is set by the trimming-resistor in the left top corner of the picture. This works OK, but.. it is dangerous because it is rather sensitive to the touch. I decided that I wanted fixed output, so I had to figure out how this thing worked. The datasheet looks like this : R1 in the datasheet is what I call "R feedback" in my image. The value of R2 is mostly 8.2K Ohm in the boards I have seen.  So to set some common values for output voltage: change R1 to 27K for 3V3 output (actually 3.4 volt, but 27K is a standard value) or change R1 to 43K0 for 5.0 Volt output. (43 K is a standard value) A standard 0805 size resistor fits precisely, how convenient ;-). Make sure the other resistor is really 8.2K because that determines the feedback ratio. This way you can not burn up your circ...

Raspberry Pi, PyFace Digital, the lost documentation, I found it finally

The Raspberry PI or R-pi from  http://www.raspberrypi.org/  is well known these days. It is not an accident that I have one, I have been doing Linux stuff since 1991, and professionally since 1996 I can not skip over these developments, have to keep up with the new kids. :-) Times have changed, hardware has become very affordable, everybody knows the Arduino , Raspberry Pi and Beagle-Bone-Black (BBB). Not everybody knows the stuff that  http://www.acmesystems.it/  aka Acme-Systems and  https://github.com/OLIMEX/OLINUXINO  aka  Olimex make, so I will endorse them here. Since I am an engineer I expect to connect switches and relays to the boards and some documentation with products, not so with the " PiFace Digital " board, it comes without serious documentation, not a even the schematic. All links on their blog point nowhere. People asked them many times, yet nowhere is the schematic to be found. I finally found some info after hours of googl...