2 edited body
source | link

You can then find these file descriptors in the /proc/(pid)/fd/ folder for bluetoothctl.

You can then find these file descriptors in the /proc//fd/ folder for bluetoothctl.

You can then find these file descriptors in the /proc/(pid)/fd/ folder for bluetoothctl.

1
source | link

Hmm... so while I though I was running bluetoothd with the --experimental flag I must have not saved the changes. To start the daemon with experimental features:

  1. Edit the .service file to include --experimental or -E on the startup command
  2. systemctl daemon-reload
  3. systemctl restart bluetooth

Next make sure the daemon is running with the correct flags:

systemctl status bluetooth

Then when I tried to use acquire-write or acquire-notify I got a new error message and the daemon seemed to crash:

[KeyDuino:/service0010/char0011]# acquire-write
Agent unregistered
[DEL] Controller 28:B2:BD:07:04:49 GBFedora01 [default]
[DEL] Primary Service0/char0011]# 
    /org/bluez/hci0/dev_D4_36_39_DE_61_6B/service000c
    00001801-0000-1000-8000-00805f9b34fb
    Generic Attribute Profile
[DEL] Characteristic
    /org/bluez/hci0/dev_D4_36_39_DE_61_6B/service000c/char000d
    00002a05-0000-1000-8000-00805f9b34fb
    Service Changed
[DEL] Descriptor
    /org/bluez/hci0/dev_D4_36_39_DE_61_6B/service000c/char000d/desc000f
    00002902-0000-1000-8000-00805f9b34fb
    Client Characteristic Configuration
[DEL] Primary Service
    /org/bluez/hci0/dev_D4_36_39_DE_61_6B/service0010
    0000ffe0-0000-1000-8000-00805f9b34fb
    Unknown
[DEL] Characteristic
    /org/bluez/hci0/dev_D4_36_39_DE_61_6B/service0010/char0011
    0000ffe1-0000-1000-8000-00805f9b34fb
    Unknown
[DEL] Descriptor
    /org/bluez/hci0/dev_D4_36_39_DE_61_6B/service0010/char0011/desc0013
    00002902-0000-1000-8000-00805f9b34fb
    Client Characteristic Configuration
[DEL] Descriptor
    /org/bluez/hci0/dev_D4_36_39_DE_61_6B/service0010/char0011/desc0014
    00002901-0000-1000-8000-00805f9b34fb
    Characteristic User Description
Failed to acquire write: org.freedesktop.DBus.Error.NoReply
Waiting to connect to bluetoothd...

I also got a popup indicating there were two SELinux issues detected:

SELinux issue write-acquire

The troubleshooting step provided commands to enable the requested permissions:

ausearch -c 'dbus-daemon' --raw | audit2allow -M my-dbusdaemon
semodule -X 300 -i my-dbusdaemon.pp

after restarting the bluetooth service, I can successfully acquire file read/write descriptors:

[KeyDuino:/service0010/char0011]# acquire-write
[CHG] Attribute /org/bluez/hci0/dev_D4_36_39_DE_61_6B/service0010/char0011 WriteAcquired: yes
AcquireWrite success: fd 7 MTU 23
[KeyDuino:/service0010/char0011]# acquire-notify
[CHG] Attribute /org/bluez/hci0/dev_D4_36_39_DE_61_6B/service0010/char0011 NotifyAcquired: yes
AcquireNotify success: fd 8 MTU 23

You can then find these file descriptors in the /proc//fd/ folder for bluetoothctl.

#Use cat to read output
sudo cat /proc/$(pgrep bluetoothctl)/fd/8
#In another root shell use cat to write to BLE characteristic
sudo -sE
cat > /proc/$(pgrep bluetoothctl)/fd/7