Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UART example on coded PHY

Hi

I am playing around with ble_app_uart example from SDK, it works perfectly fine together with ble_app_uart_c. Now I want to modify it so that it would work in long range mode (or coded PHY). I tried adding these two lines to advertising_init function:

After doing that, the application crashes in function advertising_start, because the function ble_advertising_start returns 7 (I believe this is the parameter error). But the hard part is now how to know which parameter is wrong if there are so many... Does anybody have an idea?

Here is the code from my main.c for reference (I haven't modified anything else):

I would really appreciate if somebody would help me out.

Parents
  • Hi.

    I'm unsure which SDK you are using, but if you are using SDK 15.2, then you should only have to add:

    But if your issue is that ble_advertising_start() returns NRF_ERROR_INVALID_STATE, then that is because the BLE module is not initialized.

    Have you checked what ble_advertising_init() returns?

    Best regards,

    Andreas

Reply
  • Hi.

    I'm unsure which SDK you are using, but if you are using SDK 15.2, then you should only have to add:

    But if your issue is that ble_advertising_start() returns NRF_ERROR_INVALID_STATE, then that is because the BLE module is not initialized.

    Have you checked what ble_advertising_init() returns?

    Best regards,

    Andreas

Children
  • Hi

    Yes, I am using SDK 15.2.

    ble_advertising_init() returns 0, which is NRF_SUCCESS.

    ble_advertising_start() doesn't return NRF_ERROR_INVALID_STATE, which is 8, but I see it return number 7, which is NRF_ERROR_INVALID_PARAM.

    If I change only primary PHY to coded, also the same thing happens, there is no difference.

    Best regards,

    Luka

  • Hi.

    Could you share your project so I can take a look at it?

    I can make this ticket private if you do not want to share the project with anyone else but me and other Nordic employees :-)

    Best regards,

    Andreas

  • Hi

    It's no problem sharing the project right now, as it is only the SDK 15.2 project in that stage with changed power setting for adveretising.

    This is Eclipse project with configured IAR toolchain (I use IAR compiler) and the original IAR project is still inside and it also works. So this works either with Eclipse and IAR plugin or the original IAR Workbench. The whole project files are in the attachment.

    But also - what I have changed is basically the main.c from the project, which is in my original post anyway.

    And by the way - UART pins are configured here a bit funny, because I am using the Fanstel development board, which has UART pins somewhere else.

    ble_app_uart_pca10056_s140.7z

  • Hi.

    Which version of IAR Workbench does it work on? I cannot compile it with my version.

    Best regards,

    Andreas

  • Hi

    I have version 8.32.2 and it builds just fine for me, in fact I tried even now extracting the archive I provided and cleanning and building it and it works just fine.

    Best regards,

    Luka