This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Try to separate the sample of hid_keyboard into ble function and hid service, then found it could be connected at first but show pair immediately

Hi, 

As the subject description, I just remove the part of hid function from main.c then make the personal source file.

Before I removed, the project could work as usual.

And after I create the source file for hid function into the project, the project could be built without error.

Somehow, it could not work properly.

Compare the log

As you could see from the picture above, the left show fatal error compare to the right(Normal).

Not sure why it could be connected but show pair immediately without function.

Do you have any idea or instruction could share with me?

Thanks.

Parents Reply
  • Hi Smackenzie,

    I just noticed that when I remove below functions from main.c to source file the issue happened.

    static void hids_init(void)

    static void on_hid_rep_char_write(ble_hids_evt_t * p_evt)

    static void on_hids_evt(ble_hids_t * p_hids, ble_hids_evt_t * p_evt)

    The symptom is a little bit like force to disconnected by windows.

    However, the device could be stable connected with mobile.

    Do you have any idea or experience with that?

    Thanks.

Children
No Data
Related