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.

Switching to "Just working" mode

Other Parts Discussed in Thread: CC2564

Hello!

I am running the HOGPdemo  , i am using the cc2564 with st32l476 host. 

My goal is to be able to pair the devices (the cc2564 and my android phone) without entering any key codes.  Just automatic connection as soon as i choose the HOGPdemo Bluetooth connection on my phone. from what i understad i can do exactly that using the Just Working pairing mode.

if my assumption is correct i whish to understad how do i switch to this pairing mode, since i cant find a place in the code where this is supposed to be done. (I am using the bluetopia stach v4.0.2.2).

thank you very much for your help.

  • Hi,

    You can use: ChangeLEPairingParameters(), and set the IOCapability as "licNoInputNoOutput".
    But please check the BT spec again - it might be mandatory to use "licKeyboardOnly" for HID keyboard devices.

    Regards,
    Gigi Joseph.
  • Thank you very much!

    This worked and was very helpful!

  • Thanks for your help.

    I have another question :)

    i have been trying to sniff the packets of information using the TI packet sniffer.
    i seem to be able to see all information flow during the connection process but as soon as the phone and cc2564 are connected
    i can't see anything. my instinct tells me that this is because of security mesures/encryption?

    what should i do so i can sniff the packets?
    (this is esssential for me to debug the system properly)

    thanks a lot
  • Hi,

    I'm not familiar with the packet sniffer, but I believe there's an option to decode encrypted data by passing the LTK. You can check the packet sniffer user manual for more information.

    The LTK is available in the "DeviceInfo_t" struct.

    Regards,
    Gigi Joseph.
  • In did there is such an option to insert the long term key into the proper field in the sniffers gui.

    The LTK, does it change during the connection flow? at which point should i take the value? should i just use  my debugger in order to find out the value?

    thanx alot

  • The LTK, does it change during the connection flow?
    >>> No

    at which point should i take the value?
    >>> After pairing

    should i just use my debugger in order to find out the value?
    >>> Yes.

    Regards,
    Gigi Joseph.
  • Hello again!

    I am able to find the proper key, and insert it into the sniffer.
    The problem is that i am not always able to read the packets with the sniffer (in my opinion a sniffer problem ).

    some of the times i can sniff data packets which are not fully decrypted or just irrelevant. 

    like so:

    In other cases i can get the decrypted packets that contain the data i'm actually sending (3 byte mouse notifications).

    There are also times when i can sniff no data packets, meaning after the connection is established and the cc2564 doesn't advertise anymore no data packets are sniffed at all though i can see reactions on my phone cause by Bluetooth notification. this can happen during one session in which i am paired and make connections and disconnections one after another in order to test the sniff.

    I would love to have some advice regarding this situation.

    Moreover, is there no way to disable encryption from the connection process so it will be possible to sniff all the data easily?

    thanks

  • Hi,

    From the HOGP Spec - "HID Devices shall bond and use LE Security Mode 1, Security Level 2 or 3, both of which require an encrypted link."

    Regards,
    Gigi Joseph.