Windows 10 - mit Powershell oder AHK ein Bluetooth 4.0 Gerät koppeln

Benjamin Meder 6 Reputation points
2021-04-20T09:07:41.91+00:00

Hi,

<<english Version below>>

ich kann es kaum fassen, dass es keine Möglichkeit geben sollte mit der CMD/Powershell/AHK ein Bluetooth Gerät zu verwalten. Folgendes Szenario:

Windows 10 Rechner und ein portablen Drucker (STAR SM L200) der via Bluetooth verbunden wird. Natürlich kann ich über die Einstellungen -> Bluetooth- oder anderes Gerät hinzufügen -> Bluetooth -> Drucker auswählen. Dann kann ich im Druckerprogramm den COM Port auswählen, worüber ich dann mit dem Bluetooth Drucker ein Windows Drucker Warteschlange einrichten kann.

  1. Idee: Ich richte alles so ein wie ich das mit einem Drucker brauche. Dann ändere ich für den eingerichteten COM Port die MAC Adresse des Bluetooth Druckers und voila, ich kann mit einem anderen Drucker drucken
  2. Idee: Mit Powershell oder ähnliches den Drucker als Bluetooth <> COM Port hinzufügen und dann den im Windows bereits eingerichteten Drucker den Port von z.B. COM8 auf COM9 ändern.
  3. Idee: mit den BTDiscovery und BTPair.exe von bluetoothinstaller.com die Verbindung erstellen. BTDiscovery funktioniert zwar, aber mit btpair (in CMD mit admin) mit -p und -b Option kommt dann die Fehlermeldung: System Error. Code: 259. Es sind keine Daten mehr verf³gbar

Ich hoffe ihr könnt mich da schnell helfen.

Ben

<<English Version>>

I can't believe that there is so little support in Windows 10 with Bluetooth. I mean, everything nowadays are automated and scripted. But with Bluetooth it's another story. This is my setup:

Windows 10 and a STAR L200 Bluetooth Printer.

This is what I have to do manually:
-> Windows 10 -> Settings -> Add Bluetooth or other Device -> Bluetooth -> select Printer
-> Then I configure in the Printer Software to use the COM Port where the Printer shall communicate via Bluetooth. Then I can set the printer as a Windows Printer Queue.

  1. Idea: I setup all the above points, so that it work with one printer. If I have another printer, then I just change the MAC Address of the Bluetooth Printer in Windows 10 and it will print on the new printer
  2. Idea: I use Powershell/vbs/AHK/CMD/etc. to automate the Bluetooth Pairing (Bluetooth <> COM Port) and then I change the Windows Printer to use the newly created COM Port
  3. Idea: Pair the Device with BTDiscovery and BTPair.exe from bluetoothinstaller.com. BTDiscovery is working and is showing the printer and MAC address, but the btpair (CMD with admin) and the arguments -p and -b Options gives the Error Message:

Fehlermeldung: System Error. Code: 259.
There are no more Data available.

I hope you can help me out?

Best regards
Ben

Windows for business Windows Client for IT Pros Networking Network connectivity and file sharing
{count} vote

3 answers

Sort by: Most helpful
  1. Anonymous
    2021-04-21T02:19:08.197+00:00

    Hi @Benjamin Meder

    The application developer will be your best resource to debug this issue.

    Reference article:
    Installing the Printer Driver (Bluetooth)

    Best Regards
    Karlie

    ----------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Benjamin Meder 6 Reputation points
    2021-05-07T07:08:24.143+00:00

    Hi Karlie,

    yes, it's a way to do things manually. But I am asking to automate the pairing and connection to a bluetooth printer.

    My first problem is, that there are no built in Powershell Commands to search for a bt device, filter it and then pair to the new device. How come Windows 10 lacks the automatic/commandline based utility for bluetooth?

    Best regards
    Ben

    0 comments No comments

  3. Benjamin Meder 6 Reputation points
    2021-06-02T11:28:04.657+00:00

    Hello?

    Someone still here? I need a solution.

    Regards
    Ben

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.