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

nRF Mesh and uart

hi..... everyone 

I want to send the data from one node  to particular node and that same data should want to print in termite using uart . so i checked the ble_uart coexist example .so how to do this task . in this case which example i should use to pass the data from one to another node .

anyone can explain me clearly how do achieve this ?

Parents Reply Children
  •  here i have set my message , is it correct pls check here

    static void button_event_handler(uint32_t button_number)
    {
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Button %u pressed\n", button_number);
    
        uint32_t status = NRF_SUCCESS;
        generic_onoff_set_params_t set_params;
        model_transition_t transition_params;
        static uint8_t tid = 0;
    
        /* Button 1: On, Button 2: Off, Client[0]
         * Button 2: On, Button 3: Off, Client[1]
         */
     char arr[5] = "code";
     char ara[5] = "set";
     
        switch(button_number)
        {
            case 0:
            case 2:
                set_params.on_off = arr;
                break;
    
            case 1:
            case 3:
                set_params.on_off = Ara;
                break;
        }
    
        set_params.tid = tid++;
        transition_params.delay_ms = APP_CONFIG_ONOFF_DELAY_MS;
        transition_params.transition_time_ms = APP_CONFIG_ONOFF_TRANSITION_TIME_MS;
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Sending msg: ONOFF SET %d\n", set_params.on_off);
    
    
        set_params.tid = tid++;
        transition_params.delay_ms = APP_CONFIG_ONOFF_DELAY_MS;
        transition_params.transition_time_ms = APP_CONFIG_ONOFF_TRANSITION_TIME_MS;
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Sending msg: ONOFF SET %d\n", set_params.on_off);
    

  • Yes, it seems correct. Why have you :

    set_params.tid = tid++;
        transition_params.delay_ms = APP_CONFIG_ONOFF_DELAY_MS;
        transition_params.transition_time_ms = APP_CONFIG_ONOFF_TRANSITION_TIME_MS;
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Sending msg: ONOFF SET %d\n", set_params.on_off);

    twice?

  • Thanks mttrinh , for your reply . by mistake its copied twice . Now , i have sent this character from client to server , and how do i check whether it is received to server side or not?

    here  , below pic client  side debug terminal results after i am  pressing button 1

     here , below pic  server side 

Related