Zeile 60: |
Zeile 60: |
| | | |
| durchführen. | | durchführen. |
| + | |
| + | === Automatisches Pairen und Vertrauen === |
| + | |
| + | ''Der folgende Tipp kann ein Sicherheitsrisiko darstellen:'' |
| + | |
| + | Um andere Geräte automatisch mit dem Linux-Server koppeln zu lassen und ihnen auch noch zu ''vertrauen(!)'', kann folgendes Skript benutzt werden. |
| + | |
| + | |
| + | #!/bin/bash |
| + | echo -e "pairable on\ndiscoverable on\nagent on\n" | bluetoothctl |
| + | while true; do |
| + | echo paired-devices | bluetoothctl \ |
| + | | sed -n -e 's/^Device \(..:..:..:..:..:..\).*$/trust \1/p' \ |
| + | | xargs -l -dz echo | bluetoothctl |
| + | sleep 20s |
| + | done |
| | | |
| === Linux-Server als Audio-Ausgabe === | | === Linux-Server als Audio-Ausgabe === |
| + | |
| + | Die üblichen Werkzeuge, um den Linux-Server als Audio-Ausgabe für ein Smartphone mit Hilfe der Kommandozeile einzurichten, sind bluetoothctl und [[PulseAudio]]. |
| | | |
| Siehe | | Siehe |
| + | * https://askubuntu.com/questions/763939/bluetoothctl-what-is-a-bluetooth-agent |
| + | * https://pi-buch.info/bluetooth-konfiguration-mit-bluetoothctl/ |
| * https://github.com/ev3dev/ev3dev.github.io/pull/24/files/50787e9fae767f4a8e5e1748c5bb70b40eb9f259?short_path=2545682 | | * https://github.com/ev3dev/ev3dev.github.io/pull/24/files/50787e9fae767f4a8e5e1748c5bb70b40eb9f259?short_path=2545682 |
| * https://blog.stevenocchipinti.com/2012/10/bluetooth-audio-streaming-from-phone-to.html/ | | * https://blog.stevenocchipinti.com/2012/10/bluetooth-audio-streaming-from-phone-to.html/ |
Zeile 183: |
Zeile 203: |
| | | |
| | | |
| + | |
| + | == Bluetooth vom Browser == |
| + | |
| + | In wenigen Browsern gibt es ein experimentelles Feature: die Web-Bluetooth-API. |
| + | |
| + | Im Firefox-Browser soll es diese API aus Sicherheitsgründen nicht geben (dem Nutzer können die Gefahren einer Low-Level-Bluetooth-Verbindung nicht leicht und verständlich genug mitgeteilt werden, was aber für das gefahrlose Browsen im Internet möglich sein muss). |
| + | |
| + | In Chrome und Edge gibt es diese [https://developer.chrome.com/docs/capabilities/bluetooth API] (u.U. freizuschalten in den Flags (about://flags#experimental-web-platform-features)). |
| + | |
| + | Zu Debugging-Zwecken integrieren diese auch ein einfaches Tool: |
| + | |
| + | * about://bluetooth-internals |
| | | |
| == Bluetooth und Java == | | == Bluetooth und Java == |