bsp button no release event after connect to the nRFConnect.

Hi,

I want to use the bsp button to our project, so I tested on the example "ble_app_blinky",

I modified the app button to bsp button,  add two custom events to the bsp_event_t enum in the bsp.h, and then test, 

Before connect to the android App nRF Connect, the bsp button can work ok, BSP_BUTTON_ACTION_PUSH , BSP_BUTTON_ACTION_RELEASE, BSP_BUTTON_ACTION_LONG_PUSH are all work ok. 

After connect to the nRF Connect, there are problem,  only BSP_BUTTON_ACTION_PUSH can work, BSP_BUTTON_ACTION_RELEASE and LONG_PUSH  can not work.

Attached the code, would you please help me to review?  why it can only detect push event,  can not detect release and long push event after conncet to the App ?  Thank you very much.

Best wishes,

Susan

Parents
  • Hi,

    I tested you code, but I see all events on the log, even after connecting with nRF Connect on Android:

    <info> app: button short released
    <info> app: button released state: 0
    <info> app: button short pressed
    <info> app: button pressed state: 1
    <info> app: button long pressed 
    <info> app: button short released
    <info> app: button released state: 0
    <info> app: Connected
    <info> app: button short pressed
    <info> app: button pressed state: 1
    <info> app: button short released
    <info> app: button released state: 0
    <info> app: button short pressed
    <info> app: button pressed state: 1
    <info> app: button long pressed 
    <info> app: button short released
    <info> app: button released state: 0

    Did you do something else after connecting?

    Have you tried the code with the unmodified ble_app_blinky example?

    Best regards,
    Jørgen

Reply
  • Hi,

    I tested you code, but I see all events on the log, even after connecting with nRF Connect on Android:

    <info> app: button short released
    <info> app: button released state: 0
    <info> app: button short pressed
    <info> app: button pressed state: 1
    <info> app: button long pressed 
    <info> app: button short released
    <info> app: button released state: 0
    <info> app: Connected
    <info> app: button short pressed
    <info> app: button pressed state: 1
    <info> app: button short released
    <info> app: button released state: 0
    <info> app: button short pressed
    <info> app: button pressed state: 1
    <info> app: button long pressed 
    <info> app: button short released
    <info> app: button released state: 0

    Did you do something else after connecting?

    Have you tried the code with the unmodified ble_app_blinky example?

    Best regards,
    Jørgen

Children
Related