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

Read and write beacon properties (UUID, Major, Minor) on s110_nrf51822_7.0.0

I'm trying to implement the ability to change the beacon properties (UUID, Major, Minor) using NRF Beacon Android app. My project is based on s110_nrf51822_7.0.0 (ble_app_beacon), however, the reference code example that I use is "ble_app_beacon_bcs" from nRF51822 Smart Beacon Kit based on s110_nRF51822_6.0.0. When I'm calling "beacon_write_handler(ble_bcs_t * p_lbs, beacon_data_type_t type, uint8_t *data)" function (e.g. after changing the UUID via Android app and tapping ok button) I'm getting "Error 133 occurred" in NRF Beacon Android app. What does this error mean? I've noticed that in "ble_app_beacon_bcs" example modified "pstorage_mod.c" file is used instead of original "pstorage.c" file. What should I add or modify to be able read and write these parameters (UUID, Major, Minor) via nRF Beacon Android app?

Parents
  • I did as you suggested (change IROM1 id to 0x16000 in keil uVision 5.0 Option window, insert sd_ble_enable() function inside ble_stack_init() function) but when I try to run the migration software (with SD 7.0.0) it returns a error code 15 on "err_code = pstorage_clear(&pstorage_block_id, sizeof(flash_db_t));" line. Is there something else to do (I think that the problem is probably about pstorage memory map). I saw that the issue (in debug mode) is due to sd_ble_enable function. If I comment this function the beacon value (uuid, major, minor, rssi) is writes well on flash memory at address 0x3f800. What happen?

    NOTE: I took the ble_app_beacon_bcs_6310.zip and copy the folder in C:\Program\Nordic Semiconductor\nRF51822 Beacon v1.0.1\Source Code\Nordic\nrf51822\Board\nrf51_beacon path. For compiled the project without error, I had to change the follow files: ble_gatts.h, ble_gap.h and ble.h for the new sd_ble_enable() function parameter, otherwise I had errors during compile the main.c file.

Reply
  • I did as you suggested (change IROM1 id to 0x16000 in keil uVision 5.0 Option window, insert sd_ble_enable() function inside ble_stack_init() function) but when I try to run the migration software (with SD 7.0.0) it returns a error code 15 on "err_code = pstorage_clear(&pstorage_block_id, sizeof(flash_db_t));" line. Is there something else to do (I think that the problem is probably about pstorage memory map). I saw that the issue (in debug mode) is due to sd_ble_enable function. If I comment this function the beacon value (uuid, major, minor, rssi) is writes well on flash memory at address 0x3f800. What happen?

    NOTE: I took the ble_app_beacon_bcs_6310.zip and copy the folder in C:\Program\Nordic Semiconductor\nRF51822 Beacon v1.0.1\Source Code\Nordic\nrf51822\Board\nrf51_beacon path. For compiled the project without error, I had to change the follow files: ble_gatts.h, ble_gap.h and ble.h for the new sd_ble_enable() function parameter, otherwise I had errors during compile the main.c file.

Children
No Data
Related