LP-EM-CC2340R5: CC2340R5 development problem via BlueZ

Part Number: LP-EM-CC2340R5
Other Parts Discussed in Thread: CC2340R5, CC2564

Tool/software:

Hi Expert,

I'm using LP-EM-CC2340R5 connecting to my ubuntu desktop. And got few problems when using ble_controller example firmware:

#1 Fail to initial CC2340R5 via script when usning command "advertise on". It's strange that command is workabel vi bluetoothctl but failure when using script via pipe. for failing script like that:
        #!/bin/bash
       DEVICE="${1:-/dev/ttyACM0}"
       echo "Using device: $DEVICE"
       sudo hciattach "$DEVICE" any 115200 &
       sleep 2

       echo -e "discoverable on\n" | bluetoothctl
       sleep 1

       echo -e "discoverable-timeout 0\n" | bluetoothctl
       sleep 1

       echo -e "system-alias EnGenius0V4111\n" | bluetoothctl
       echo -e 'menu advertise\nname EnGenius0V4111\ntx-power on' | bluetoothctl
       sleep 1

       echo -e "pairable on\n" | bluetoothctl
       sleep 1

       #No error log promot and cannot be scanned via nRFconnect APP, but the command works via bluetoothctl cli interface
       echo -e "advertise on\n" | bluetoothctl 
       sleep 3

#2 Fail to update advertising data via hcitool like following:
     - sudo hcitool -i hci0 cmd 0x8 0x8 1e 02 01 06 0f 09 45 6e 47 65 6e 69 75 73 30 56 34 31 31 32 03 ff 00 01 00 00 00 00 00 00 00 00 00 00 00 00

     I'm adding manufacturer specific data in the final payload.

#3 Some hci command seems not to be allowed in certain condition.

$ sudo btmon
Bluetooth monitor ver 5.64
= Note: Linux version 6.8.0-59-generic (x86_64)                                                                                                                                                           0.725065
= Note: Bluetooth subsystem version 2.22                                                                                                                                                                  0.725067
= New Index: 40:F3:B0:44:EF:E3 (Primary,UART,hci0)                                                                                                                                                 [hci0] 0.725068
= Open Index: 40:F3:B0:44:EF:E3                                                                                                                                                                    [hci0] 0.725069
= Index Info: 40:F3:B0:44:EF:E3 (Texas Instruments Inc.)                                                                                                                                           [hci0] 0.725069
@ MGMT Open: bluetoothd (privileged) version 1.22                                                                                                                                                {0x0001} 0.725070
@ RAW Open: btgatt-server (privileged) version 2.22                                                                                                                                              {0x0002} 4.177405
@ RAW Close: btgatt-server                                                                                                                                                                       {0x0002} 4.177415
@ RAW Open: btgatt-server (privileged) version 2.22                                                                                                                                              {0x0002} 4.177427
@ RAW Close: btgatt-server                                                                                                                                                                       {0x0002} 4.177429
@ RAW Open: hciconfig (privileged) version 2.22                                                                                                                                                  {0x0002} 4.182425
@ RAW Open: hciconfig (privileged) version 2.22                                                                                                                                           {0x0003} [hci0] 4.182454
< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1                                                                                                                                     #1 [hci0] 4.182479
        Advertising: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                     #2 [hci0] 4.185458
      LE Set Advertise Enable (0x08|0x000a) ncmd 1
        Status: Command Disallowed (0x0c)

@ RAW Close: hciconfig                                                                                                                                                                    {0x0003} [hci0] 4.185500
@ RAW Close: hciconfig                                                                                                                                                                           {0x0002} 4.185696
@ RAW Open: hciconfig (privileged) version 2.22                                                                                                                                                  {0x0002} 4.188276
@ RAW Open: hciconfig (privileged) version 2.22                                                                                                                                           {0x0003} [hci0] 4.188295
< HCI Command: LE Set Advertising Parameters (0x08|0x0006) plen 15                                                                                                                              #3 [hci0] 4.188311
        Min advertising interval: 1280.000 msec (0x0800)
        Max advertising interval: 1280.000 msec (0x0800)
        Type: Connectable undirected - ADV_IND (0x00)
        Own address type: Public (0x00)
        Direct address type: Public (0x00)
        Direct address: 00:00:00:00:00:00 (OUI 00-00-00)
        Channel map: 37, 38, 39 (0x07)
        Filter policy: Allow Scan Request from Any, Allow Connect Request from Any (0x00)

> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                     #4 [hci0] 4.192585
      LE Set Advertising Parameters (0x08|0x0006) ncmd 1
        Status: Command Disallowed (0x0c)
< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1                                                                                                                                     #5 [hci0] 4.192683
        Advertising: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                     #6 [hci0] 4.195702
      LE Set Advertise Enable (0x08|0x000a) ncmd 1
        Status: Command Disallowed (0x0c)

Thanks for reading and any suggestion will be appreciated.

BR,
George Lin

  • Hello George,

    Thank you for reaching out! This is certainly strange behavior. Are you able to run any commands successfully? Also, which version of BlueZ are you currently using?

    Best Regards,

    Tarek D

  • Hi Tarek,

    I'm currently using Ubuntu 22.04 with BlueZ v5.64.

    I wouldn't say all HCI commands are failing—some of them work fine. For example, commands like `discoverable on` issued through `bluetoothctl` work without any problem.

    What’s been frustrating is that the script I previously used for the CC2564 no longer works with the LP-EM-CC2340R5.

    Thanks,
    Best regards,
    George Lin

  • Hello George,

    There have been significant changes to the TI BLE controller and the BLE specification as a whole since the release of the CC2564, so it's expected that some commands may not be fully portable. As for the issues included in your initial message:

    #1 Fail to initial CC2340R5 via script when usning command "advertise on". It's strange that command is workabel vi bluetoothctl but failure when using script via pipe.

    Piped input may not always behave identically to interactive sessions. I would recommend using "expect" commands and monitor those outputs. That may give us a glimpse into what's going on. Also worth mentioning that hciattach and initialization

    #2 Fail to update advertising data via hcitool like following:
         - sudo hcitool -i hci0 cmd 0x8 0x8 1e 02 01 06 0f 09 45 6e 47 65 6e 69 75 73 30 56 34 31 31 32 03 ff 00 01 00 00 00 00 00 00 00 00 00 00 00 00

    As per the BLE spec, in order to update advertising data, you will need to:

    1. Disable advertising
    2. Set advertising data
    3. Enable advertising again
    Some hci command seems not to be allowed in certain condition.

    It seems like you're asking the controller to perform something that isn't allowed at that moment. I would double check the sequence in which you're calling your HCI functions.

    I hope this helps!

    Best Regards,

    Tarek D

  • Hi Tarek,

    I would check #1 and #2 by your suggestion later. And Would you please take care of following command is not work?

    $btmgmt info
    Index list with 1 item
    hci0: Primary controller
    addr 40:F3:B0:44:EF:C2 version 13 manufacturer 13 class 0x000000
    supported settings: powered connectable discoverable bondable le advertising secure-conn debug-keys privacy static-addr phy-configuration
    current settings: powered connectable discoverable bondable le advertising secure-conn
    name EnGenius0V4111
    short name

    $hciconfig hci0 noleadv
    Can't set advertise mode on hci0: Operation not permitted (1)

    --- btmon output:
    @ RAW Open: hciconfig (privileged) version 2.22 {0x0003} [hci0] 56.687761
    < HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1 #1 [hci0] 56.687885
    Advertising: Disabled (0x00)
    > HCI Event: Command Complete (0x0e) plen 4 #2 [hci0] 56.691066
    LE Set Advertise Enable (0x08|0x000a) ncmd 1
    Status: Command Disallowed (0x0c)

    Thanks.

  • Hi Tarek,

    I follow your instruction and still cannot get the manufacture data by nRFconnect. I dont think this is the APP problem because other bluetooth device showing Microsoft in their manufacture data paylod.

    $ btmgmt advertising off
    hci0 Set Advertising complete, settings: powered connectable discoverable le secure-conn
    $ hcitool -i hci0 cmd 0x8 0x8 1e 02 01 06 0f 09 45 6e 47 65 6e 69 75 73 30 56 34 31 31 32 03 ff 00 01 00 00 00 00 00 00 00 00 00 00 00 00
    < HCI Command: ogf 0x08, ocf 0x0008, plen 36
    1E 02 01 06 0F 09 45 6E 47 65 6E 69 75 73 30 56 34 31 31 32
    03 FF 00 01 00 00 00 00 00 00 00 00 00 00 00 00
    > HCI Event: 0x0e plen 4
    01 08 20 0C
    $ btmgmt advertising on
    hci0 Set Advertising complete, settings: powered connectable discoverable le advertising secure-conn

    Thanks.

    BR,
    George Lin

  • Hey George,

    Could you try using this command instead of the hcitool one?

    btmgmt add-adv -m <hex manufacturer data>

    Please let me know if this solves your issue!

    Best Regards,

    Tarek D

  • Hi Tarek,

    First of all, the -m option is not intended for setting advertising data.

    Usage: add-adv [options] <instance_id>
    Options:
    -u, --uuid <uuid> Service UUID
    -d, --adv-data <data> Advertising Data bytes
    -s, --scan-rsp <data> Scan Response Data bytes
    -t, --timeout <timeout> Timeout in seconds
    -D, --duration <duration> Duration in seconds
    -P, --phy <phy> Phy type, Specify 1M/2M/CODED
    -c, --connectable "connectable" flag
    -g, --general-discov "general-discoverable" flag
    -l, --limited-discov "limited-discoverable" flag
    -n, --scan-rsp-local-name "local-name" flag
    -a, --scan-rsp-appearance "appearance" flag
    -m, --managed-flags "managed-flags" flag
    -p, --tx-power "tx-power" flag
    e.g.:
    add-adv -u 180d -u 180f -d 080954657374204C45 1


    And I've try add-adv before and it doesn't work for me. And as your request, I post the failure log here for your reference:

    $sudo btmgmt add-adv -d 020106 1
    Instance added: 1

    @ MGMT Open: btmgmt (privileged) version 1.22 {0x0002} 240514.599273
    @ MGMT Command: Add Advertising (0x003e) plen 14 {0x0002} [hci0] 240514.599324
    Instance: 1
    Flags: 0x00000000
    Duration: 0
    Timeout: 0
    Advertising data length: 3
    Flags: 0x06
    LE General Discoverable Mode
    BR/EDR Not Supported
    Scan response length: 0
    @ MGMT Event: Command Complete (0x0001) plen 4 {0x0002} [hci0] 240514.599329
    Add Advertising (0x003e) plen 1
    Status: Success (0x00)
    Instance: 1
    @ MGMT Close: btmgmt

    $sudo btmgmt add-adv -d 0f09456e47656e697573305634313132 1
    Instance added: 1

    @ MGMT Open: btmgmt (privileged) version 1.22 {0x0002} 240532.177983
    @ MGMT Command: Add Advertising (0x003e) plen 27 {0x0002} [hci0] 240532.178055
    Instance: 1
    Flags: 0x00000000
    Duration: 0
    Timeout: 0
    Advertising data length: 16
    Name (complete): EnGenius0V4112 //bug here, the name has been truncated to EnGenius0V
    Scan response length: 0
    @ MGMT Event: Command Complete (0x0001) plen 4 {0x0002} [hci0] 240532.178061
    Add Advertising (0x003e) plen 1
    Status: Success (0x00)
    Instance: 1
    @ MGMT Close: btmgmt

    $sudo btmgmt add-adv -d 0fff000100000000000000000000 1
    Add Advertising failed with status 0x0d (Invalid Parameters)

    @ MGMT Open: btmgmt (privileged) version 1.22 {0x0002} 240825.563972
    @ MGMT Command: Add Advertising (0x003e) plen 25 {0x0002} [hci0] 240825.564041
    Instance: 1
    Flags: 0x00000000
    Duration: 0
    Timeout: 0
    Advertising data length: 14
    0f ff 00 01 00 00 00 00 00 00 00 00 00 00 ..............
    Scan response length: 0
    @ MGMT Event: Command Status (0x0002) plen 3 {0x0002} [hci0] 240825.564047
    Add Advertising (0x003e)
    Status: Invalid Parameters (0x0d) //Cannot set manufcature data
    @ MGMT Close: btmgmt

    I also attempted to concatenate all three payload sections into a single advertisement, but the manufacturer-specific data was causing the setting command fail. Even when merging only the first two sections, the advertisement still appears to be truncated.



    Thanks.

    BR,
    George Lin

  • Hello George,

    I was able to see this on my end as well. I'm looking into the right way to perform this. Should have an update by tomorrow.

    Best Regards,

    Tarek D

  • Hello George,

    Thank you for your patience! I went through the process on my end and I was able to get the device to include manufacturer specific data inside the advertisement reports (see packet sniffer screenshot below). My setup also used Ubuntu and BlueZ 5.64.

    To do this, I opened btmgmt using "sudo btmgmt -t hci1" and ran the following:

    power on
    le on
    connectable on
    sc off
    advertising off
    add-adv -u 180d -d 050d000a0102 1
    name tarek
    advertising on

    This will create a service UUID (heart rate), set manufacturer specific data, with TI's company ID (0x000d) and send the data 0x01 0x02, and set the name of the device to "tarek".

    It's worth mentioning that there may be an issue on the bluez side, as I too was unable to set a name longer than 10 bytes, even though the BLE spec supports names up to 31 bytes.

    Please let me know if this works for you!

    Best Regards,

    Tarek D

  • Hi Tarek,

    I would test manufacturer specific data and reply th result later. And what I am confused is that the name comes different result from btmgmt and bluetoothctl.

    Here is the screenshot when I'm controlled from bluetoothctl and it seems not limit by 10 bytes. But using bluetootctl I would encounter an issue that advertising off cannot be control via bluetoothctl. And at the meantime, I want to use the btmgmt to control the advertising off then the name got be truncated.

    As you could see below log and screenshot , FrankDevice is more than 10 bytes.

    $sudo hciattach /dev/ttyACM36 any 115200
    Device setup complete

    $hciconfig
    hci0: Type: Primary Bus: UART
    BD Address: 40:F3:B0:44:EF:C2 ACL MTU: 255:5 SCO MTU: 0:0
    UP RUNNING
    RX bytes:312 acl:0 sco:0 events:27 errors:0
    TX bytes:203 acl:0 sco:0 commands:27 errors:0

    $bluetoothctl
    Agent registered

    [bluetooth]# menu advertise
    Menu advertise:
    Available commands:
    -------------------
    uuids [uuid1 uuid2 ...] Set/Get advertise uuids
    service [uuid] [data=xx xx ...] Set/Get advertise service data
    manufacturer [id] [data=xx xx ...] Set/Get advertise manufacturer data
    data [type] [data=xx xx ...] Set/Get advertise data
    discoverable [on/off] Set/Get advertise discoverable
    discoverable-timeout [seconds] Set/Get advertise discoverable timeout
    tx-power [on/off] Show/Enable/Disable TX power to be advertised
    name [on/off/name] Configure local name to be advertised
    appearance [on/off/value] Configure custom appearance to be advertised
    duration [seconds] Set/Get advertise duration
    timeout [seconds] Set/Get advertise timeout
    secondary [1M/2M/Coded] Set/Get advertise secondary channel
    interval [min] [max] Set/Get advertise interval range
    clear [uuids/service/manufacturer/config-name...] Clear advertise config
    back Return to main menu
    version Display version
    quit Quit program
    exit Quit program
    help Display help about this program
    export Print environment variables
    [bluetooth]# name FrankDevice
    [bluetooth]# back
    Menu main:
    Available commands:
    -------------------
    advertise Advertise Options Submenu
    monitor Advertisement Monitor Options Submenu
    scan Scan Options Submenu
    gatt Generic Attribute Submenu
    admin Admin Policy Submenu
    list List available controllers
    show [ctrl] Controller information
    select <ctrl> Select default controller
    devices List available devices
    paired-devices List paired devices
    system-alias <name> Set controller alias
    reset-alias Reset controller alias
    power <on/off> Set controller power
    pairable <on/off> Set controller pairable mode
    discoverable <on/off> Set controller discoverable mode
    discoverable-timeout [value] Set discoverable timeout
    agent <on/off/capability> Enable/disable agent with given capability
    default-agent Set agent as the default one
    advertise <on/off/type> Enable/disable advertising with given type
    set-alias <alias> Set device alias
    scan <on/off/bredr/le> Scan for devices
    info [dev] Device information
    pair [dev] Pair with device
    cancel-pairing [dev] Cancel pairing with device
    trust [dev] Trust device
    untrust [dev] Untrust device
    block [dev] Block device
    unblock [dev] Unblock device
    remove <dev> Remove device
    connect <dev> Connect device
    disconnect [dev] Disconnect device
    menu <name> Select submenu
    version Display version
    quit Quit program
    exit Quit program
    help Display help about this program
    export Print environment variables

    [bluetooth]# advertise on
    [CHG] Controller 40:F3:B0:44:EF:C2 SupportedInstances: 0x13 (19)
    [CHG] Controller 40:F3:B0:44:EF:C2 ActiveInstances: 0x01 (1)
    Advertising object registered
    Tx Power: off
    LocalName: FrankDevice
    Appearance: off
    Discoverable: on
    [bluetooth]#



    Thanks.

    BR,
    George Lin

  • Hey George,

    I looked further into the name size limit issue. I believe this was a BlueZ design choice, limiting the name to 10 characters to leave space for other data inside the advertisement reports. However, one way to bypass this will be to manually adding the name throught a btmgmt command as seen below:

    advertising off
    add-adv -d 11094d79424c456465766963656565656565 1
    add-adv -n 1
    advertising on

    Here, the add-adv commands represent the following: 

    • For add-adv -d 11094d79424c456465766963656565656565 1
      • 11 represents the number of bytes being sent (0x11)
      • 09 is the flag for complete local name (0x09)
      • 94d79424c456465766963656565656565 is "MyBleDeviceeeeee" which is 16 bytes
      • 1 represents the advertising set
    • For add-adv -n
      • Adds the local name to the scan response (this step may not be necessary)

    By running this command, I was able to see the full name on a packet sniffer log(screenshot below). I would also like to point out that this is a limitation on the BlueZ side and not an issue with the TI device or firmware.

    I hope this answers all your questions!

    Best Regards,

    Tarek D

  • Hi Tarek,

    Thanks for the reply.

    I've test your latest procedure and it's seems not work for me. Not sure what's the differernce between mine and yours. In my desktop, the localname EnGeniuse0V4112 will overwirte MyBleDeviceeeeee" for displaying as "EnGenius0V" when doing advertising on. Below is the command history for reference:

    $sudo hciattach /dev/ttyACM41 any 115200
    [sudo] password for george:
    Device setup complete

    $sudo btmgmt
    [mgmt]# add-adv -d 11094d79424c456465766963656565656565 1
    Instance added: 1
    [mgmt]# add-adv -n 1
    Instance added: 1
    [mgmt]# advertising on
    hci0 Set Advertising complete, settings: powered connectable discoverable bondable le advertising secure-conn
    [mgmt]# quit

    $hciconfig
    hci0: Type: Primary Bus: UART
    BD Address: 40:F3:B0:44:EF:C2 ACL MTU: 255:5 SCO MTU: 0:0
    UP RUNNING
    RX bytes:392 acl:0 sco:0 events:38 errors:0
    TX bytes:413 acl:0 sco:0 commands:38 errors:0

    $sudo btmgmt
    [mgmt]# info
    Index list with 1 item
    hci0: Primary controller
    addr 40:F3:B0:44:EF:C2 version 13 manufacturer 13 class 0x000000
    supported settings: powered connectable discoverable bondable le advertising secure-conn debug-keys privacy static-addr phy-configuration
    current settings: powered connectable discoverable bondable le advertising secure-conn
    name EnGenius0V4112
    short name
    [mgmt]#

    As you could see in my previous post, I've tried the similar method but does not work well for me.



    BR,
    George Lin

  • Hello George,

    When I tested this on my end, my observation was that the name will remain the same (EnGenius0V4112), however, the actual name will change when checking with a packet sniffer. I also noticed BlueZ sometimes did not send the command right away, so I had to send the same command multiple times for it to actually send the HCI command to the CC device.

    I would also attempt to use a different advertising set and see if that causes a change. So the command would become:

    add-adv -d 11094d79424c456465766963656565656565 2

    Please let me know if this works for you!

    Best Regards,

    Tarek D

  • Hi Tarek,

    FYR. The situation is the same.

    $sudo hciattach /dev/ttyACM42 any 115200

    $sudo btmgmt
    [mgmt]# advertising off
    hci0 Set Advertising complete, settings: powered connectable discoverable bondable le secure-conn
    [mgmt]# add-adv -d 11094d79424c456465766963656565656565 2
    Instance added: 2
    [mgmt]# advertising on
    hci0 Set Advertising complete, settings: powered connectable discoverable bondable le advertising secure-conn
    [mgmt]# advinfo
    Supported flags: connectable general-discoverable limited-discoverable managed-flags tx-power scan-rsp-appearance scan-rsp-local-name Secondary-channel-1M Secondary-channel-2M Secondary-channel-CODED
    Max advertising data len: 251
    Max scan response data len: 251
    Max instances: 20
    Instances list with 0 items
    [mgmt]# name
    Missing name argument
    [mgmt]# info
    Index list with 1 item
    hci0: Primary controller
    addr 40:F3:B0:44:EF:C2 version 13 manufacturer 13 class 0x000000
    supported settings: powered connectable discoverable bondable le advertising secure-conn debug-keys privacy static-addr phy-configuration
    current settings: powered connectable discoverable bondable le advertising secure-conn
    name EnGenius0V4112
    short name
    [mgmt]#

    Thanks.

    BR,
    George Lin

  • Hello George,

    I'm sorry this isn't working on your end. Could you please try running the commands I sent multiple times? Like I mentioned earlier, BlueZ sometimes doesn't perform the necessary functionality from the first attempt and may require multiple.

    Best Regards,

    Tarek D

  • Hi Tarek,

    Multiple times would not be allowed for my situation if It will becomes a product. And I would continue your test once I am free.
    BTW, I've planned to buy a BLE dongle to compare LP-EM-CC2340R5 and buy a BLE sniffer dongle to continue this issue. Do you have any suggestion?

    Thanks.

    BR,
    George Lin

  • Hello George,

    I completely understand, however could you try it out just as a test?

    As for a packet sniffer, I typically use an ellisys to sniff all the packets and ensure the changes were made.

    Best Regards,

    Tarek D

  • Hi Tarek,

    Follow your suggestion regarding sending multiple times, I try two new fresh test and my result is as comment in red. And the result is not all as expected:

    $sudo hciattach /dev/ttyACM45 any 115200 //fresh start #1
    Device setup complete
    $sudo btmgmt
    [mgmt]# advertising off
    hci0 Set Advertising complete, settings: powered connectable discoverable bondable le secure-conn
    [mgmt]# add-adv -d 11094d79424c456465766963656565656565 1 //change name to MyBleDeviceeeeee and seding multiple times
    Instance added: 1
    [mgmt]# add-adv -d 11094d79424c456465766963656565656565 1
    Instance added: 1
    [mgmt]# add-adv -d 11094d79424c456465766963656565656565 1
    Instance added: 1
    [mgmt]# add-adv -d 11094d79424c456465766963656565656565 1
    Instance added: 1
    [mgmt]# add-adv -d 11094d79424c456465766963656565656565 1
    Instance added: 1
    [mgmt]# add-adv -d 11094d79424c456465766963656565656565 1
    Instance added: 1
    [mgmt]# add-adv -d 11094d79424c456465766963656565656565 1
    Instance added: 1
    [mgmt]# add-adv -d 11094d79424c456465766963656565656565 1
    Instance added: 1
    [mgmt]# add-adv -d 11094d79424c456465766963656565656565 1
    Instance added: 1
    [mgmt]# add-adv -d 11094d79424c456465766963656565656565 1
    Instance added: 1
    [mgmt]# advertising on //The nRFconnect show the name MyBleDeviceeeeee without problem
    hci0 Set Advertising complete, settings: powered connectable discoverable bondable le advertising secure-conn

    [mgmt]# advertising off //try to set EnGenius0V4112
    hci0 Set Advertising complete, settings: powered connectable discoverable bondable le secure-conn

    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Instance added: 1
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Instance added: 1
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Instance added: 1
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Instance added: 1
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Instance added: 1
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Instance added: 1
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Instance added: 1
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Instance added: 1
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Instance added: 1
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Instance added: 1
    [mgmt]# advertising on //The nRFconnect show the name blinking between EnGenius0V4112 and EnGenius0V
    hci0 Set Advertising complete, settings: powered connectable discoverable bondable le advertising secure-conn
    [mgmt]# quit

    $ls -al /dev/ttyACM*
    crw-rw---- 1 root dialout 166, 46 Aug 19 09:15 /dev/ttyACM46
    crw-rw---- 1 root dialout 166, 47 Aug 19 09:15 /dev/ttyACM47
    $sudo hciattach /dev/ttyACM46 any 115200 //fresh start #2
    [sudo] password for george:
    Device setup complete
    $sudo btmgmt
    [mgmt]# advertising off
    hci0 Set Advertising complete, settings: powered connectable discoverable bondable le secure-conn
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Add Advertising failed with status 0x05 (Authentication Failed) //error message
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Add Advertising failed with status 0x05 (Authentication Failed)
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Add Advertising failed with status 0x05 (Authentication Failed)
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Add Advertising failed with status 0x05 (Authentication Failed)
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Add Advertising failed with status 0x05 (Authentication Failed)
    [mgmt]# add-adv -d 0f09456e47656e697573305634313132 1
    Add Advertising failed with status 0x05 (Authentication Failed)
    Add Advertising failed with status 0x05 (Authentication Failed)
    Add Advertising failed with status 0x05 (Authentication Failed)
    [mgmt]# advertising on //The nRFconnect show the name EnGenius0V
    hci0 Set Advertising complete, settings: powered connectable discoverable bondable le secure-conn
    [mgmt]#

    Thanks.

    BR,
    George Lin


  • Hello George, 

    Apologies for the delay here! Unfortunately, this is an issue on the BlueZ, evident by the inconsistency of the results, and the fact that this is not an issue when using a different host, like our freeRTOS BLE stack or the Zephyr BLE stack.

    Best Regards,

    Tarek D