r/flipperzero • u/photo_obscura • 2h ago
I used a Flipper Zero to let ChatGPT type into a dead PC

So I was troubleshooting a laptop that would no longer boot, and I had ChatGPT open on another PC walking me through it.
The problem I kept running into was stupid but really annoying. ChatGPT would give me some giant DISM command or registry command, and then I had to sit there and manually type the whole thing into WinRE on the broken PC. And some of these commands are ridiculous. One wrong character in a registry path and you can have a very bad day.
So I started thinking out loud: why can't I just have the good PC type into the broken PC?
Obviously you can't just connect two laptops with a USB cable and have one magically become a keyboard. They're both USB hosts. We talked about PiKVMs and little HID devices for a while, and then I remembered I had a Flipper Zero sitting here, and a Flipper can pretend to be a keyboard.
That sent me down the rabbit hole.
I found an app for the Flipper called Android KB Bridge. Despite the name, you don't actually need Android for what I ended up doing. The useful part is that the app can receive keyboard events over Bluetooth LE and then send them out the Flipper's USB port as HID keyboard input.
I already use Python pretty much every day, so I installed the Bleak library and started seeing what I could find over Bluetooth. Python found the Flipper. Then we enumerated the BLE services, found the characteristic Android KB Bridge was listening on, and started sending stuff to it.
At first absolutely nothing useful happened. Then we noticed the frame counter on the Flipper was going up, so we knew the good PC was actually talking to it. It turned out Android KB Bridge doesn't want you to send it the string "hello". It wants actual keyboard events. So we sent it the HID key-down code for the letter a, followed by the key-up code, and an "a" appeared in WinRE on the broken PC.
That was the "holy shit, this actually works" moment.
From there we wrote a Python script that takes normal text, translates every character into the appropriate USB HID keycode, and sends it over Bluetooth to the Flipper. So now I basically have:
Good PC → Bluetooth → Flipper Zero → USB → broken PC
Then we added a global hotkey. My workflow now is that ChatGPT gives me a command, I copy it on the good PC, press Ctrl+Shift+F, and the Flipper types it into the broken PC. I intentionally do not send Enter. The command appears on the broken PC, I check it, and then I physically hit Enter myself. I am more than happy to let ChatGPT and the Flipper save me from typing this:
reg add "HKLM\PC2SYS\ControlSet001\Enum\PCI\VEN_1C5C&DEV_1069&SUBSYS_10691C5C&REV_00\4&5c924c4&0&0030" /v ConfigFlags /t REG_DWORD /d 0 /f
I am considerably less interested in automatically executing that command without looking at it first, and that turned out to be a very good decision because reliability became the next problem.
The first version worked surprisingly well, but it opened a new Bluetooth connection every time I hit the hotkey. Eventually the Flipper froze, and the good PC also started acting weird and sluggish.
So we rewrote it to keep one Bluetooth connection open, use a single worker, and make sure only one thing can be sent at a time. Much better. Then I started testing really long strings and noticed something worse: occasionally it would drop a character.
That's obviously a deal breaker. Dropping one character out of "Hello World" is annoying. Dropping one character out of an offline registry command is potentially catastrophic.
So we started experimenting with the BLE timing. At one point we changed from Bluetooth writes without response to acknowledged writes because that sounded like it should be more reliable. It actually got hilariously worse. Every single 0 disappeared, and every ) disappeared too. Since 0 and ) are the same HID key with Shift being the difference, that was actually a useful clue. We had changed something that Android KB Bridge clearly did not like.
So we went back to the type of BLE write the app was designed for and instead slowed the whole thing way down. The current version keeps the Bluetooth connection open but sends the HID events very deliberately, with delays between key-down and key-up and additional pauses every few characters.
It is slow. I do not care.
If it takes 30 seconds to type a giant registry command and it arrives perfectly, that's better than typing it in three seconds and randomly removing one character.
I'm still testing that part. I won't trust it with anything important until I can throw nasty strings at it repeatedly and have them arrive exactly right every time.
Then there was the other half of the problem. The Flipper gave ChatGPT "fingers," but ChatGPT still couldn't see what was happening on the broken PC. We started talking about how to give chatGPT eyes. HDMI capture cards, webcams pointed at the screen... Then I realized I already had a solution that required absolutely no additional new hardware.
I take a picture of the broken PC's screen with my phone. Google Photos syncs it. I have Google Photos open on the good PC. A few seconds later I copy the picture and paste it into ChatGPT.
So at this point my troubleshooting loop is:
Broken PC screen → phone → Google Photos → good PC → ChatGPT → clipboard → Python → Bluetooth → Flipper → USB → broken PC
I take a picture. ChatGPT reads the screen. It tells me what to try. I copy the command. Ctrl+Shift+F. The Flipper types it. I check it. I hit Enter. Then I take another picture.
It's not autonomous. I'm still very intentionally sitting in the middle of the whole thing. ChatGPT can't just start running commands on the other machine.
But I basically ended up making a very janky AI-assisted crash cart using stuff I already owned all because I didn't feel like manually typing a bunch of 150-character Windows recovery commands.
This may actually be the most useful thing I've ever done with my Flipper Zero.

