Questions tagged [l2cap]

Bluetooth Logical link control and adaptation protocol resides in the data link layer.

L2CAP is used within the Bluetooth protocol stack. It passes packets to either the Host Controller Interface (HCI) or on a hostless system, directly to the Link Manager/ACL link. L2CAP provides connection-oriented and connectionless data services to upper layer protocols with protocol multiplexing capability, segmentation and reassembly operation, and group abstractions. L2CAP permits higher level protocols and applications to transmit and receive L2CAP data packets up to 64 kilobytes in length.

L2CAP's functions include:

  • Multiplexing data between different higher layer protocols.
  • Segmentation and reassembly of packets.
  • Providing one-way transmission management of multicast data to a group of other Bluetooth devices.
  • Quality of service (QoS) management for higher layer protocols.
89 questions
1
vote
1 answer

Why is android.bluetooth.BluetoothAdapter#listenUsingL2capOn(int) not accessible?

This might be a newbie question since my experience with Android is limited but for some reason I'm unable to access the method android.bluetooth.BluetoothAdapter#listenUsingL2capOn(int). It seems to be public and hence not really sure why the…
1
vote
2 answers

Is it possible to connect to macOS from iOS via bluetooth using CBPeripheral

I am trying to connect iOS and macOS with bluetooth.They are already connected via bluetooth but when I try to retrieve them programmatically in swift using CBCentralManager, didDiscover peripheral it doesn't list it.i am trying to open a…
md12
  • 111
  • 1
  • 8
1
vote
1 answer

Is it possible to connect iOS (11.4) and Android (10+) via L2CAP

Is it possible to connect iOS (11.4) and Android (10+) via L2CAP ? I know that via BLE it works, question is for the L2cap cross capability ios/android - anyone ?
1
vote
0 answers

Using CoreBluetooth CBL2CAPChannel

I am trying to set up some data transfer functionality, using CoreBluetooth CBL2CAPChannel, in a Swift iOS app. My question is about the StreamDelegate function: func stream(:handle:) How am I supposed to fire it? Or when does it get fired? The…
Michel
  • 10,303
  • 17
  • 82
  • 179
1
vote
1 answer

Using L2CAP Channel with CoreBluetooth

I need to use L2CAP Channel with CoreBluetooth. Therefore I will have to implement the StreamDelegate protocol and make a first test of sending one message from a sending app to a listening app. Is there any good tutorial that I could follow for…
Michel
  • 10,303
  • 17
  • 82
  • 179
1
vote
0 answers

CoreBluetooth / L2CAP channels, not working

I have recently been experimenting quite a bit with CoreBluetooth, and now I want to use L2CAP channels. For that I have set up two iOS apps, one is the peripheral and the other one is the central. At this point, when I run them, here is what I see…
Michel
  • 10,303
  • 17
  • 82
  • 179
1
vote
0 answers

Android connect bluetooth L2CAP device(PS4 Controller), how to do through root?

I try to connect my phone to a L2CAP device (PS4 Controller), that uses L2CAP as bluetooth connection protocol. Documentation of DualShock 4 controller: http://www.psdevwiki.com/ps4/DS4-BT Android officially does not support L2CAP anymore. Since…
DutchKevv
  • 1,659
  • 2
  • 22
  • 39
1
vote
0 answers

How to relate connection less link with conection oriented l2cap channel?

I am studying l2cap specification. Here I found that channel type connection oriented and connection less uses ACL link which is connection less to transfer packet. Please help me to understand how connection oriented channel with connection less…
John3245
  • 177
  • 2
  • 13
1
vote
0 answers

How tell by android programming when java/Android Bluetooth is doing l2ping response?

How can I programmaticaly perceive, in java on android, when my handset makes a response to a bluetooth l2ping? For example in a hypothetical moment, from linux I make the command: l2ping 11:22:33:44:55.. then my handset responds to this. I need,…
1
vote
1 answer

Problem with bluetooth service in J2ME don't discoverable

I try to create a service with: LocalDevice localDevice = LocalDevice.getLocalDevice(); localDevice.setDiscoverable(DiscoveryAgent.GIAC); String url =…
Fran
  • 120
  • 6
1
vote
1 answer

Excessive Bluetooth LE timeouts on Linux?

I have written an application that uses Bluetooth LE L2CAP connections in nonblocking mode on Linux to read/write ATT packets (using socket(PF_BLUETOOTH, SOCK_SEQPACKET|SOCK_CLOEXEC, BTPROTO_L2CAP)). Normally, when the device turns off or goes out…
yonran
  • 18,156
  • 8
  • 72
  • 97
1
vote
2 answers

Using Bluez's l2test to communicate with LE device

I am trying to get BLE dongle (Master) to connect with an embedded BLE device (slave), after which they can use L2CAP packets to communicate. Using Bluez 5.18 I can see the slave advertising with hcitool lescan and can connect with it with hcitool…
EarthLord
  • 111
  • 1
  • 4
1
vote
1 answer

Android BT Stack in Kit Kat

I was wondering if anyone else was experiencing L2CAP connectivity issues with other devices. I have a device that worked fine under Android 4.1 but now that I'm on Kit Kat it is no longer working. I could listen on a BT socket with a particular…
Lloyd
  • 31
  • 2
  • 4
0
votes
1 answer

What parameters should I use for L2CAP connection request in BLE data transfer between a Bluetooth 5.0 and 4.1 device?

I am writing an application in C using SiliconLabs Simplicity IDE for an EFR32MG21 board that implements Bluetooth 5.0. My application sends data between devices using L2CAP connections over channels. One of the devices uses a CSR8675 Bluetooth…
reedm60
  • 1
  • 1
0
votes
0 answers

L2CAP communication in background mode

I tried to implement a simple demo application which handles communication with BLE devices while the application is put in background mode by the user. However, the communication seems to be suspended a couple seconds after the application is put…
faku
  • 411
  • 4
  • 19