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

how to enable pa/lna about mesh on nrf5_SDK_for_Mesh_v4.1.0_src ?

HI ,

   

1.
'''
    ble_stack_init();
    err_code = sd_ble_opt_set(BLE_COMMON_OPT_PA_LNA, &ble_pa_lna_opts);
    APP_ERROR_CHECK(err_code);

#if MESH_FEATURE_GATT_ENABLED
    gap_params_init();
    conn_params_init();
#endif

    mesh_init();
    mesh_pa_lna_gpiote_enable(&m_pa_lna_params);
```

2.
```
static void provisioning_sd_ble_opt_cb()
{
    uint32_t err_code;
    err_code = sd_ble_opt_set(BLE_COMMON_OPT_PA_LNA, &ble_pa_lna_opts);
    APP_ERROR_CHECK(err_code);
}

static void start(void)
{
    rtt_input_enable(app_rtt_input_handler, RTT_INPUT_POLL_PERIOD_MS);

    if (!m_device_provisioned)
    {
        static const uint8_t static_auth_data[NRF_MESH_KEY_SIZE] = STATIC_AUTH_DATA;
        mesh_provisionee_start_params_t prov_start_params =
        {
            .p_static_data    = static_auth_data,
            .prov_sd_ble_opt_set_cb = provisioning_sd_ble_opt_cb,
            .prov_complete_cb = provisioning_complete_cb,
            .prov_device_identification_start_cb = device_identification_start_cb,
            .prov_device_identification_stop_cb = NULL,
            .prov_abort_cb = provisioning_aborted_cb,
            .p_device_uri = EX_URI_LS_SERVER
        };
        ERROR_CHECK(mesh_provisionee_prov_start(&prov_start_params));
    }
    else
    {
        unicast_address_print();
    }

    mesh_app_uuid_print(nrf_mesh_configure_device_uuid_get());

    ERROR_CHECK(mesh_stack_start());

    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, m_usage_string);

    hal_led_mask_set(LEDS_MASK, LED_MASK_STATE_OFF);
    hal_led_blink_ms(LEDS_MASK, LED_BLINK_INTERVAL_MS, LED_BLINK_CNT_START);
}
````

I set PA / LNA in the following way. I found that when the device is connected, it will be disconnected and will no longer be connected. How to set PA / LNA correctly?During the development process, I found that Nordic mesh was particularly unstable. We were developing products and were very worried.

  • hi,Attached is my project. In addition to PA, I have another question about my user-defined data. At present, only 25 bytes can be accessed. We want to achieve 256 bytes, but there is an error due to incorrect partition.light_switch_flash.rar

  • Edvin said:

    Edvin said:

    Your call to sd_ble_opt_set() returns 0x07, which means NRF_ERROR_INVALID_PARAM, so you are using some sort of invalid combination. Have you tried to debug to check that your ble_pa_lna_opts are set correctly (as you think they are supposed to be set)? I am not sure about your initialization of it. 

    Do`you use the same configuration the first time you set it ("ble_pa_lna ret: 0") or do you change the parameters between the two calls?

     Can you please elaborate. Did you change any parameters before the call that fails, or is it called with the exact same parameters? Try to print them out in the log if you are not sure. 

  • hi 

    I want to ask a question: are the documents released by your mesh SDK correct?My project has been sent to you. You can debug it. I'm also looking for the reason. I'm saying it again:

    err_ code = sd_ ble_ opt_ set(BLE_ COMMON_ OPT_ PA_ LNA, &ble_ Pa_ lna_ opts);

    err_ code =0x00,

    err_ code=mesh_ Pa_ lna_ gpiote_ enable(&m_ Pa_ lna_ params);

    err_ code = 0x07.

    It's mesh_ Pa_ lna_ gpiote_ Enable call problem.

    I mean, there's something wrong with the PA / LNA documents you released.

  • I want to make sure one thing: mesh_ Pa_ lna_ gpiote_ Enable, whether it only supports port P0 and does not support port P1.

  • zhao.yangyang said:
    are the documents released by your mesh SDK correct?

     I assume it is. Was there something specific you had in mind?

     

    zhao.yangyang said:
    My project has been sent to you.

     I know that you sent me the project, but you didn't answer my questions. Unfortunately, we are very short staffed here in Norway due to summer holidays, which is why I want you to test yourself. I can try to run your project later when I have decreased my queue a bit. Sorry for the inconvenience, but I hope that you understand that if I need to spend a lot of time on one ticket, then there are several other tickets that will not be answered.

    Best regards,

    Edvin

Related