NRF52840 BLE LED/Button Pairing

Hello. 

I am modifying the nRF52840DK NRF desktop firmware for a custom mouse application. Using the standard firmware, LED2 is used as the status LED for connectivity. What is the best way to reconfigure the status LED (LED3 or LED4)? I can't find any setting in the nRF Kconfig GUI. Also, is there any way to reconfigure other buttons as the peer control? 

Thank you.

Parents Reply Children
  • Hello Hieu. 

    Thank you for the information you provided. It did help me understand more of what is going on. I should be a little more clear on what I'm trying to do. I created a 52840DK board/configuration based on 52840 gmouse project. While the project flashes onto my board, I do not see a "breathing" led, like I do with the nrf52840dk_nrf52840 sample project. Diving further into the sample project, each LED on the DK are assigned their own PWM timer. On my firmware, pwm0 and pwm1 are used for RGB lighting. I did assign channel 3 of pwm1 to one of the LEDs, but this had no effect. Do I have to configure an event for both the system and peer LEDs? 

  • Hi tsroga,

    Could you please share how you are setting up the new LED with channel 3 of PWM1?

  • Hello Hieu.

    I have figured out how to initialize the LEDs. I just copied the pin and PWM configurations from the sample DTS file and the app overlay. However, I am facing a new problem. My 52840DK board does not want to connect to my 52833DK board which is acting as the dongle. They should connect automatically, but the LED on both boards are "breathing". I tried to play around with the peer control in the .conf file, but I still can't get it to work. I made sure the vendor of the 52840 matches with the 52833. I also made sure the product ID of the 840 matches the ones listed in the ble_discovery_def file. The name of the 52840 also matches the PEER_TYPE_MOUSE peer name in ble_scan_def file. 

  • Hi tsroga,

    My apology for the long silence. I have had to take a few days off, and my team is currently short-handed due to the Easter holiday.

    Here I would like to just repeat a few checks in case something is missed:

    If it is none of those, we can try looking at a sniffer trace first, as debugging is really hard to schedule in the middle of a holiday time like right now.

    If you don't know how to make a sniffer trace, please refer to Lesson 6 of our Bluetooth Low Energy Fundamentals course. It will require an additional nRF52 development device.

    Regards,

    Hieu

  • Hello Hieu. 

    I managed to fix the problem my adding a peer control button to the dongle. I held the button for 5 seconds, then double pressed it to confirm. The two boards paired right up! 

Related