7 years, 8 months ago.

BLE issue uploading

I uploaded the beacon example from https://developer.mbed.org/users/mbedAustin/code/ble-scanner-demo-beacon/

When I tried to upload the program, I received the following error messages as shown in the attachment. /media/uploads/thomas499/mbed_ble_upload_problem.png When I first tried to show the errors on this post using code brackets it kept saying "this doesn't look like useful content, please reconsider this post" but it didn't say why it wasn't useful content or how to fix it to allow the post to go through.

- By the way, How are you suppose to post error messages from the IDE onto the support forum without getting the "This doesn't look like useful content, please reconsider this post" message?

The fix that I came up with for problems like this in the past was to delete the folder in the example called mbed, and replace it with a folder called mbed-os. In other examples in the past this solution typically solved the problem. The noticeable difference in mbed, and mbed-os is a file called files in addition to the Classes, Groups, and Structs found in the regular mbed folder. I tried to copy the file called files from mbed-os folder and transfer it to the folder mbed folder, but it wouldn't let give me the option of coping the file.

However, doing so on this example prompted the following errors which I do not know how to bypass as shown in the mod attachment/media/uploads/thomas499/error_mod.png

How can I fix the problem so the example BLE program will work on the NRF52?

2 Answers

7 years, 8 months ago.

BLE Scanner demo is not updated to mbed OS 5 yet, and nRF52-DK needs mbed OS 5. For an example of how you can scan for other BLE devices with the nRF52, see the example programs here (this one is for Eddystone beacons).

Thank you. That advice was most helpful. Are there any examples that show how to use the nRF52-DK to emit a beacon that an android phone can pick up? I do not have any other beacons laying around so scanning for them wouldn't help me much.

On the android side, can an app be programmed for a generic beacon to fill in the blanks later for the particular beacon that the app looks for, or does the phone app need to be programmed to look for a specific beacon when building the app, similar to how hardware prototypes usually requires libraries specif to the hardware used in advance to work properly?

posted by Sir Tom 10 Aug 2016

Here's some examples: Eddystone beacon, generic beacon.

All BLE beacons are equal, it's just the payload which differs. For example, Eddystone beacons will always emit their data in a set format. You can scan for BLE beacons with the startLeScan function, then parse the advertisement package manually (it's just bytes).

posted by Jan Jongboom 11 Aug 2016
7 years, 8 months ago.

NRF52 is not supported yet by mbed OS 2, the support will be enabled next week (see here).

In the meantime, you will have to update the the implementation of the BLE library used by your program if you keep using mbed 2. I suggest you to give a look at examples in the mbed-os-examples folder. You will find anything you need for BLE.

If you want to do a beacon, I encourage you to try the ble-beacon example or the Eddystone service example.