sam henri gold
@samhenri.gold
930 followers 360 following 290 posts
animal, vegetable, and mineral. product designer/engineer-er (prev @lickability.com)
Posts Media Videos Starter Packs
Pinned
samhenri.gold
this is all getting so stupid so fast
samhenri.gold
Technology simply hasn’t come that far
samhenri.gold
I’m here on bluesky too!!
samhenri.gold
oh also in 4.0.1 they changed the height of the lower bars to be taller lmao
samhenri.gold
So there ya go. 20 bytes.

This has concluded a Tech Thread. Back to shitposting.
samhenri.gold
In 4.0.1, they changed these values to be way smoother.Mapped onto a chart, you can see that it takes a lot to drop from 5 to 0 bars. It’s harder to see 5 bars, but it’s harder to plummet bars.
Raw 4.0.1 lookup table values • 0x86FFFFFF equals −122 dBm — 1 bar threshold.
• 0x98FFFFFF equals −104 dBm — 2 bars threshold.
• 0x9EFFFFFF equals −98 dBm — 3 bars threshold.
• 0xA7FFFFFF equals −89 dBm — 4 bars threshold.
• 0xB0FFFFFF equals −80 dBm — 5 bars threshold. 4.0 and 4.0.1 signal bar thresholds mapped onto each other. The 4.0 line jumps from 0 to full bars in a fairly short span compared to 4.0.1
samhenri.gold
When you plot this onto a chart, you can see how the values are kinda screwed up since the values are really optimistic. Most of the time, you would see 4-5 bars. But when you gripped it, since the falloff is so sharp, you’d see a catastrophic drop from 5 to 2 bars.
samhenri.gold
...this is. This is the lookup table. When you convert the bytes to actual dBm values, you get:
-115, -111, -107, -103, and -99

(the closer to zero, the better the signal)

For example, here you need -107 or better signal to see 3 bars.
Raw bytes Five threshold values for signal bars.
- 0x8DFFFFFF equals −115 dBm, marking the 1-bar threshold.
- 0x91FFFFFF equals −111 dBm, 2-bar threshold.
- 0x95FFFFFF equals −107 dBm, 3-bar threshold.
- 0x99FFFFFF equals −103 dBm, 4-bar threshold.
- 0x9DFFFFFF equals −99 dBm, 5-bar threshold.
samhenri.gold
The actual calculation is dead simple. When converting signal strength to bars, CommCenter loads each threshold from memory and compares until it finds the right range.

This code is not the problem...
Some hideous assembly code that boils down to:

bar_count = /* initial r4 */;
while (bar_count != 5) {
if (RSSI <= threshold[bar_count]) break;
bar_count++;
}
samhenri.gold
I downloaded both firmwares and started poking around. In the CoreTelephony framework, I found a promising looking binary: CommCenter. Looking at the strings gave me a pretty good sense that this is where the bar formula was.
strings CommCenter | grep -i bars

UseEcn0Bars
ecn0 is %d / signal is %d, assuming 5 bars
ecn0 is %d / signal is %d, assuming 4 bars
ecn0 is %d / signal is %d, we say %d bars
telling UI to draw %d bars, %d signal
samhenri.gold
The letter was shared around and clowned upon (daringfireball.net/2010/07/tran...) but nobody really looked into what the formula between 4.0 and the patch in 4.0.1

I was a stupid eight-year-old at the time, but now I’m a stupid adult with access to a disassembler.
Translation From Apple’s Unique Dialect of PR-Speak to English of the ‘Letter From Apple Regarding iPhone 4’
Take your class action suits filed four days after we released the goddamn thing and stick them up your fucking asses.
daringfireball.net
samhenri.gold
For context, back in 2010 when the iPhone 4 came out, people noticed you could grip the phone in a certain way and the signal bars would plummet from 5 to, like, 2.

A few weeks later, they published a letter admitting fault, blaming a bad formula. apple.com/newsroom/201...
Letter from Apple Regarding iPhone 4
apple.com
samhenri.gold
hey wanna see something kinda interesting? this was the entire fix to the iPhone Antennagate in 2010. 20 bytes.
iOS 4.0:
8d ff ff ff 91 ff ff ff 95 ff ff ff 99 ff ff ff 9d ff ff ff

iOS 4.0.1:
86 ff ff ff 98 ff ff ff 9e ff ff ff a7 ff ff ff b0 ff ff ff Assembly code between iOS 4.0 and 4.0.1. It's basically the same except one instruction points to a different address.
samhenri.gold
HTTP code 3OH3: She wants to touch me (whoa) She wants to love me (whoa) She'll never leave me (whoa, whoa, oh, oh)
samhenri.gold
at the end of the day, what is “spineless” if not “boneless”. spineless wings, boneless politicians
samhenri.gold
not to get political but what's your favorite way to resize an NSImage
samhenri.gold
how many hours of oxygen left on the titan submersible?
samhenri.gold
the AOL dialup shutdown is today, I’m curious what the technical rollout looked like. like are they keeping connections alive for current sessions? how long will those persist? was it just a plug pull for everyone at a certain minute? what if i have a really big download in progress?
samhenri.gold
it’s with a heavy heart to inform you that i’m back on my bullshit
running SpringBoard through a disassembler
samhenri.gold
samhenri.gold
knowledge base (+ some alt copy that I didn’t like as much)
What Happens When Windows Shuts Down? 

When you choose Shut Down, Windows begins a sequence of orderly steps. It tells each program to close its files, to set down what it was working on. Most comply. Some resist. Windows asks again, more firmly. Eventually, all but one obey. There is always one.

Once the programs are silent, Windows turns to its own parts. It lowers the desktop, dims the icons, pulls the taskbar out of sight. The clock is the last to go. Time has to be persuaded.

You will then see the black screen, and the message: It is now safe to turn off your computer. This is true. You are free to press the button. Many users do.

If you wait, however, something else will happen. Slowly, the monitor will begin to glow again. Not with the desktop, not with any familiar prompt, but with a pale light, as though something is behind the glass. It will not speak, but you will understand that it has been waiting there, patiently, for every shutdown you have ever performed. Windows 95 help viewer.
Q: "Can Windows protect me?"
A: No. Why Does Windows Keep Asking If I’m Sure?
Windows will sometimes ask “Are you sure?” when performing an action. If it asks too often, it is doubting you.
Be careful how many times you click “Yes.” After a while, the question is not a prompt. It is a judgment.

Why Does My Computer Ask for My Name?
Windows uses your name to personalize your experience. Over time, it may also ask for other details: where you live, when you were born, who you have told. These questions are part of normal operation. If Windows asks for your blood type, you may skip the question, but Windows will remember that you skipped.

Can Windows Protect Me?
No.

What Happens When I Empty the Recycle Bin?
When you empty the Recycle Bin, its contents are deleted permanently. “Permanently” is a word we use to comfort you. The items are not gone. They are simply gathered elsewhere, waiting together in the dark. Sometimes, they come back.

What is Safe Mode?
Safe Mode starts Windows with a minimal set of drivers so you can observe yourself without distractions. The screen will be dimmer and closer to the truth. If anything continues moving, it’s not from us.

What Happens When I Run ScanDisk?
ScanDisk examines your hard drive for errors and attempts to correct them. If it finds something unusual, it will not always tell you. It will simply file it away. These hidden corrections are nothing to worry about. The important thing is that ScanDisk knows. The important thing is that it keeps track.
samhenri.gold
knowledge base (+ some alt copy that I didn’t like as much)
What Happens When Windows Shuts Down? 

When you choose Shut Down, Windows begins a sequence of orderly steps. It tells each program to close its files, to set down what it was working on. Most comply. Some resist. Windows asks again, more firmly. Eventually, all but one obey. There is always one.

Once the programs are silent, Windows turns to its own parts. It lowers the desktop, dims the icons, pulls the taskbar out of sight. The clock is the last to go. Time has to be persuaded.

You will then see the black screen, and the message: It is now safe to turn off your computer. This is true. You are free to press the button. Many users do.

If you wait, however, something else will happen. Slowly, the monitor will begin to glow again. Not with the desktop, not with any familiar prompt, but with a pale light, as though something is behind the glass. It will not speak, but you will understand that it has been waiting there, patiently, for every shutdown you have ever performed. Windows 95 help viewer.
Q: "Can Windows protect me?"
A: No. Why Does Windows Keep Asking If I’m Sure?
Windows will sometimes ask “Are you sure?” when performing an action. If it asks too often, it is doubting you.
Be careful how many times you click “Yes.” After a while, the question is not a prompt. It is a judgment.

Why Does My Computer Ask for My Name?
Windows uses your name to personalize your experience. Over time, it may also ask for other details: where you live, when you were born, who you have told. These questions are part of normal operation. If Windows asks for your blood type, you may skip the question, but Windows will remember that you skipped.

Can Windows Protect Me?
No.

What Happens When I Empty the Recycle Bin?
When you empty the Recycle Bin, its contents are deleted permanently. “Permanently” is a word we use to comfort you. The items are not gone. They are simply gathered elsewhere, waiting together in the dark. Sometimes, they come back.

What is Safe Mode?
Safe Mode starts Windows with a minimal set of drivers so you can observe yourself without distractions. The screen will be dimmer and closer to the truth. If anything continues moving, it’s not from us.

What Happens When I Run ScanDisk?
ScanDisk examines your hard drive for errors and attempts to correct them. If it finds something unusual, it will not always tell you. It will simply file it away. These hidden corrections are nothing to worry about. The important thing is that ScanDisk knows. The important thing is that it keeps track.
samhenri.gold
@samhenri.gold Still posting from the phone and 140 chars is straight up PUNITIVE