question

BenjaminMeder-0033 avatar image
1 Vote"
BenjaminMeder-0033 asked BenjaminMeder-0033 answered

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

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-10-network
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

0 Votes 0 ·

As you can see, yes, I need further assistance. I need something like this:

[PS] get-bluetoothdevice -filter name | Pair-bluetoothdevice -Pin 1234 -Service COM9
[PS] new-windowsprinter -Port COM9 -Driver c:\whatever

It could be that simple

0 Votes 0 ·
KarlieWeng-MSFT avatar image
0 Votes"
KarlieWeng-MSFT answered

Hi @BenjaminMeder-0033

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BenjaminMeder-0033 avatar image
0 Votes"
BenjaminMeder-0033 answered

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BenjaminMeder-0033 avatar image
0 Votes"
BenjaminMeder-0033 answered

Hello?

Someone still here? I need a solution.

Regards
Ben

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.