User Tools

Site Tools


linux:bluetooth:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:bluetooth:start [2023/10/01 16:30] – removed - external edit (Unknown date) 127.0.0.1linux:bluetooth:start [2024/03/03 08:35] (current) – [Tools installieren] dominik
Line 1: Line 1:
 +====== Bluetooth ======
 +
 +<nspages -h1 -r -exclude>
 +
 +===== Tools installieren =====
 +  * Updates einspielen \\ ''sudo apt update && sudo apt upgrade -y && sudo apt install git''
 +  * Konsole \\ ''sudo apt install bluez bluetooth pulseaudio pulseaudio-utils pulseaudio-module-bluetooth''
 +  * grafisch \\ ''sudo apt install blueman pavucontrol''
 +
 +===== kein BT Sound =====
 +  * Gerät hängt an anderem Pulsaudio -> anderer User \\ <code>
 +pid@smartpad:~$ ps -fC pulseaudio
 +UID        PID  PPID  C STIME TTY          TIME CMD
 +lightdm   1576  1559  3 07:27 ?        00:00:06 /usr/bin/pulseaudio --daemonize=no --log-target=journal
 +pid       1932  1791  0 07:27 ?        00:00:00 /usr/bin/pulseaudio --daemonize=no --log-target=journal
 +</code>
 +  * ''sudo systemctl stop lightdm.service''
 +
 +===== Links =====
 +  * Bluez github  \\ https://github.com/bluez/bluez.git
 +  * bluetooth-autoconnect \\ https://github.com/jrouleau/bluetooth-autoconnect
 +  * https://mcuoneclipse.com/2017/06/04/using-python-to-store-data-from-many-ble-devices/
 +  * Bluetooth with Arduino and Linux (BT - Seriell) \\ http://denethor.wlu.ca/arduino/bluetooth.shtml
 +  * How to connect raspberry pi with HC-05 bluetooth module + arduino programm \\ https://ivanmorenoj.medium.com/how-to-connect-raspberry-pi-with-hc-05-bluetooth-module-arduino-programm-64a3a8b407a6
 +  * https://www.baeldung.com/linux/bluetooth-via-terminal#bd-overview
 +  * Setting up a Bluetooth Speaker from the command line on a raspberry Pi Zero W  \\ https://gist.github.com/actuino/9548329d1bba6663a63886067af5e4cb
 +  * Listen to Bluetooth Audio on Your Raspberry Pi 3, Pi Zero, or Earlier Pi \\ https://plugable.com/blogs/news/listen-to-bluetooth-audio-on-your-raspberry-pi-3-pi-zero-or-earlier-pi
 +  * Connecting bluetooth audio device to Raspberry Pi \\ https://wiretuts.com/connecting-bluetooth-audio-device-to-raspberry-pi
 +  * RetroPie (V4.2): Bluetooth Controller \\ https://www.retro-programming.de/retro-welt-2/hardware/raspberry-pi-als-emulator-retropie/retropie-controller-einrichten/retropie-bluetooth-controller/
 +  * https://techwiser.com/fix-bluetooth-device-doesnt-auto-connect-in-linux/
 +  * https://wiki.ubuntu.com/DebuggingBluetooth
 +  * Pairing from Ubuntu Core \\ https://ubuntu.com/core/docs/bluez/reference/pairing/outbound-pairing
 +
 +
 +Damit am Pi einfache Controller laufen einen anderen Agent verwenden \\
 +-> ~/RetroPie-Setup/scriptmodules/supplementary/bluetooth \\
 +-> bluez-simple-agent
 +
 +-> Beuspiel: \\
 +17:05:16:03:35:E1 MOCUTE-032S_A03-35E1 \\
 +get_script_bluetooth bluez-simple-agent) -c DisplayYesNo hci0 17:05:16:03:35:E1
 +
 +sudo bluetoothctl muss dafür auf sein ??
 +
 +
 +
 +===== Log =====
 +    1  cat /etc/os-release
 +    2  sudo systemctl status bluetooth.service
 +    3  sudo bluetoothctl
 +    4  sudo btmon
 +    5  sudo btmon
 +    6  git clone https://github.com/bluez/bluez.git
 +    7  sudo apt install git
 +    8  git clone https://github.com/bluez/bluez.git
 +    9  sudo apt-get build-dep bluez
 +   10  cd bluez/
 +   11  ./bootstrap
 +   12  sudo apt install aclocal
 +   13  apt search aclocal
 +   14  sudo apt install build-essential libbluetooth-dev libglib2.0-dev libdbus-1-dev git
 +   15  ./bootstrap
 +   16  sudo apt install build-essential libbluetooth-dev libglib2.0-dev libdbus-1-dev git automake
 +   17  ./bootstrap
 +   18  apt search libtoolsize
 +   19  apt search libtoolize
 +   20  sudo apt install build-essential libbluetooth-dev libglib2.0-dev libdbus-1-dev git automake libtool
 +   21  ./bootstrap
 +   22  ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
 +   23  sudo apt install build-essential libbluetooth-dev libglib2.0-dev libdbus-1-dev git automake libtool libudev
 +   24  sudo apt install build-essential libbluetooth-dev libglib2.0-dev libdbus-1-dev git automake libtool libudev-dev
 +   25  sudo apt update
 +   26  sudo apt install build-essential libbluetooth-dev libglib2.0-dev libdbus-1-dev git automake libtool libudev-dev
 +   27  ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
 +   28  sudo apt install build-essential libbluetooth-dev libglib2.0-dev libdbus-1-dev git automake libtool libudev-dev libical-dev
 +   29  ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
 +   30  sudo apt install build-essential libbluetooth-dev libglib2.0-dev libdbus-1-dev git automake libtool libudev-dev libical-dev libreadline-dev
 +   31  ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
 +   32  sudo apt install build-essential libbluetooth-dev libglib2.0-dev libdbus-1-dev git automake libtool libudev-dev libical-dev libreadline-dev
 +   33  sudo apt install build-essential libbluetooth-dev libglib2.0-dev libdbus-1-dev git automake libtool libudev-dev libical-dev libreadline-dev python3-docutils
 +   34  ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
 +   35  make -j4
 +   36  sudo make install
 +   37  btmon -v
 +   38  sudo systemctl restart bluetooth.service
 +   39  sudo systemctl daemon-reload
 +   40  sudo systemctl restart bluetooth.service
 +   41  sudo systemctl status bluetooth.service
 +   42  sudo vluetoothc
 +   43  sudo bluetoothctl
 +   44  sudo reboot
 +   45  sudo bluetoothctl
 +   46  arecord
 +   47  arecord -l
 +   48  arecord -L
 +   49  pactl list cards short
 +   50  sudo apt install pulseaudio
 +   51  pacmd list-source
 +   52  nano ~/.config/pulse/client.conf
 +   53  sudo raspi-config
 +   54  sudo apt-get install pulseaudio pulseaudio-utils pulseaudio-module-bluetooth
 +   55  sudo usermod -a -G lp pi
 +   56  groups
 +   57  usermod --help
 +   58  id pi
 +   59  groups --help
 +   60  groups pi
 +   61  sudo reboot
 +   62  pulseaudio --start
 +   63  htop
 +   64  ps -ef |grep pulse
 +   65  sudo bluetoothctl
 +   66  pactl list cards short
 +   67  pactl list cards
 +   68  paplay -p --device=1 /usr/share/sounds/alsa/Front_Center.wav
 +   69  pactl list short modules
 +   70  pactl list cards
 +   71  sudo bluetoothctl
 +   72  sudo bluetoothctl
 +   73  wget blob:https://github.com/c5685084-4f9f-4e57-8748-e6d4b9467837
 +   74  wget https://github.com/c5685084-4f9f-4e57-8748-e6d4b9467837
 +   75  wget https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/scriptmodules/supplementary/bluetooth/bluezutils.py
 +   76  wget https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/scriptmodules/supplementary/bluetooth/bluez-simple-agent
 +   77  ls
 +   78  python bluez-simple-agent
 +   79  pip3 install dbus
 +   80  sudo apt install pip3
 +   81  sudo apt install python3-pip
 +   82  pip3 install dbus
 +   83  pip install dbus-python
 +   84  python bluez-simple-agent
 +   85  pip install glib
 +   86  python bluez-simple-agent
 +   87  mv bluez-simple-agent bluez-simple-agent.py
 +   88  cat bluez-simple-agent.py
 +   89  pip install python3-gi
 +   90  sudo apt install python3-gi
 +   91  cat bluez-simple-agent.py
 +   92  python bluez-simple-agent
 +   93  python bluez-simple-agent.py
 +   94  sudo python bluez-simple-agent.py
 +   95  sudo apt install python3-dbus
 +   96  sudo python bluez-simple-agent.py
 +   97  cat /etc/group | grep blue
 +   98  git clone https://github.com/jrouleau/bluetooth-autoconnect.git
 +   99  sudo cp bluetooth-autoconnect/bluetooth-autoconnect.service /etc/systemd/system/
 +  100  sudo cp '/home/pratik/bluetooth-autoconnect/bluetooth-autoconnect' /usr/bin/
 +  101  sudo cp ~/bluetooth-autoconnect/bluetooth-autoconnect /usr/bin/
 +  102  sudo systemctl enable bluetooth-autoconnect.service
 +  103  sudo systemctl start  bluetooth-autoconnect.service
 +  104  sudo systemctl status  bluetooth-autoconnect.service
 +  105  journalctl -u bluetooth-autoconnect.service
 +  106  journalctl -u bluetooth-autoconnect.service -b
 +  107  journalctl -xefu bluetooth-autoconnect.service
 +  108  cd bluetooth-autoconnect/
 +  109  ls
 +  110  cat bluetooth-autoconnect
 +  111  sudo nano /usr/bin/bluetooth-autoconnect
 +  112  sudo systemctl restart  bluetooth-autoconnect.service
 +  113  journalctl -xefu bluetooth-autoconnect.service
 +  114  sudo nano /usr/bin/bluetooth-autoconnect
 +  115  sudo systemctl restart  bluetooth-autoconnect.service
 +  116  journalctl -xefu bluetooth-autoconnect.service
 +  117  sudo systemctl restart  bluetooth-autoconnect.service
 +  118  journalctl -xefu bluetooth-autoconnect.service
 +  119  sudo systemctl stop bluetooth-autoconnect.service
 +  120  sudo apt install vlc
 +  121  vlc
 +  122  pavucontrol
 +  123  sudo apt install pavucontrol
 +  124  pavucontrol
 +  125  pulseaudio --start
 +  126  vlc
 +  127  cat /home/pi/.asoundrc
 +  128  cd ~
 +  129  nano .asoundrc
 +  130  ls -lah
 +  131  sudo nano .asoundrc
 +  132  vlc
 +  133  cat /etc/asound.conf
 +  134  cvlc --aout=alsa --alsa-audio-device=default --verbose=-1 http://st01.dlf.de/dlf/01/128/mp3/stream.mp3
 +  135  sudo reboot
 +  136  sudo btmon
 +  137  plu
 +  138  pulseaudio --start
 +  139  cvlc --aout=alsa --alsa-audio-device=default --verbose=-1 http://st01.dlf.de/dlf/01/128/mp3/stream.mp3
 +  140  vlc
 +  141  sudo apt install blueman
 +  142  blueman-manager
 +  143  blueman-applet
 +  144  blueman-assistant
 +  145  blueman-applet
 +  146  blueman-adapters
 +  147  blueman-applet
 +  148  blueman-applet &
 +  149  blueman-manager
 +  150  pavucontrol
 +  151  alsamixer
 +  152  ls -al /dev/snd
 +  153  ip pi
 +  154  id pi
 +  155  sudo service bluealsa status
 +  156  sudo apt-get install pulseaudio pulseaudio-module-bluetooth
 +  157  id pi
 +  158  sudo usermod -G bluetooth -a pi
 +  159  id pi
 +  160  sudo reboot
 +  161  pulseaudio --start
 +  162  sudo bluetoothctl
 +  163  cat /etc/pulse/default.pa
 +  164  cd /etc/pulse/
 +  165  ls
 +  166  ls -lah
 +  167  sudo nano default.pa
 +  168  cd ..
 +  169  cd bluetooth/
 +  170  ls
 +  171  ls -lah
 +  172  sudo nano main.conf
 +  173  bluetoothctl -a
 +  174  sudo reboot
 +  175  vlc
 +  176  sudo nano /boot/config.txt
 +  177  sudo reboot
 +  178  vlc
 +  179  apl
 +  180  aplay
 +  181  pulseaudio --start
 +  182  cvlc  --verbose=-1 http://st01.dlf.de/dlf/01/128/mp3/stream.mp3
 +  183  cvlc  --verbose=1 http://st01.dlf.de/dlf/01/128/mp3/stream.mp3
 +  184  find / -name *.wav
 +  185  alsa /usr/share/sounds/alsa/Front_Center.wav
 +  186  aplay /usr/share/sounds/alsa/Front_Center.wav
 +  187  paplay -p --device=1 /usr/share/sounds/alsa/Front_Center.wav
 +  188  pulseaudio --start
 +  189  pactl list cards short
 +  190  sudo bluetoothctl
 +  191  pactl list cards
 +  192  sudo bluetoothctl
 +  193  pactl list cards
 +  194  vlc
 +  195  sudo nano  /etc/bluetooth/main.conf
 +  196  sudo systemctl restart bluetooth
 +  197  pactl list sinks short
 +  198  pactl list cards
 +  199  sudo reboot
 +  200  pactl list cards
 +  201  sudo -H pactl load-module module-bluetooth-discover
 +  202  pactl list cards
 +  203  sudo --help
 +  204  pacmd list-cards
 +  205  sudo bluetoothctl
 +  206  pacmd list-cards
 +  207  sudo bluetoothctl
 +  208  sudo reboot
 +  209  pacmd list-cards
 +  210  sudo apt install omxplayer
 +  211  apt search omx
 +  212  cvlc  --verbose=1 http://st01.dlf.de/dlf/01/128/mp3/stream.mp3
 +  213  pavucontrol
 +  214  sudo apt update
 +  215  sudo apt upgrade
 +  216  sudo nano  /etc/bluetooth/main.conf
 +  217  sudo systemctl restart bluetooth
 +  218  sudo python bluez-simple-agent.py
 +  219  dmesg | grep Bluetooth
 +  220  sudo nano  /etc/bluetooth/main.conf
 +  221  ls /dev/tty*
 +  222  sudo rfcomm bind rfcomm0 00:13:AA:00:0D:AC
 +  223  ls /dev/tty*
 +  224  ls /dev/rf*
 +  225  sudo rfcomm unbind rfcomm0 00:13:AA:00:0D:AC
 +  226  ls /dev/rf*
 +  227  sudo rfcomm bind rfcomm0 00:13:AA:00:0D:AC
 +  228  sudo rfcomm bind rfcomm0  20:14:04:14:27:92
 +  229  sudo rfcomm unbind rfcomm0 00:13:AA:00:0D:AC
 +  230  sudo rfcomm bind rfcomm0  20:14:04:14:27:92
 +  231  ls /dev/rf*
 +  232  cat /dev/rfcomm0
 +  233  sudo rfcomm bind rfcomm0  20:14:04:14:27:92
 +  234  cat /dev/rfcomm0
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki