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

NAN-36 not working

Hi developers,

I've finally got the nrf51822 working and advertising a good signal to the dongle. :) After doing all the steps in the NAN-36 pdf-file I hoped that pressing a button would set a change in the master control panel. I was wrong. Somewhere my service is buggy and I can't find out where. Please help me with this.

I included a couple of screenshot of the Master Control Panel and my project files (lbs.h, lbs.c and main.c)

Screenshot 2014-01-07 16.01.25.png

main.c

ble_lbs.c

ble_lbs.h

Screenshot 2014-01-14 09.23.39.png

Parents
  • There are at least two problems with your project:

    1. You have not added the call to ble_lbs_on_ble_evt() to ble_evt_dispatch() in main, as instructed in section 4.4.3. This means that the service will never get to know about any BLE event occuring, which makes it kind of hard for it to do anything on a write event.
    2. You have not uncommented the call to app_button_enable() and app_button_disable() as instructed in section 4.4.5. This means that the device will never actually start watching for button presses, and explains why nothing happens when you press them.

    When fixing those, as in the attached main, everything seems to work as expected.

    main.c

Reply
  • There are at least two problems with your project:

    1. You have not added the call to ble_lbs_on_ble_evt() to ble_evt_dispatch() in main, as instructed in section 4.4.3. This means that the service will never get to know about any BLE event occuring, which makes it kind of hard for it to do anything on a write event.
    2. You have not uncommented the call to app_button_enable() and app_button_disable() as instructed in section 4.4.5. This means that the device will never actually start watching for button presses, and explains why nothing happens when you press them.

    When fixing those, as in the attached main, everything seems to work as expected.

    main.c

Children
No Data
Related