LF a Payload to turn on Bluetooth and auto-pair with my F0

Basically, I want a fast payload so I can connect to a device (for example a laptop) and then use my flipper as a remote mouse, keyboard, or media controller…
I’m not familiar with ducky-script, but if what I want doesn’t exist I would be happy to get some pointers to do it myself :slight_smile:

Thnx in advance

To write the payload learn what keys you need to press on the keyboard first. Note any place there might be a delay. I usually write everything down in notepad. Then I follow what I wrote exactly to see how it works. Once you get it working use the docs to translate it into ducky script. At that point you can test it with the Flipper. You will probably have to use the delay command in a few places so the computer can keep up. You will probably want to force the computer to forget the Flipper between tests if you want this to work on devices that have never been paired with your Flipper.


I briefly looked into this, mostly for my own curiosity. Here’s what I found:

1.) Trying to automate adding a device using the Windows GUI is tricky, because you have to select the Flipper from a list that is unpredictable.
2.) Without third-party software, there is no good way to interact with bluetooth using the command line (I didn’t investigate this hard)
3.) I had considered adding and removing items from the registry, however…
4.) Can you even add the Flipper to Windows without entering in the bluetooth PIN the first time? If not, this may be the showstopper right here.

1 Like

You have a point about potential difficulties. The device can pick the pin during pairing. That’s how older devices worked at least. I think the general script is still quite useful though. One or two manual clicks isn’t bad. Below is a beta that may need some delays added.

STRING bluetooth
REM Open the Add Device Menu
REM Start search
REM This is where the problem emptythevoid mentions starts.
REM What to do next?

1 Like

This is what I came up with this morning - it’s basically the same thing. I got stuck where it lists bluetooth devices nearby. As far as I can tell, the list order is dynamic and you can’t use the keyboard to type ahead and try to select. So I’m not sure yet how to work around it.

REM Attempt to automatically pair Flipper to Windows 10 Bluetooth

DELAY 1000
STRING ms-settings:bluetooth

REM should open Bluetooth & other devices and already default to selecting Add Bluetooth or other device

REM Opens "Add a Device".  Default to Bluetooth

REM now in discovery mode
REM this is a problem, because you have to use Arrows to find the device, and the order can change
1 Like

I thought there might be a command line work around but that doesn’t seem to be possible. There may still be a work around with the web browser or powershell.

EDIT: There may be a third party app approach as well. The Flipper can install an app and even bypass UAC.

Same here, and I’m a little surprised there isn’t. The only examples I saw used a third-party tool to handle it. I was hoping to stick with native Windows tools, so I didn’t look too hard into it.

I did consider trying to save the device registry information as an export and then reapply that, but either it also changes depending on the PIN, or I didn’t get everything required to “transplant” the Bluetooth configuration for a device.

1 Like

Ah hah… the keys tree was empty when I tried it - probably because I didn’t open it with SYSTEM. This warrants further research. windows 8 - Completely backup bluetooth pairings/profiles - Super User

Edit: I can export using regedit launched with psexec, but cannot import the Keys back into registry without also using psexec.