Cannot receive files using Bluetooth, Bluetooth transfer failed

Message
Author
User avatar
LinuxSpring1
Posts: 274
Joined: Sun May 05, 2024 8:57 am

Cannot receive files using Bluetooth, Bluetooth transfer failed

#1 Post by LinuxSpring1 »

I am facing a particular issue while using Bluetooth to transfer files from my Android phone to my laptop. I can send files to my phone. But I cannot receive any files. Evertime the error message that is given is "Bluetooth transfer failed". Please see the attached screenshot for more details.
BluetoothFileTransferReceivingFileFailed_17Feb2025.jpg


When I looked in the /var/log/syslog file the following are the logs that I see. These logs shows that the connect attempt is made by the phone, which is successfull. But when it tries to send the file it fails due to operation not permitted error message, i.e. open(/home/XXXXX/.cache/obexd/IMG_20250217_1.jpg0): Operation not permitted (1).

Code: Select all

2025-02-17T05:07:34.951087  hostname kernel: [ 3516.364199] Not activating Mandatory Access Control as /sbin/tomoyo-init does not exist.
2025-02-17T05:13:43.337103  hostname kernel: [ 3884.749159] input: YYYYYY (AVRCP) as /devices/virtual/input/input23
2025-02-17T05:13:45.957273  hostname obexd[2886]: CONNECT(0x0), <unknown>(0xff)
2025-02-17T05:13:45.957377  hostname obexd[2886]: CONNECT(0x0), <unknown>(0x0)
2025-02-17T05:13:45.986430  hostname obexd[2886]: PUT(0x2), <unknown>(0xff)
2025-02-17T05:13:47.669811  hostname bluetoothd[2214]: /org/bluez/hci0/dev_74_CB_F3_91_3D_9C/fd3: fd(40) ready
2025-02-17T05:13:50.835802  hostname obexd[2886]: open(/home/XXXXX/.cache/obexd/IMG_20250217_1.jpg0): Operation not permitted (1)
2025-02-17T05:13:50.835813  hostname obexd[2886]: PUT(0x2), Forbidden(0x43)
2025-02-17T05:13:50.890165  hostname obexd[2886]: DISCONNECT(0x1), <unknown>(0xff)
2025-02-17T05:13:50.890171  hostname obexd[2886]: DISCONNECT(0x1), Success(0x20)
2025-02-17T05:13:50.917233  hostname obexd[2886]: disconnected: Transport got disconnected
2025-02-17T05:13:50.917261  hostname bluetoothd[2214]: src/profile.c:ext_io_disconnected() Unable to get io data for Object Push: getpeername: Transport endpoint is not connected (107)
So I looked into the $HOME/.cache directory and this is what I see. Nothing out of the ordinary over here. The permissions look just fine.

Code: Select all

$ pwd
/home/XXXXX/.cache
$ ls -alpF
total 28596
drwxr-xr-x 15 XXXXX XXXXX      400 Feb 17 05:57  ./
drwx------ 11 XXXXX XXXXX      440 Feb 17 05:58  ../
drwxr-xr-x  3 XXXXX XXXXX      100 Feb 17 05:52  bookmarksrunner/
drwxr-xr-x  2 XXXXX XXXXX      140 Feb 17 04:50  fontconfig/
-rw-r--r--  1 XXXXX XXXXX 10547304 Feb 17 05:55  icon-cache.kcache
drwxr-xr-x  3 XXXXX XXXXX       60 Feb 17 04:39  ksplash/
-rw-r--r--  1 XXXXX XXXXX   893136 Feb 17 04:40 'ksycoca5_en_3PRDczLL3twzKedicinOmZcSpDI='
-rw-r--r--  1 XXXXX XXXXX   893114 Feb 17 04:39 'ksycoca5_en-GB_3PRDczLL3twzKedicinOmZcSpDI='
drwxr-xr-x  3 XXXXX XXXXX       60 Feb 17 04:39  kwin/
drwx------  2 XXXXX XXXXX       40 Feb 17 04:39  mesa_shader_cache/
drwx------ 52 XXXXX XXXXX     1080 Feb 17 04:39  mesa_shader_cache_db/
drwx------  3 XXXXX XXXXX       60 Feb 17 04:50  mozilla/
drwx------  2 XXXXX XXXXX      160 Feb 17 05:43  obexd/
drwxr-xr-x  3 XXXXX XXXXX       60 Feb 17 04:39  plasmashell/
-rw-------  1 XXXXX XXXXX    56998 Feb 17 05:57  plasma-svgelements
-rw-r--r--  1 XXXXX XXXXX 16875624 Feb 17 05:57  plasma_theme_mx-comfort-breeze-dark_v5.78.0.kcache
drwxr-xr-x  2 XXXXX XXXXX      400 Feb 17 05:35  qtshadercache-x86_64-little_endian-lp64/
drwxr-xr-x  3 XXXXX XXXXX       60 Feb 17 05:25  systemsettings/
drwxr-xr-x  4 XXXXX XXXXX       80 Feb 17 05:27  thumbnails/
There is no entry in the auth.log file, nor in the user.log and nor in the kern.log files. This is surprising, because I was expecting more details in the auth.log file atleast, if not in the user.log file.

What can be the issue? How to get this resolved? Any pointers would be welcome.

System QSI

Code: Select all

System:
  Kernel: 6.1.0-25-amd64 [6.1.106-3] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/vmlinuz-6.1.0-25-amd64 root=UUID=<filter> ro quiet splash 
  Desktop: KDE Plasma v: 5.27.5 wm: kwin_wayland vt: 8 dm: SDDM Distro: MX-23.3_KDE_x64 Libretto
    January 21 2024 base: Debian GNU/Linux 12 (bookworm)
Machine:
   Type: Laptop System: XXXX product: XXXXX v: N/A serial: <superuser required>
    Chassis: type: 10 serial: <superuser required>
  Mobo: XXXX model: XXXXX serial: <superuser required> UEFI: XXXXXXX
    date: 05/24/2023
Battery:
  ID-1: BAT0 charge: 34.0 Wh (100.0%) condition: 34.0/36.2 Wh (94.0%) volts: 12.7 min: 11.4
    model: Notebook BAT type: Li-ion serial: <filter> status: full
CPU:
  Info: model: 11th Gen Intel Core i3-1115G4 bits: 64 type: MT MCP arch: Tiger Lake gen: core 11
    level: v4 note: check built: 2020 process: Intel 10nm family: 6 model-id: 0x8C (140) stepping: 2
    microcode: 0x36
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache: L1: 160 KiB
    desc: d-2x48 KiB; i-2x32 KiB L2: 2.5 MiB desc: 2x1.2 MiB L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 1126 high: 1273 min/max: 400/4100 scaling: driver: intel_pstate
    governor: powersave cores: 1: 1075 2: 1063 3: 1094 4: 1273 bogomips: 23961
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS; IBPB: conditional; RSB filling;
    PBRSB-eIBRS: SW sequence; BHI: SW loop, KVM: SW loop
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Tiger Lake-LP GT2 [UHD Graphics G4] vendor: XXXX driver: i915 v: kernel
    arch: Gen-12.1 process: Intel 10nm built: 2020-21 ports: active: eDP-1 empty: DP-1, DP-2, DP-3,
    DP-4, HDMI-A-1 bus-ID: XXXX chip-ID: XXXX class-ID: 0300
  Device-2: XXXXX USB2.0 Camera type: USB driver: uvcvideo bus-ID: XXXX chip-ID: XXXX
    class-ID: XXXX serial: <filter>
  Display: wayland server: X.org v: 1.21.1.7 with: Xwayland v: 22.1.9 compositor: kwin_wayland
    driver: X: loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915 display-ID: 0
  Monitor-1: eDP-1 res: 1920x1080 size: N/A modes: N/A
  API: OpenGL v: 4.6 Mesa 23.1.2-1~mx23ahs renderer: Mesa Intel UHD Graphics (TGL GT2)
    direct-render: Yes
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: XXXX driver: snd_hda_intel
    bus-ID: XXXX v: kernel alternate: snd_sof_pci_intel_tgl chip-ID: XXXX bus-ID: XXXX
    class-ID: 0300 chip-ID: XXXX class-ID: 0403
  Device-2: C-Media USB Advanced Audio Device type: USB driver: hid-generic,snd-usb-audio,usbhid
  API: ALSA v: k6.1.0-21-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Wi-Fi 6 AX201 driver: XXXX v: kernel modules: wl bus-ID: XXXX
    chip-ID: XXXX class-ID: XXXX
  IF: wlan0 state: up mac: <filter>
  Device-2: Intel Ethernet I219-V driver: XXXX v: kernel port: N/A bus-ID: XXXX
    chip-ID: XXXX class-ID: XXXX
  IF: eth0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8
    bus-ID: XXXX chip-ID: XXXX class-ID: XXXX
  Report: hciconfig ID: hci0 rfk-id: 1 state: down bt-service: N/A rfk-block: hardware: no
    software: yes address: <filter>
  Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff link-mode: peripheral accept
Drives:
  Local Storage: total: 709.83 GiB used: 9.37 GiB (1.3%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/XXXX maj-min: 259:0 vendor: XXXX model: XXXX size: XXXX GiB
    block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: XXXX temp: 34.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: XXXX model: XXXX size: XXXX GiB
    block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: XXXX
    scheme: GPT
Partition:
  ID-1: / raw-size: 10 GiB GiB size: 9.75 GiB GiB (97.45%) used: 277.9 MiB (2.8%) fs: ext4 dev: /dev/sda1
    maj-min: 8:2
  ID-2: /usr raw-size: 20 GiB size: 19.52 GiB (97.59%) used: 6.67 GiB (34.2%) fs: ext4
    dev: /dev/sda2 maj-min: 8:4
  ID-3: /var raw-size: 5 GiB size: 4.84 GiB (96.79%) used: 2.34 GiB (48.4%) fs: ext4
    dev: /dev/sda3 maj-min: 8:5
  ID-4: /home raw-size: 100 GiB size: 97.87 GiB (97.87%) used: 732 MiB (0.7%) fs: ext4
    dev: /dev/sda4 maj-min: 8:8
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 20 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda5
    maj-min: 8:9
Sensors:
  System Temperatures: cpu: 39.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: pm: dpkg pkgs: 2447 libs: 1333 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb https://mxrepo.com/mx/repo/ bookworm main non-free
    2: deb https://mxrepo.com/mx/repo/ bookworm ahs
Info:
  Processes: 200 Uptime: 21m wakeups: 2 Memory: 15.4 GiB used: 2.8 GiB (18.1%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI
You do not have the required permissions to view the files attached to this post.
Last edited by LinuxSpring1 on Tue Feb 18, 2025 1:01 am, edited 1 time in total.

User avatar
CharlesV
Administrator
Posts: 8151
Joined: Sun Jul 07, 2019 5:11 pm

Re: Cannot receive files using Bluetooth, Bluetooth transfer failed

#2 Post by CharlesV »

This looks to me like the ~/.cache/obexd folder doesnt have sufficient rights to make the transfer happen. That looks like only the owner has read and write rights, and the group and everyone else has no rights.

Maybe try setting group and others to have Read and Write rights and test it then
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
Eadwine Rose
Administrator
Posts: 15341
Joined: Wed Jul 12, 2006 2:10 am

Re: Cannot receive files using Bluetooth, Bluetooth transfer failed

#3 Post by Eadwine Rose »

Can you quit with the editing of the QSI and other outputs please, it's getting old.
MX-23.6_x64 July 31 2023 * 6.1.0-40amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
LinuxSpring1
Posts: 274
Joined: Sun May 05, 2024 8:57 am

Re: Cannot receive files using Bluetooth, Bluetooth transfer failed

#4 Post by LinuxSpring1 »

Tried that, changed the directory $HOME/.cache/obexd permissions from drwx------ to drwx---rwx to drwxrwx--- to drwxrwxrwx and still the same issue. Should I restart the Bluetooth service, post changing the permissions and then try?

Also when I looked at System Settings > Bluetooth > Configure the value for Save files in is $HOME/Downloads. It is not $HOME/.cache/obexd. Then I looked inside the directory $HOME/.cache/obexd and I found that the files are getting created. Please see the contents of the directory $HOME/.cache/obexd listed below. So it looks that the file is getting created but while writing the contents of the file it is failing.

Code: Select all

$ ll $HOME/.cache/obexd
total 0
-rw------- 1 userA userA 0 Feb 18 07:09 IMG_20250217_1.jpg
-rw------- 1 userA userA 0 Feb 18 07:10 IMG_20250217_1.jpg0
-rw------- 1 userA userA 0 Feb 18 07:10 IMG_20250217_1.jpg1
-rw------- 1 userA userA 0 Feb 18 07:11 IMG_20250217_1.jpg2
-rw------- 1 userA userA 0 Feb 18 07:13 IMG_20250217_1.jpg3
-rw------- 1 userA userA 0 Feb 18 07:13 IMG_20250217_1.jpg4
-rw------- 1 userA userA 0 Feb 18 07:14 IMG_20250217_1.jpg5
$


I am assuming that obexd is the bluetooth service that is launched at the user level and handles the Bluetooth connections and devices. From where is it started? When I looked at MX Service Manager I could not get any details corresponding to the bluetooth service. Is the file that starts the obexd service the file /etc/init.d/bluetooth or some other file? Maybe I can enable some extra debugging level at the start of the service to see exactly what is happening?

User avatar
CharlesV
Administrator
Posts: 8151
Joined: Sun Jul 07, 2019 5:11 pm

Re: Cannot receive files using Bluetooth, Bluetooth transfer failed

#5 Post by CharlesV »

When I looked into this I found quite a few posts that mentioned the .cache/obexd folder is where the files are transferred to *first*, then they are moved out to where you actually sent them too... ( which agrees with your assumption. ), so possibly the 'final' location cannot be written too? or obexd does not have the ability to write to that location?
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
LinuxSpring1
Posts: 274
Joined: Sun May 05, 2024 8:57 am

Re: Cannot receive files using Bluetooth, Bluetooth transfer failed

#6 Post by LinuxSpring1 »

Yeah possibly that might be the case. Is there any way to debug obexd service? Like set some global environment variable which makes it output some logs ? When I checked the obexd service I can see that there is an option to run it with the debug option. Please see the code snippet given below.

So how do I start the service obexd with the -d option?

Code: Select all

$ ll /usr/libexec/bluetooth/obexd
-rwxr-xr-x 1 root root 617K Jun 13  2024 /usr/libexec/bluetooth/obexd
$ file /usr/libexec/bluetooth/obexd
/usr/libexec/bluetooth/obexd: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=41869bb8ee34bb25d4a42f21a8dbc39bbbf8ce80, for GNU/Linux 3.2.0, stripped
$ /usr/libexec/bluetooth/obexd --help
Usage:
  obexd [OPTION?]

Help Options:
  -h, --help                  Show help options

Application Options:
  -d, --debug=DEBUG           Enable debug information output
  -p, --plugin=NAME,...       Specify plugins to load
  -P, --noplugin=NAME,...     Specify plugins not to load
  -n, --nodetach              Run with logging in foreground
  -r, --root=PATH             Specify root folder location. Both absolute and relative can be used, but relative paths are assumed to be relative to user $HOME folder. Default $XDG_CACHE_HOME
  -S, --root-setup=SCRIPT     Root folder setup script
  -l, --symlinks              Allow symlinks leading outside of the root folder
  -c, --capability=FILE       Specify capability file, use '!' mark for scripts
  -a, --auto-accept           Automatically accept push requests


User avatar
LinuxSpring1
Posts: 274
Joined: Sun May 05, 2024 8:57 am

Re: Cannot receive files using Bluetooth, Bluetooth transfer failed

#7 Post by LinuxSpring1 »

Any help guys? How can I find the script file that starts the service obexd ?

Post Reply

Return to “Hardware /Configuration”