You are not logged in.

#1 2019-05-03 13:08:32

Maksym
Member
Registered: 2019-05-03
Posts: 3

Bluetooth - Obex - setsockopt(L2CAP_OPTIONS): Invalid argument (22)

Hello.

Bluetooth obex service not working. What can be wrong with l2cap layer? Thanks in advance

Notebook ThinkPad Lenovo X121e.

bluez 5.50-6

$ uname -a
Linux lenovoX121e 5.0.10-arch1-1-ARCH #1 SMP PREEMPT Sat Apr 27 20:06:45 UTC 2019 x86_64 GNU/Linux
$ bluetoothctl 
[NEW] Controller 7C:E9:D3:E2:B2:02 lenovoX121e [default]
[NEW] Device 04:B1:67:71:92:AF Maksym@XiaomiRedmiNote4x
[NEW] Device 20:13:12:04:00:CC Bluetooth Mouse
[bluetooth]# show
Controller 7C:E9:D3:E2:B2:02
	Name: lenovoX121e
	Alias: lenovoX121e
	Class: 0x1c010c
	Powered: yes
	Discoverable: no
	Pairable: yes
	UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
	UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
	UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	UUID: IrMC Sync                 (00001104-0000-1000-8000-00805f9b34fb)
	UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
	UUID: Vendor specific           (00005005-0000-1000-8000-0002ee000001)
	Modalias: usb:v1D6Bp0246d0532
	Discovering: no
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# show
Controller 7C:E9:D3:E2:B2:02
	Name: lenovoX121e
	Alias: lenovoX121e
	Class: 0x1c010c
	Powered: yes
	Discoverable: no
	Pairable: yes
	UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
	UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
	UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	UUID: IrMC Sync                 (00001104-0000-1000-8000-00805f9b34fb)
	UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
	UUID: Vendor specific           (00005005-0000-1000-8000-0002ee000001)
	Modalias: usb:v1D6Bp0246d0532
	Discovering: no
[bluetooth]# 
$ LANG= journalctl --unit bluetooth
-- Logs begin at Sun 2018-10-14 19:22:10 EEST, end at Fri 2019-05-03 15:54:00 EEST. --
May 03 15:02:39 lenovoX121e systemd[1]: Starting Bluetooth service...
May 03 15:02:39 lenovoX121e bluetoothd[437]: Bluetooth daemon 5.50
May 03 15:02:39 lenovoX121e systemd[1]: Started Bluetooth service.
May 03 15:02:39 lenovoX121e bluetoothd[437]: Starting SDP server
May 03 15:02:39 lenovoX121e bluetoothd[437]: Bluetooth management interface 1.14 initialized
May 03 15:02:39 lenovoX121e bluetoothd[437]: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
May 03 15:02:39 lenovoX121e bluetoothd[437]: avrcp-controller: Protocol not supported (93)
May 03 15:02:39 lenovoX121e bluetoothd[437]: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
May 03 15:02:39 lenovoX121e bluetoothd[437]: audio-avrcp-target: Protocol not supported (93)
May 03 15:02:46 lenovoX121e bluetoothd[437]: L2CAP server failed for Message Notification: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
May 03 15:02:46 lenovoX121e bluetoothd[437]: L2CAP server failed for Message Access: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
May 03 15:02:46 lenovoX121e bluetoothd[437]: L2CAP server failed for Phone Book Access: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
May 03 15:02:46 lenovoX121e bluetoothd[437]: L2CAP server failed for File Transfer: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
May 03 15:02:46 lenovoX121e bluetoothd[437]: L2CAP server failed for Object Push: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
May 03 15:02:49 lenovoX121e bluetoothd[437]: Endpoint registered: sender=:1.68 path=/MediaEndpoint/A2DPSource
May 03 15:02:49 lenovoX121e bluetoothd[437]: Endpoint registered: sender=:1.68 path=/MediaEndpoint/A2DPSink
$ dmesg | grep -i blue
[    3.032540] usb 3-4: Product: Broadcom Bluetooth Device
[    7.144539] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked
[   10.574819] Bluetooth: Core ver 2.22
[   10.576310] Bluetooth: HCI device and connection manager initialized
[   10.576386] Bluetooth: HCI socket layer initialized
[   10.576404] Bluetooth: L2CAP socket layer initialized
[   10.576422] Bluetooth: SCO socket layer initialized
[   11.215833] audit: type=1130 audit(1556884959.894:26): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=bluetooth comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   11.280731] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   11.280736] Bluetooth: BNEP filters: protocol multicast
[   11.280749] Bluetooth: BNEP socket layer initialized
[   17.813986] Bluetooth: RFCOMM TTY layer initialized
[   17.814015] Bluetooth: RFCOMM socket layer initialized
[   17.814038] Bluetooth: RFCOMM ver 1.11

Last edited by Maksym (2019-05-07 20:01:03)

Offline

#2 2019-05-06 15:11:51

Mortimer Houghton
Member
Registered: 2014-09-28
Posts: 85

Re: Bluetooth - Obex - setsockopt(L2CAP_OPTIONS): Invalid argument (22)

Offline

#3 2019-05-07 11:38:53

Maksym
Member
Registered: 2019-05-03
Posts: 3

Re: Bluetooth - Obex - setsockopt(L2CAP_OPTIONS): Invalid argument (22)

No, it doesn't help. Still the same problem.

I have applied 'systemctl --global enable obex'

$ LANG= systemctl status --user obex
* obex.service - Bluetooth OBEX service
   Loaded: loaded (/usr/lib/systemd/user/obex.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-05-07 14:32:38 EEST; 2min 42s ago
 Main PID: 771 (obexd)
   CGroup: /user.slice/user-1000.slice/user@1000.service/obex.service
           `-771 /usr/lib/bluetooth/obexd

May 07 14:32:38 lenovoX121e systemd[529]: Starting Bluetooth OBEX service...
May 07 14:32:38 lenovoX121e obexd[771]: OBEX daemon 5.50
May 07 14:32:38 lenovoX121e systemd[529]: Started Bluetooth OBEX service.
$ LANG= systemctl status bluetooth
* bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disa
bled)
   Active: active (running) since Tue 2019-05-07 14:37:48 EEST; 1min 32s left
     Docs: man:bluetoothd(8)
 Main PID: 459 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4915)
   Memory: 2.2M
   CGroup: /system.slice/bluetooth.service
           `-459 /usr/lib/bluetooth/bluetoothd

May 07 14:37:48 lenovoX121e bluetoothd[459]: avrcp-controller: Protocol not supported (93)
May 07 14:37:48 lenovoX121e bluetoothd[459]: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
May 07 14:37:48 lenovoX121e bluetoothd[459]: audio-avrcp-target: Protocol not supported (93)
May 07 14:37:57 lenovoX121e bluetoothd[459]: Endpoint registered: sender=:1.69 path=/MediaEndpoint/A2DPSource
May 07 14:37:57 lenovoX121e bluetoothd[459]: Endpoint registered: sender=:1.69 path=/MediaEndpoint/A2DPSink
May 07 14:32:38 lenovoX121e bluetoothd[459]: L2CAP server failed for Message Notification: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
May 07 14:32:38 lenovoX121e bluetoothd[459]: L2CAP server failed for Message Access: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
May 07 14:32:38 lenovoX121e bluetoothd[459]: L2CAP server failed for Phone Book Access: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
May 07 14:32:38 lenovoX121e bluetoothd[459]: L2CAP server failed for File Transfer: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
May 07 14:32:38 lenovoX121e bluetoothd[459]: L2CAP server failed for Object Push: setsockopt(L2CAP_OPTIONS): Invalid argument (22)

Last edited by Maksym (2019-05-07 20:02:07)

Offline

#4 2019-05-07 14:04:17

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Bluetooth - Obex - setsockopt(L2CAP_OPTIONS): Invalid argument (22)

Offline

#5 2019-05-18 12:21:50

Maksym
Member
Registered: 2019-05-03
Posts: 3

Re: Bluetooth - Obex - setsockopt(L2CAP_OPTIONS): Invalid argument (22)

Any suggestions? Is it enough information I shared? What direction should I dig?

Thanks

Offline

#6 2021-01-02 10:38:26

Mikaka27
Member
Registered: 2021-01-02
Posts: 1

Re: Bluetooth - Obex - setsockopt(L2CAP_OPTIONS): Invalid argument (22)

Hi, do you know how to build a package to test if this patch fixes the issue?

https://www.spinics.net/lists/linux-blu … 85480.html

Offline

#7 2021-01-02 11:50:00

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: Bluetooth - Obex - setsockopt(L2CAP_OPTIONS): Invalid argument (22)

Step by step to apply the patch suggested by Mikaka27,  see also Patching_packages

git clone git://git.archlinux.org/svntogit/packages.git --single-branch --branch "packages/bluez"
cd packages/trunk
curl http://ix.io/2KB5 | git apply -v
git diff # check the changes applied from the diff seem reasonable
makepkg -rsi

Offline

Board footer

Powered by FluxBB