This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Cannot pair BTLE Keyboard using HOGM

Hello all,

I have problems to connect a BTLE-Keyboard using HOGM.
I use a WL18xx on a AM335x Board with the BT-Stack AM335xBluetopiaLinuxProduction-4.0.3.0.1.0.

This is what I do:

  • ./SS1BTPM & ./LinuxHOGM
  • Initialize 1
  • SetDevicePower 1
  • RegisterEventCallback
  • RegisterHOGMCallback
  • RegisterAuthentication
  • StartDeviceDiscovery 1 11
    ...
    My Keyboard with ID FABADE98212C is recognized
  • PairWithRemoteDevice FABADE98212c 1

Attempting to Pair With Remote LE Device: FABADE98212c.
DEVM_PairWithRemoteDevice() Success: 0.
.....
HOGM>
LE Remote Device Pairing Status: FABADE98212C, FAILURE (0x8000001F)


After PairWithRemoteDevice() nothing happens.
There is no question for a Pincode or sth else.
After a Timeout of 30 sec the pairing status is Failed.

What is wrong with my approach?
Below some more information.

Regards,
Roland

HOGM>QueryRemoteDeviceProperties FABADE98212C 1
Attempting to Query FABADE98212C Device Properties: LE, ForceUpdate: FALSE.
DEVM_QueryRemoteDeviceProperties() Success: 0.
BD_ADDR:             FABADE98212C
Address Type:        Static
Device Name:         Keyboard K780
LE Type:             Dual Mode
Device Flags:        0xC0082001
Device Appearance:   961
LE RSSI:             -51
LE Trans. Power:     4
LE Paired State :    FALSE
LE Connect State:    FALSE
LE Encrypt State:    FALSE
GATT Services Known: FALSE
RSSI:                0
Friendly Name:       
App. Info:   :       00000000
Paired State :       FALSE
Connect State:       FALSE
Encrypt State:       FALSE
Sniff State  :       FALSE
COD:                 0x000000
SDP Serv. Known :    FALSE


HOGM>QueryLocalDeviceProperties
DEVM_QueryLocalDeviceProperties() Success: 0.
BD_ADDR:      5C313EE3E22A
HCI Ver:      0x0007
HCI Rev:      0x0000
LMP Ver:      0x0007
LMP Sub Ver:  0xAC08
Device Man:   0x000D (Texas Instruments Inc.)
Device Flags: 0x80000000
BLE Address Type: Resolvable Random
BLE BD_ADDR:      77F1EA4476ED
COD:          0x1C0424
Device Name:  otto
Disc. Mode:   TRUE , 0x00000000
Conn. Mode:   TRUE , 0x00000000
Pair. Mode:   TRUE , 0x00000000
LE Scan Mode:    FALSE, 0x00000000
LE Adv Mode:     FALSE, 0x00000000
LE Slv Mode:     Not in Slave Mode


  • Can, you try with invoking, "SetPairable" on the Host side, before 'pairing'?

    Thanks
  • The Host is already pairable, see output of QueryLocalDeviceProperties.
    Any additional setpairable does not change anything.

    System Info
    ===========

    • Custom board with am335x on it.
    • Sitara Linux Processor SDK V07.00.00.00
    • Kernel 3.12.10-ti2013.12.01
    • wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
    • Bluetopia 4.0.3.0.1.0
    • TIInit_11.8.32.bts (TI_P2.136)

  • Let me check on my setup and get back..

    Thanks
  • I tried on my setup with latest (www.ti.com/.../TI-BT-4-2-STACK-LINUX-ADDON) release.. I had a CC256x device configured for HOG peripheral. It seems to connect Ok.. Here is the log:

    HOGM>Initialize 1

    BTPM_Initialize() Success: 0.
    DEVM_RegisterEventCallback() Success: 5.
    HOGM>SetDevicepower 1

    DEVM_PowerOnDevice() Success: 0.
    HOGM>
    Device Powered On.
    HOGM>
    HOGM>48

    HOGM_Register_Data_Event_Callback() Success: 1.
    HOGM>42

    DEVM_RegisterAuthentication() Success: 6.
    HOGM>25 B0B448F4883D 1

    Attempting to Pair With Remote LE Device: B0B448F4883D.
    DEVM_PairWithRemoteDevice() Failure: -10043, Bluetooth Device already Paired.
    Function Error.
    HOGM>34 B0B448F4883D 1

    Attempting to Connect With (LE) Remote Device: B0B448F4883D (Flags = 0x80000000).
    DEVM_ConnectWithRemoteDevice() Success: 0.
    HOGM>
    Remote Device Connection Status: B0B448F4883D, 0 (SUCCESS)
    HOGM>
    Remote Device Properties Changed.
    BD_ADDR: B0B448F4883D
    Address Type: Public
    LE Type: Single Mode
    Device Flags: 0x4004F001
    LE Connect State: TRUE
    HOGM>34 B0B448F4883D 1 0x03

    Attempting to Connect With (LE) Remote Device: B0B448F4883D (Flags = 0x80000003).
    DEVM_ConnectWithRemoteDevice() Success: 0.
    HOGM>
    Remote Device Properties Changed.
    BD_ADDR: B0B448F4883D
    Address Type: Public
    LE Type: Single Mode
    Device Flags: 0x4005F001
    LE Encrypt State: TRUE
    HOGM>
    Remote Device Connection Status: B0B448F4883D, 0 (SUCCESS)
    HOGM>
    HOGM HID Device Connection
    Remote Address: B0B448F4883D
    Supported Features:
    Remote Wakeup: Not Capable
    Normally Connectable: YES
    Boot Keyboard: SUPPORTED
    Boot Mouse: NOT SUPPORTED
    HID Information:
    HID Version: 0x111
    Country Code: 0x0
    Product ID: 0xDEAD
    Product Version: 0xBEEF
    Vendor ID Source: Bluetooth SIG
    Vendor ID: 0x5E
    Report Descriptor:
    Length: 63
    Data:
    05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01 75 01 95 08 81 02 95 01 75 08 81 03 95 05 75 01 05 08 19 01 29 05 91 02 95 01 75 03 91 03 95 06 75 08 15 00 25 65 05 07 19 00 29 65 81 00 C0
    HOGM>
    HOGM>
    HOGM>Queryremotedeviceproperties

    Usage: QueryRemoteDeviceProperties [BD_ADDR] [Type (1 = LE, 0 = BR/EDR)] [Force Update].
    Function Error.
    HOGM>
    HOGM>queryremotedeviceproperties B0B448F4883D 1

    Attempting to Query B0B448F4883D Device Properties: LE, ForceUpdate: FALSE.
    DEVM_QueryRemoteDeviceProperties() Success: 0.
    BD_ADDR: B0B448F4883D
    Address Type: Public
    Device Name: HOGPDemo
    LE Type: Single Mode
    Device Flags: 0x4005F001
    Device Appearance: 961
    LE RSSI: 0
    LE Paired State : TRUE
    LE Connect State: TRUE
    LE Encrypt State: TRUE
    GATT Services Known: TRUE
  • Hello Hari,

    thank you for your investigation.

    Meanwhile I found the reason for the HOGM issue:
    I have to
    - first connect the device
    - then pair the device

    When I do the pairing first, then the keyboard changes its BT-Address and connecting fails.
    This occured both with a BT-LE Keyboard and mouse.