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

Multiactivity_beacon advertiser for nRF52 (Service and iBeacon together)

I am trying to port the experimental_ble_app_multiactivity_beacon advertiser example to nRF52.

I have used the document 'Migrating an nRF51 BLE project to nRF52' (infocenter.nordicsemi.com/index.jsp

I have only changed the Memory Areas as follows:

  • IROM1: 0x1C000/0x64000
  • IRAM1: 0x20002080/0xDF80

Moreover, I have changed:

  • APP_COMPANY_IDENTIFIER to 0x004C
  • BEACON_UUID, BEACON_MAJOR, BEACON_MINOR as per my needs.

(I did exactly the same with ble_app_beacon which worked as expected).

All the services are properly advertised and I am able to connect to them, but unfortunately the iBeacon is not detected by my iOS device.

I have also tried the timeslot variation, but I am not able to compile because of this error:

cannot open source input file "ble_stack_handler_types.h": No such file or directory

Can anyone help me with this or point me to a working sample of a BLS service together with iBeacon?

Tks

  • I attached my project. I am using: nRF5_SDK_11.0.0_89a8197. Tks for your support. my_experimental_ble_app_multiactivity_beacon.zip

  • @Fab: I see no problem with the project you sent. After I connected, the device advertise as a beacon as show below:

    image description

    The only modification I need to add is to add to main.c :

    err_code = NRF_LOG_INIT();
    APP_ERROR_CHECK(err_code);
    

    As it's not included by default, it's a bug.

  • Unfortunately, I am not still able to make it working.

    1. when I added the NRF_LOG_INIT the executable is too big:

    error: L6047U: The size of this image (33368 bytes) exceeds the maximum allowed for this version of the linker

    1. Assuming that the problem were related to the RTT, I removed the following files:
    • RTT_Syscalls_KEIL.c
    • SEGGER_RTT.c
    • SEGGER_RTT_printf.c

    but nothing changes: my iOS app doesn't recognize the iBeacon and nRF Connect shows exactly the same information as before. I am not able to make a test with MCP for 2 or 3 days, because I am using Windows in virtualbox and MCP doesn't connect.

    What I actually need is an app which acts as an iBeacon and provides a services (with at least one characteristic) at the same time. Can you point me to any other working example which I can test on the DK-52?

    Tks

  • Hi fab,

    The code size exceed 32kB for the free version. You may need to pay to get the licensed one to be able to compile bigger code size than 32kB. Or you can enable optimization so that the size can be reduced.

    How did you test iBeacon ? Note that with the experimental_ble_app_multiactivity_beacon, you would need to connect to the Nordic_HRM_adv first before the device advertise as an iBeacon. This example shows how you can be both in a connection and advertise as a beacon at the same time.

    Our nRF Beacon app doesn't show iBeacon, only Nordic's Beacon. You may need to use other app to chck for iBeacon, for example "Locate Beacon" app, I can see your beacon after adding the UUID and major, minor iD.

  • Hi Hung. Thank you for your time. I pretty sure that something is wrong here, but I cannot figure out what.

    1. with -O3 and I am able to get a smaller executable but nothing changes. RTT is not problem.
    2. I follow this procedure a) I connect to DK-52 using n/f Toolbox - HRM b) I use a my own iOS app to detect the iBeacon. It has been working for months. I am sure that the problem is not there. By the way, it works using the ble_app_beacon c) I use nRFConnect and it shows that on connection something changes. (I sent you my screenshots). Values looks like different from which you get. I stuck here. Could you please help me with a simple example with an iBeacon and a service with a characteristic that I can read and write? I am just starting with nRF52 and I am not able write it on my own. Do I need to switch to DK-51? Tks.
Related