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

Problem controlling nrf 52840 dongle as a client in Mesh light switch client example.

Hi

I am unable to configure the nrf52840 dongle in client mode in light switch mesh example. I have changed the simple_hal.h to include the dongle board as

/** Boards with user buttons */
#define BUTTON_BOARD (defined(BOARD_PCA10059) ||defined(BOARD_PCA10040) || defined(BOARD_PCA10028) || defined(BOARD_PCA10056) || defined(BOARD_PCA10100)) //lint -e491 // Suppress "non-standard use of 'defined' preprocessor operator"

But got no success in controlling the button. I tried debugging the code through leds when i press the button it is not even going inside button handler as well.

Is there any example which can help or what changes i need to do in the code. I have followed thread for changing the led configurations to run the server in dongle->
#if defined(BOARD_PCA10059)
#define LED_START    LED_1
#define LED_STOP    LED_4

but didn't got anything regarding the sw1 button for client.

Thanks in Advance

Anuprit

  • Hi,

    Have you changed the define from BOARD_PCA10056 to BOARD_PCA10059 in the preprocessor definitions?

  • yes i have already changed them. But still i m not able to test the sw1 switch on client. I was able to use app_gen_onoff_client_publish_interval_cb() function to just publish an onoff param value to change the led from client to server side. Any configuration i need to do to use sw1 button to create a callback for the same? Can you help in those configs.

    Ultimately i need to send adc value from sensors of client to the server node. Which model should you suggest i use rather than generic onoff?

    How can i get to print the logs over usb in the dongle. As right now i am not having any debugger?

  • Hi,

    anuprit said:
    yes i have already changed them. But still i m not able to test the sw1 switch on client. I was able to use app_gen_onoff_client_publish_interval_cb() function to just publish an onoff param value to change the led from client to server side. Any configuration i need to do to use sw1 button to create a callback for the same? Can you help in those configs.

    I noticed that you have gotten a reply from the OP in this post, have you tried out the solution he gave you?

    anuprit said:
    Ultimately i need to send adc value from sensors of client to the server node. Which model should you suggest i use rather than generic onoff?

    I suggest you have a look at the Sensor example, This example demonstrates how to use the Sensor model.

    If it doesn't suit your needs, then you can make a model yourself, with the message formats that you need. See e.g. Creating new models.

    anuprit said:
    How can i get to print the logs over usb in the dongle. As right now i am not having any debugger?

    I would recommend you get a 10 pin SWD cable & program the dongle via a dev kit for example. If you want to debug the dongle while it is running mesh, you require some kind of segger j-link to see the RTT logging.

Related