lunes, 6 de marzo de 2017

Hardware (Requirements):

* Any device with bluetooth (cellphone, smartphone, tablet, headset, headphones, etc.)
* Desktop or laptop with bluetooth device inside. If your equipment have not one, you can use an USB bluetooth adapter dongle.

Software (Requirements):

Basic installation:

$ sudo apt-get install bluetooth

For send files using a GUI (Linux > Smartphone):

$ sudo apt-get install bluetooth blueman obexftp obexpushd

ONLY for Debian Jessie: Linux (blueman) can send files to smartphone (Linux > smartphone), but not receive from smartphone. If you want receive files from smartphone, then:

$ sudo apt-get install obexpushd
$ sudo pluma /etc/systemd/system/dbus-org.bluez.service

In that file, add the '-C' flag to the end of the 'ExecStart=' line. It should look like this:

ExecStart=/usr/lib/bluetooth/bluetoothd -C

Save and exit. To automate the obexpushd command, create this file:

$ sudo pluma /etc/systemd/system/obexpush.service

And add the following:

[Unit]
Description=OBEX Push service
After=bluetooth.service
Requires=bluetooth.service

[Service]
ExecStart=/usr/bin/obexpushd -B -o /home/YOUR_USER_NAME/downloads -n

[Install]
WantedBy=multi-user.target

The path '/home/YOUR_USER_NAME/downloads' is just an example. You can receive files from smartphone in any place, for example: '/bluetooth' or '/home/torvalds/downloads'

Finally, autostart the obexpush service with:

$ sudo systemctl enable obexpush
$ sudo reboot

After a reboot, send a file from smartphone to Linux. The files will appear in that folder that you defined in /etc/systemd/system/obexpush.service

If you are missed, check this guide.

UPDATE 17-NOV-2018: The steps above are unnecessaries for Debian Stretch. Just go to Bluetooth icon (MATE Panel) > Local Services > Transfer and check "Accept files from trusted devices". That's all.

For audio (Headsets, Headphones, speakers...) using a GUI:

$ sudo apt-get install bluetooth blueman pulseaudio pulseaudio-module-bluetooth pavucontrol bluez-firmware

TODO.txt (Send files and audio):

$ sudo apt-get install bluetooth blueman obexftp obexpushd pulseaudio
pulseaudio-module-bluetooth pavucontrol bluez-firmware

$ systemctl status bluetooth
$ sudo systemctl start bluetooth
$ sudo killall pulseaudio
$ sudo systemctl restart bluetooth

Post-installation:

$ cd /
$ cd etc/bluetooth/
$ sudo pluma input.conf

Uncomment this lines:

IdleTimeout=0
UserspaceHID=true

Save and exit.

$ sudo pluma main.conf

Uncomment this lines:

Name = %h-%d
Class = 0x000100
DiscoverableTimeout = 0
PairableTimeout = 0
AutoConnectTimeout = 60
DeviceID = bluetooth:1234:5678:abcd
ReverseServiceDiscovery = true
NameResolving = true
DebugKeys = false
ReconnectUUIDs=

Save and exit.

$ sudo pluma network.conf

Uncomment this lines:

DisableSecurity=true

Save and exit.

$ sudo pluma proximity.conf

Uncomment this lines:

Disable=PathLoss

Save and exit.

$ cd ..
$ sudo pluma default/bluetooth

Uncomment this lines:

BLUETOOTH_ENABLED=1
HID2HCI_ENABLED=0
HID2HCI_UNDO=0

Save and exit.

$ sudo reboot

Configure your bluetooth devices using blueman.

SOURCES:

https://wiki.debian.org/BluetoothUser
https://wiki.debian.org/BluetoothUser/a2dp
https://www.raspberrypi.org/forums/viewtopic.php?t=146328

No hay comentarios.:

Publicar un comentario