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

Can I do both BLE Multi-Connection & Advertising?

Good morning
Now, using nRF52832, I want to implement multiple central devices (smartphones) with one peripheral device (nRF52832 Device) to simultaneously perform BLE Multi-Connection and Advertising.
An example to refer to to implement the function is ble_app_multilink_central.
I am not sure if this example is correct.
First, I am looking at this example to implement a multi connection.
But when I build this example, I keep getting an error.
At first, an error occurred because the nrf_erratas.h file was not found
Added files. When I do that, I get another error and I don't know how to fix it. I've searched for a similar case, but it doesn't come out.
Is it correct that I found the example well as an example for implementing the multi-connection function?
(nRF5_SDK_15.3.0_59ac345\examples\ble_central\ble_app_multilink_central\pca10040.....)
Could you please let me know what is the problem?
Also, are there any macros or materials that can be referenced to implement simultaneous BLE Multi-Connection & Advertising?
Thank you for your attention.

..\..\..\..\..\..\components\Include\nrf_erratas.h(39): error:  #79: expected a type specifier
  NRF_MDK_VERSION_ASSERT_AT_LEAST(8,34,0);
..\..\..\..\..\..\components\Include\nrf_erratas.h(39): error:  #79: expected a type specifier
  NRF_MDK_VERSION_ASSERT_AT_LEAST(8,34,0);
..\..\..\..\..\..\components\Include\nrf_erratas.h(39): error:  #79: expected a type specifier
  NRF_MDK_VERSION_ASSERT_AT_LEAST(8,34,0);
..\..\..\..\..\..\components\Include\nrf_erratas.h(39): error:  #260-D: explicit type is missing ("int" assumed)
  NRF_MDK_VERSION_ASSERT_AT_LEAST(8,34,0);
..\..\..\..\..\..\components\Include\nrf51_erratas.h(40): error:  #130: expected a "{"
  static bool nrf51_errata_1(void) __UNUSED;
..\..\..\..\..\..\components\Include\nrf51_erratas.h(120): warning:  #12-D: parsing restarts here after previous syntax error
  {
..\..\..\..\..\..\components\Include\nrf52_erratas.h(40): error:  #130: expected a "{"
  static bool nrf52_errata_1(void) __UNUSED;
..\..\..\..\..\..\components\Include\nrf52_erratas.h(219): warning:  #12-D: parsing restarts here after previous syntax error
  {
..\..\..\..\..\..\components\Include\nrf53_erratas.h(40): error:  #130: expected a "{"
  static bool nrf53_errata_1(void) __UNUSED;
..\..\..\..\..\..\components\Include\nrf53_erratas.h(129): warning:  #12-D: parsing restarts here after previous syntax error
  {
..\..\..\..\..\..\components\Include\nrf91_erratas.h(40): error:  #130: expected a "{"
  static bool nrf91_errata_1(void) __UNUSED;
..\..\..\..\..\..\components\Include\nrf91_erratas.h(67): warning:  #12-D: parsing restarts here after previous syntax error
  {
RTE\Device\nRF52832_xxAA\system_nrf52.c: 4 warnings, 8 errors

Parents
  • An example to refer to to implement the function is ble_app_multilink_central.
    I am not sure if this example is correct.

    As the name suggests, that's for a Central - not a peripheral.

    I think this is the example you need:

    https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/ble_sdk_app_multiperipheral.html

    "The BLE Multiperipheral Application shows how one Peripheral can connect to several Centrals"

  • I agree with . You should look into the SDK\examples\peripheral\experimental\ble_app_multiperipheral.

    Regarding the compiler erros that you see. Did they occur from your first comile? Or did they occur after you changed something? It looks like a syntax error. Perhaps you have changed something in some of the files in the SDK (perhaps from another project). Try to download an unmodified SDK, and see if the issue still occurs. If so, please let me know what SDK and IDE you are using.

    Best regards,

    Edvin

  • I also appreciate Edvin's reply.
    The error initially occurred because the error could not find the nrf_erratas.h file.
    To resolve this error, you pasted the folder containing this file into the SDK and added the path in the Options for Target 'nrf52832_xxa' \ C/C++ \ include Paths settings.
    And then this error is happening.
    Did I do something wrong?

  • If the compiler doesn't find default SDK files, then I guess one of the following:

    You have copied the example, and pasted it in a new location. The examples needs to be in the same place relative to the SDK root folder. If you want to copy them, you need to place it the same number of folders inside the SDK root folder, because all the include files are relative to the project file.

    If you have not moved the folder, it may be that the path string is too long. Try to extract the SDK closer to your C: folder.

    I have my SDKs in: C:\Nordic\SDKs\17.0.2\...

    If the path is too long (250 something characters), then the compilers will not be able to locate the files.

    Best regards,

    Edvin

Reply
  • If the compiler doesn't find default SDK files, then I guess one of the following:

    You have copied the example, and pasted it in a new location. The examples needs to be in the same place relative to the SDK root folder. If you want to copy them, you need to place it the same number of folders inside the SDK root folder, because all the include files are relative to the project file.

    If you have not moved the folder, it may be that the path string is too long. Try to extract the SDK closer to your C: folder.

    I have my SDKs in: C:\Nordic\SDKs\17.0.2\...

    If the path is too long (250 something characters), then the compilers will not be able to locate the files.

    Best regards,

    Edvin

Children
No Data
Related