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

problem in setting nrf 52840 dongle as proxy server for light switch example

While trying to execute the light switch example, i was able to set the nrf52840 as evaluation board as proxy server but failed to do the same with the dongle.

2)When the evaluation board is set as the proxy  server and the dongles as  proxy client, after provisioning the instruction is to press the button of the proxy client(which acts as a switch) in order to glow the led of the server(acting as light) but there are no buttons on the dongle unlike the evaluation board so how do i proceed ?

  • Due to other support activity, I have been kept busy the last few days. You can expect a response latest on the 3rd of May.

  • As of now, the light switch code only works on the nRF52 Dev Kits, not on the 52840 dongle. However, we have an example that does work with the dongle. Hopefully, I will have a bit of time next week to test this out & then I will post an example here.

    2) Why do you want to use the dongle as the client? Can you not just use the DK as the client & then use dongles as servers (once I have the example up & running)?

  • I should have a working example out tomorrow that you can flash to the dongle. Will update this thread then.

  • Here is a working example to use the 52840 dongle as a light switch server: 7380.server_pca10059.zip

    Just unzip it in the light switch folder of the mesh SDK v3.1.0. When unzipped, it should look similar to this:

    You can either flash the precompiled_hex file (which includes the example & the softdevice as a merged hex), or you can flash the light_switch_server hex & s140 softdevice separately. They are included inside the build folder.

    The main differences made were changing the board from BOARD_PCA10056 to BOARD_PCA10059 & inserting this code inside simple_hal.c:

    #if defined(BOARD_PCA10059)
    #define LED_START	LED_1
    #define LED_STOP	LED_4
    
    /**
     * Function for configuring UICR_REGOUT0 register
     * to set GPIO output voltage to 3.0V.
     */
    static void gpio_output_voltage_setup(void)
    {
        // Configure UICR_REGOUT0 register only if it is set to default value.
        if ((NRF_UICR->REGOUT0 & UICR_REGOUT0_VOUT_Msk) ==
            (UICR_REGOUT0_VOUT_DEFAULT << UICR_REGOUT0_VOUT_Pos))
        {
            NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen;
            while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
    
            NRF_UICR->REGOUT0 = (NRF_UICR->REGOUT0 & ~((uint32_t)UICR_REGOUT0_VOUT_Msk)) |
                                (UICR_REGOUT0_VOUT_3V0 << UICR_REGOUT0_VOUT_Pos);
    
            NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren;
            while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
    
            // System reset is needed to update UICR registers.
            NVIC_SystemReset();
        }
    }
    #endif

        #if defined(BOARD_PCA10059)
        // If nRF52 USB Dongle is powered from USB (high voltage mode),
        // GPIO output voltage is set to 1.8 V by default, which is not
        // enough to turn on green and blue LEDs. Therefore, GPIO voltage
        // needs to be increased to 3.0 V by configuring the UICR register.
        if (NRF_POWER->MAINREGSTATUS &
           (POWER_MAINREGSTATUS_MAINREGSTATUS_High << POWER_MAINREGSTATUS_MAINREGSTATUS_Pos))
        {
            gpio_output_voltage_setup();
        }
        #endif  

    When provisioning via nRF Mesh, remember to unprovision the device via the app if you want to try to provision the device again! Otherwise, the dongle will not advertise the unprovisioned node beacon! See this link for more info.

  • Hi SpongeBob,

    I try your serve package in my Segger, but I got a error of compiling which is " board.h: no such file or directory" , and other 3 files error . 

    Would you help me to solute it. 

    Thanks,

    Dison

Related