3

I am broadcasting a BLE advertisement using the following command in linux :

sudo hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 63 6F 3F 8F 64 91 4B EE 95 F7 D8 CC 64 A8 63 B5 00 00 00 00 C8

The BLE devce is visible, but don't allow any connection (since it follows the iBeacon specs, I think). So my question is, is there a way to create with BlueZ a BLE device that allows not just one, but several connections ? I read somewhere that A BLE device should be able to allow up to 20 connections, against 7 for a classic bluetooth.

Thank you very much

Karhunen
  • 175
  • 1
  • 6

1 Answers1

3

This depends on your hardware and the Bluetooth version that it supports. With Bluetooth v4.1, all restrictions have been removed and your device can be a peripheral connected to multiple centrals. This is mentioned at this link:-

Beginning with version 4.1 of the specification, any restrictions on role combinations have been removed, and the following are all possible:

A device can act as a central and a peripheral at the same time.

A central can be connected to multiple peripherals.

A peripheral can be connected to multiple centrals.

Previous versions of the specification limited the peripheral to a single central connection (although not conversely) and limited the role combinations.

You can find out the Bluetooth version of your device via hciconfig -a:-

hci0:   Type: Primary  Bus: USB
    BD Address: 00:11:22:33:44:55  ACL MTU: 310:10  SCO MTU: 64:8
    UP RUNNING 
    RX bytes:736 acl:0 sco:0 events:57 errors:0
    TX bytes:5366 acl:0 sco:0 commands:57 errors:0
    Features: 0xff 0xff 0xcf 0xfe 0xdb 0xff 0x5b 0x87
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
    Link policy: RSWITCH HOLD SNIFF PARK 
    Link mode: SLAVE ACCEPT 
    Name: 'uknown'
    Class: 0x1c0000
    Service Classes: Rendering, Capturing, Object Transfer
    Device Class: Miscellaneous, 
    **HCI Version: 4.0 (0x6)  Revision: 0x22bb**
    LMP Version: 4.0 (0x6)  Subversion: 0x22bb
    Manufacturer: Cambridge Silicon Radio (10)

I would recommend using the bluetoothctl utility on Linux to advertise, instead of doing it through hcitool given that hcitool is deprecated and is also not very user friendly. More information on using bluetoothctl to advertise and accept incoming connections can be found here:-

Youssif Saeed
  • 11,789
  • 4
  • 44
  • 72