Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

how to communicate with BLE adapters in l2cap with bluez

Dec 29, 2012 12:25PM PST

Hi

I have two CSR4.0 usb dongle and want to send l2cap packets from one to the other in the type of LE(low energy). What I can do now is using "hcitool leadv" to advertise the LE advertisement and using "hcitool lecc" to connect it. I can't find any APIs of l2cap to establish a connection between thses dongles. Is there any way to solve this problem?

Thank you.

Discussion is locked

- Collapse -
Clarification Request
I think you need to add more detail.
Dec 29, 2012 3:01PM PST

I looked at BLE on google and it was inconclusive. I'm only an author of an app that uses bluetooth so while I know a little your question does not lend itself to being researched.
Bob

- Collapse -
detail
Dec 29, 2012 3:55PM PST

I have two CSR4.0 dongle :

~$ hciconfig
hci2: Type: BR/EDR Bus: USB
BD Address: 00:1A:7D:DA:71:09 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:1570 acl:3 scoShocked events:80 errorsShocked
TX bytes:1092 acl:3 scoShocked commands:52 errorsShocked

hci1: Type: BR/EDR Bus: USB
BD Address: 00:1A:7D:DA:71:07 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:1399 acl:3 scoShocked events:63 errorsShocked
TX bytes:1014 acl:3 scoShocked commands:42 errorsShocked

then I use "hciconfig hci1 leadv " and hci1 start to broadcast.
Now I can use "hcitool -hci2 lecc" to build a connection to hci1 and get a connction handle , but I can't establish a connection with "l2test -n -i hci2 00:1A:7D:DA:71:07" and get a connection reject response.
In the other hands. I can build a connection using BR/EDR mode with the tool "l2test"

- Collapse -
Sorry.
Dec 30, 2012 7:32AM PST

But you are not telling me enough. I would be guessing you are trying to build a PAN or a SPP link but since it's nothing I can decode yet, I think you take them back to their makers and work with them on a solution.
Bob