Ben's Blog

ben

1186 Articles

self sustainability ben September 18, 2022

Trails

I pushed trails a little this Summer. They’re starting to be very usable, not just barely accessible with the ATV.

Following them from our house takes you to quaint places in the Forest. We are starting to dream of a secluded cabin now that we have access.

Thank you Jared for the drone pics :).

building, self sustainability, wood ben September 18, 2022

Protected: No Need for Railing

This content is password-protected. To view it, please enter the password below.

building, self sustainability ben September 12, 2022

Roof On

I still have another day of finish work but all the panels are up. I really don’t mind roofing, it is no longer a big scary thing.

poultry, self sustainability ben September 12, 2022

Gyroscopic Head

Did you know? Chickens have an uncanny ability to keep their heads perfectly still regardless of what happens to their bodies.

A baby chicken (more like teenage chicken by now) felt a little too fearless and strayed way away from mama hen and the rest of the flock. To teach it a lesson (and for sport) we ran after it and caught it. It’s hard to catch these guys, they go fast and they’re small. This one hid under basil, it’s easier for us this way because you can at least get close when they think you can’t see them.

We traumatized it a little to teach it that it’s a big scary world away from the flock. First Esther petted it 6 ways to Sunday. Then we made it dance to observe its perfectly still head. That’s what happens to fearless chickens in these parts.

It’s funner to watch on a bigger chicken with a longer neck. But this still illustrates their amazing ability. That poor chicken ran back to its mom so fast when we let it :).

Sometimes life on planet Earth boils down to 2 small apes rolling on the floor laughing at poultry being made to dance by a big ape. It’s the miracle of life.

nature encounters ben September 10, 2022

A Good Year for Monarchs

We are finding many chrysalises, and they are flying everywhere.

Fortunately, they are very good at escaping predators.

I.T., maniacal paranoia ben September 06, 2022

Analyzing Ultrasonic Signals

Disclaimer: I and other people may or may not have had anything to do with figuring this out.

Zoom Rooms emit ultrasounds to let devices within “earshot” connect without the user having to type anything. Ultrasounds have been used for such proximity related convenience before, and sometimes for more nefarious purposes such are mapping out who’s next to each other in the world. All using a wireless network that is available anywhere and completely ad-hoc. It just doesn’t go very far (thankfully).

In this post we’ll see how to analyze such a signal using Zoom Rooms’ Share Screen signal as an example.

Harvesting the Sound

First things first, to decipher the signal contained we need to extract the bits from a fuller audio landscape containing “noise” throughout various frequencies. Ultrasonic frequencies, the ones the human ear can’t hear, are by definition above 20KHz. Now this fluctuates between individuals, and especially age groups 🙂 but that’s the general cut-off: anything above 20KHz is unhearable, thus usable to transmit hidden signals. Although microphone and speaker manufacturers have no incentive to build products in the non-human range, humans are the one giving them money after all. And so hidden signals tend to be right around the 20KHz cutoff, where human-centered manufacturing specs will have a good chance of still working.

Audacity is great for recording and analysis, this is what we’ll use here. First record your sample, using your laptop, get close to the source of the ultra sounds, try and keep things quiet during recording, and gather a good sample.

Extracting the Signal

Looking at various time zoom levels, we can home in on a repeating pattern. The room is complete silence but your computer does hear it loud and clear.

The complete silence as it was recorded. Note the time scale just above the recording.

Zooming in on the pattern, each of the pattern’s blob is made of several blobs. At this level we can guess that the signal is made of 10 notes. Zoom Room’s Share Screen codes are 6 digits long so it feels right, either for control characters, or because they planned on room for expansion. Now we don’t know really know when the signal ends and when it stops, I’m drawing the rectangle for 10 notes starting on the quiet one, because I could see a silence being used as a separator much like a space or a line return.

Finally, we zoom in just enough to start poking at each individual note/character.

Pretty easy so far, all we’ve done is record and zoom and we can start seeing our signal. Now begins the tedious task of annotating as many samples of this signal as you can. This is the data that will let you decipher the code.

Select a clean section of just one note, don’t grab the edges, just the meat.

Then Click on Analyze -> Plot Spectrum

This will do a Fourier Transform of the selected area to decompose the sound into all of it various frequencies

Place the cursor on the highest ultrasonic peak, and read the frequency: 19201Hz or 19.2KHz here.

Make note of it by adding a label at the selection. You’ll first need a label track if you don’t already have one.

Then you can add the label.

Do this for each note/character in the signal, it’s worth confirming the 10 character repetition we think we’re seeing. Then do this for many more samples… The more data, the easier it’ll be to decipher. Your project, which you should save often, will look something like that:

Deciphering the Signal

Now, obviously depending on what signal you are studying, the encoding will differ. I’m only talking about Zoom Rooms here and so I’ll only give general advice followed by the Zoom algorithm.

The general advice is as follows:

1. Gather a lot of data, this is the non-exciting part so it’s easy to want to move past it.

2. More often than not, there will be control notes/characters indicating the beginning or the end, or both of the signal. In the screenshot above, 19.1Khz followed by 19.2Khz is looking very likely like a control, align your audio sample to it and focus on the remaining notes/characters.

3. Look at the data from different angles, visually write it differently to see if patterns emerge. Spreadsheets can help.

4. Try various scenarios, even if you know they are likely false, they might get you closer to the truth.

5. Occam’s razor (or the lazy programmer) is likely a good guess

Zoom Room Rosetta Stone

Each signal starts with 19.1Khz followed by 19.2KHz. Then the 6 digits of the code displayed on the screen is “played”. Then a 2 digits representing the checksum of the 6 digits which is their sum. That’s 10 characters total.

Each digit maps to 2 possible frequencies:

0 -> 19.2Khz / 19.3Khz
1 -> 19.3Khz / 19.4Khz
2 -> 19.4Khz / 19.5Khz
3 -> 19.5Khz / 19.6Khz
4 -> 19.6Khz / 19.7Khz
5 -> 19.7Khz / 19.8Khz
6 -> 19.8Khz / 19.9Khz
7 -> 19.9Khz / 20.0Khz
8 -> 20.0Khz / 20.1Khz
9 -> 21.1Khz / 20.2Khz

Weird how they can possibly overlap and this is the twist behind this encoding, all other things being rather straightforward, for your next digit you always pick the frequency furthest from the frequency you just played. If you just played your control signal: 19.1Khz, 19.2Khz and your code starts with a 3 you will pick 19.6KHz to play the 3 as it it furthest from 19.2Khz. If your next digit is a 2, you will pick 19.4Khz to play it as it is furthest from 19.6Khz. I don’t know enough about sound engineering to know if Zoom did this to disambiguate frequencies which are close to each other, or if it’s meant as a cipher. I’m guessing the former, it seems to be a smart way to guarantee at least 0.2Khz of difference between 2 proximate characters while only adding 0.2Khz of spectrum. Since we know devices are likely to become distorted at the beginning of the inaudible range, it makes sense to both make an extra effort to distinguish characters, while not expanding too far into that range. Pretty cool eh?

Here’s a real world example, say that the code played is 790155:

first you play the control: 19.1Khz, 19.2Khz

then 7 with 20.0Khz as it is the furthest from 19.2Khz
then 9 with 20.2Khz as it is the furthest from 20.0Khz
then 0 with 19.2Khz as it is the furthest from 20.2Khz
then 1 with 19.4Khz as it is the furthest from 19.2Khz
then 5 with 19.8Khz as it is the furthest from 19.4Khz
then 5 with 19.7Khz as it is the furthest from 19.8Khz

compute your checksum of 7+9+0+1+5+5 = 27

play 2 with 19.4Khz as it is the furthest from 19.7Khz
then 7 with 20.0Khz as it is the furthest from 19.4Khz

Voila!

Some Code to go along with it

If you want to play the Share Screen code from your Zoom Rooms into the world, the following code will do it for your for a few seconds. Just make sure to update the “code” variable near the top. This code works in your standard browser’s web inspector console.

[code lang=”js”](async function main () { var code = "<6_digit_code_goes_here>" ; var context = new AudioContext() ; var o = context.createOscillator() ; o.type = "sine" ; var g = context.createGain() ; o.connect( g ) ; o.frequency.value = 0 ; g.connect( context.destination ) ; o.start( 0 ) ; var sleep_time_ms = 50 ; var control_frequency = 19100 var frequencies = { 0:[19200,19300], 1:[19300,19400], 2:[19400,19500], 3:[19500,19600], 4:[19600,19700], 5:[19700,19800], 6:[19800,19900], 7:[19900,20000], 8:[20000,20100], 9:[20100,20200], } console.log( "starting ultrasound emission" ) ; var i = 50 ; while( i>0 ) { i– ; // control o.frequency.value = 19100 await new Promise( r => setTimeout(r, sleep_time_ms) ) ; o.frequency.value = 19200 await new Promise( r => setTimeout(r, sleep_time_ms) ) ; // payload var checksum = 0 ; last_frequency = o.frequency.value ; for( var j=0 ; j<code.length ; j++ ) { checksum += parseInt( code[j] ) ; o.frequency.value = pick_furthest_frequency( last_frequency, frequencies[parseInt(code[j])] ) ; last_frequency = o.frequency.value ; await new Promise( r => setTimeout(r, sleep_time_ms) ) ; } // checksum checksum = checksum.toString() ; if( checksum.length==1 ) { checksum = "0" + checksum ; } o.frequency.value = pick_furthest_frequency( last_frequency, frequencies[parseInt(checksum[0])] ) ; last_frequency = o.frequency.value ; await new Promise( r => setTimeout(r, sleep_time_ms) ) ; o.frequency.value = pick_furthest_frequency( last_frequency, frequencies[parseInt(checksum[1])] ) ; last_frequency = o.frequency.value ; await new Promise( r => setTimeout(r, sleep_time_ms) ) ; } console.log( "stopped ultrasound emission" ) ; g.gain.exponentialRampToValueAtTime( 0.00001, context.currentTime + 0.04 ) ; function pick_furthest_frequency( previous, possible_new_frequencies ) { if( Math.abs(last_frequency-possible_new_frequencies[0]) > Math.abs(last_frequency-possible_new_frequencies[1]) ) { return possible_new_frequencies[0] ; } return possible_new_frequencies[1] ; } })();[/code]

nature encounters ben September 02, 2022

Curious Deer

We’ve had several encounters with this deer over the Summer. It gets close to us and doesn’t run away when we move closer, talk, or even shoo it. Our default is to shoo since they will wreak havoc in the gardens, but this deer now gets an exception. We can talk with it for a while before it loses interest, you can tell it’s curious about humans. Having a literal eye to eye conversation with wild animals is a good reminder that despite our efforts to avoid each other, we share a common life experience.

poultry, self sustainability ben August 28, 2022

Way too Comfortable

The chicks got their first dirt bath and the whole scene effused with well being. Between the little chick by itself who doesn’t know how to do it, the one who can’t not fall asleep, and the extreme contentment of the mom.

poultry, self sustainability ben August 26, 2022

Brooding

We had another broody hen this year. Only 1 of the fertilized eggs we gave her made it, so quick thinking Nicole went to the store and got a few more chicks. The hen adopted them all and has been a great mom. We gave them separate quarters so the rest of the flock can get used to them without being able to attack them. It is absolutely brutal what mother hens have to go through, beyond the deprivation of not leaving her eggs for almost a month. Separate quarters is a must or I’d personally murder the rest of the flock. Friends of our told us that their broody hens leave the flock. It’s literally safer for them to sleep in the woods with coyote, fox, mink, hawk, bears, racoon, fisher, skunk, …., than it is to stay within their flock.

Esther is enamored with the baby chickens, but mom won’t let her get too close.

aesthetics ben August 21, 2022

Accidental Belgium

I.T., plots, plotters, web development ben August 18, 2022

Microplots

I built a website for running experiments in collaborative drawing. It’s pretty neat and I’m not going to describe it just yet, but in the process of testing it, I threw at it all kinds of plots I had at the tip of my fingers, and it yielded some pretty cool results.

I may have here my next plotting streak: microplots. Some look predictably bad as they were meant as stress tests, but some came out well enough to make me curious.

More to come on all this soon…

self sustainability ben August 18, 2022

Made it to the Other Side, again

A couple of years ago we built a small bridge that let me take the ATV to the other side of the land. I was just able to take the tractor over it, after 7 years of pushing for it.

I’ve been working on trails back there, and the tractor will be a huge help. Not only that, but I’ve also been able to take the ATV with the big trailer up the hills, loaded with lumber. This means we can start considering building there. I wish I had more time for this, trail building is just fun. Alas, it competes with more important projects.

agriculture, self sustainability ben August 07, 2022

Nicole’s Gardening Pro Tip

Tomato Hornworms are much easier to spot at night under a UV light:

building, self sustainability ben August 03, 2022

Protected: Aerial Acrobatics

This content is password-protected. To view it, please enter the password below.

agriculture, self sustainability ben July 25, 2022

Out of the Ground

Nicole pulled this year’s garlic from the ground, it’s now in the sugarhouse to dry.

They’re pretty big, hopefully just as tasty.

agriculture, self sustainability ben July 24, 2022

Every Day

We get a good 10lbs of blueberries every single day. It’s hard to keep up with all the harvesting, processing, gifting and eating. Next year the operation will most likely be turned lucrative.

This season, I can safely say that we have enough berries for our family’s generous yearly consumption. It got me thinking about all the things we solely provide for ourselves. Heat, electricity, water, maple syrup, garlic. These are all major sources of pride, savings, and resilience. Blueberries and currants can definitely be added to the list this year, it took 6 years of tending to the frailest sticks in the ground to get there. As with many things around the homestead this year, we are finally reaping the rewards, and they are plentiful.

This year’s canning label

Soon, we’ll be harvesting en masse from Nicole’s massive garden. We might have other staples to add to the list then. Others like cider are close but not quite 100% self produced yet. Although we don’t particularly seek autonomy as an endpoint, it is pleasant where we have achieved it. It all feels unreal sometimes, that our decade old typical silly dream of leaving the city for greener pastures, could end up being so fully incarnated.

self sustainability, solar power ben July 23, 2022

Corroded Temperature Sensor

For a couple of days, we struggled to keep batteries charged even though Sun was plentiful. Quick investigation revealed the charge controller taking pauses for no apparent reason.

I looked at the charge controller’s screen which had some sort of fault, the manual wasn’t particularly helpful but the screen did show that the battery temperature sensor was reporting 67°C, which was absurd (and checked by hand).

The culprit was the sensor, which held against the batteries inevitably got acid water splashed on while refilling the batteries.

The charge controller does not need to know the battery temperature, but it is better for charging decisions and fault protection. So it can simply be unplugged for a bit, but also… I actually have been slowly accumulating double our solar setup, 18 more panels, 1 more charge controller, 1 more inverter, and all the bits and pieces to put them together. We are slowly getting our ducks in a row for an electric car and this currently not deployed expansion is for it. In any case, I just grabbed the sensor from the extra charge controller and plugged it in and ordered another one. It’s nice to have backups of everything too :).

I also added to the monitoring script so it would bark if no amps were coming in during day hours, this really should never be the case.

building, self sustainability ben July 18, 2022

Got Some Rafters Up

It’s been a busy couple of days

aesthetics ben July 18, 2022

I Try Not to

But the sky is just too much some times

building, self sustainability ben July 12, 2022

Protected: 2 Walls

This content is password-protected. To view it, please enter the password below.

nature encounters ben July 12, 2022

Random Crazy Moon

Sometimes you look up and there’s a giant glowing orb in the sky. Between this and the fireflies, Vermont Summers are quite the show.

building, self sustainability ben July 10, 2022

Random Construction Pics

To make my life easier, this time I’m insulating the floor while I can get to it from the top. I also blocked at 47″ meaning the rockwool batts fit right in with no cutting whatsoever. I still spent some time crawling under to sheathe the flooring and that very much sucked, but at least the next step (insulating) which used to suck horribly, went like a breeze.

I popped in a couple of walls next, more coming soon.

agriculture, self sustainability ben July 10, 2022

Protected: Harvests of a whole New Level

This content is password-protected. To view it, please enter the password below.

Posts pagination

← Previous 1 … 11 12 13 … 52 Next →

This blog is solar powered

Interactive

Handwriting Capture
Mandalagaba
IPv6 link-local to MAC converter
IPv6 MAC to link-local converter
Markov Text Generation
Markov Word Generation
Markov Music Generation
Duplogrifier
Flood Fill Algorithms
Homestead Metrics
RGB Playground
Web Games

Categories

  • aesthetics111
    • plots54
    • specular holography6
  • Books3
  • I.T.202
    • 3D modeling / printing21
    • AI6
    • all out geekery36
    • electronics27
    • homestead automation6
    • maniacal paranoia25
    • plotters49
    • unix / linux29
    • video games4
    • web development29
    • web games3
  • Lego / Duplo67
  • life in the U.S.42
  • miscellaneous202
  • nature encounters114
  • old vinyls3
  • organs2
  • self sustainability560
    • agriculture105
    • apiculture38
    • apple20
    • building131
    • canning3
    • crochet6
    • foraging6
    • hunting10
    • maple syrup47
    • poultry39
    • preserving2
    • solar power28
    • water23
    • wood84
  • trip to a new life6
Theme by Bloompixel. Proudly Powered by WordPress