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

How can I change the peripheral type? Don't need "Keyboard"

Hey guys, I work with a partner who makes the hardware for me and uses the nordic chips. I want my device to pair over the android and iOS system settings.

image description

This works fine, but my hardware seller has set the peripheral to Keyboard which results in problems on android devices. (My device has only some simple on off features etc. no keyboard input or something complex) He tells me it's not possible to change that from Keyboard to something else but this cant be true right?

Is it possible to change that to something like "peripheral device" or "unknown" so the android system wont try to budge in?! Because it does some crazy things with my android keyboard then.

Thanks in Advance RC

Parents
  • Hi,

    The appearance value is typically set in the gap_params_init() function, using the SoftDevice function sd_ble_gap_appearance_set(). In order for the peripheral to appear as a keyboard, the function is called with the argument BLE_APPEARANCE_HID_KEYBOARD. Here is the list of all appearance values. You can try to set the value to BLE_APPEARANCE_UNKNOWN, and see if that solves your android issues. In the gap_params_init() function:

    err_code = sd_ble_gap_appearance_set(BLE_APPEARANCE_UNKNOWN);
    APP_ERROR_CHECK(err_code);
    
Reply
  • Hi,

    The appearance value is typically set in the gap_params_init() function, using the SoftDevice function sd_ble_gap_appearance_set(). In order for the peripheral to appear as a keyboard, the function is called with the argument BLE_APPEARANCE_HID_KEYBOARD. Here is the list of all appearance values. You can try to set the value to BLE_APPEARANCE_UNKNOWN, and see if that solves your android issues. In the gap_params_init() function:

    err_code = sd_ble_gap_appearance_set(BLE_APPEARANCE_UNKNOWN);
    APP_ERROR_CHECK(err_code);
    
Children
Related