# Detect iBeacons using Spark Core and BLE Mini

**URL:** <https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554>\
**Category:** Project Share\
**Created:** [July 5, 2014, 9:09am UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554 "2014-07-05T09:09:33Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![Mike100](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Mike100](https://community.particle.io/u/Mike100)\
**Post date:** [May 7, 2015, 2:45pm UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554/21 "2015-05-07T14:45:00Z")

</div>

@krvarma, many thanks for the suggestion. I modified your code to output to an arduino serial and removed the 1000ms delay, but the delay remains ( still trying to work out why )

I’m really trying to find a way to make it so that if a beacon is set to advertise every 20ms, the BLE mini would pick each up and pass it to the serial to print (Im trying to get as much resolution on the change of distance of a beacon as possible )

---

<div class="post-metadata">

**Author:** ![krvarma](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/krvarma/32/3089_2.png) [@krvarma](https://community.particle.io/u/krvarma)\
**Post date:** [May 8, 2015, 3:25am UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554/22 "2015-05-08T03:25:54Z")

</div>

@Mike100, let me check this weekend and get back here.

---

<div class="post-metadata">

**Author:** ![raza](https://avatars.discourse-cdn.com/v4/letter/r/82dd89/32.png) [@raza](https://community.particle.io/u/raza)\
**Post date:** [June 2, 2015, 10:44pm UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554/23 "2015-06-02T22:44:17Z")

</div>

Hi Mike, KRVarma,

I’m a newbie trying to hookup a BLE Mini with an Arduino Mega and attempting to listen to a Beacon Module Bluetooth 4.0 (CC2541). If you don’t mind, can you please share what modifications you did to the code to get it to work with Arduino? Thanks! Instead of displaying results on the screen, I am trying to simply have an LED light up for a particular set of beacons.

---

<div class="post-metadata">

**Author:** ![krvarma](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/krvarma/32/3089_2.png) [@krvarma](https://community.particle.io/u/krvarma)\
**Post date:** [June 3, 2015, 2:36am UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554/24 "2015-06-03T02:36:44Z")

</div>

@raza, it should work by changing the Serial1 to Serial or SoftSerial. I have tried while working on this project. First I tried with Arduino and then converted to Spark Core.

---

<div class="post-metadata">

**Author:** ![bravomikebravo](https://avatars.discourse-cdn.com/v4/letter/b/e36b37/32.png) [@bravomikebravo](https://community.particle.io/u/bravomikebravo)\
**Post date:** [October 26, 2015, 7:13pm UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554/25 "2015-10-26T19:13:04Z")

</div>

Can this program be used to detect Google Eddystone beacons? I’m looking for a way to “see” the URL that the Eddystone beacon broadcasts.

---

<div class="post-metadata">

**Author:** ![krvarma](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/krvarma/32/3089_2.png) [@krvarma](https://community.particle.io/u/krvarma)\
**Post date:** [October 27, 2015, 3:26am UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554/26 "2015-10-27T03:26:22Z")

</div>

@bravomikebravo, this as such will not work for Eddystone because the Advertisement Data is very different. We have to modify it to parse the Eddystone data. So by parsing the Eddystone Advertisement data, we can use this for your purpose.

---

<div class="post-metadata">

**Author:** ![d.tsonchev](https://avatars.discourse-cdn.com/v4/letter/d/d26b3c/32.png) [@d.tsonchev](https://community.particle.io/u/d.tsonchev)\
**Post date:** [March 8, 2016, 9:09am UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554/27 "2016-03-08T09:09:44Z")

</div>

Hello  
I Test your program, but Arduino reset at a certain time  
I put the following line

```auto
void setup(){
  Serial.begin(9600);
  Serial.println("START");
  BTSerial.begin(57600);
  hci_init();
}

to give the following

RSSI: 169, 169
iBeacon UUID: B9:40:7F:30:F5:F8:46:6E:AF:F9:25:55:6B:57:FE:6D
iBeaconMajor: 1915
Minor: 28520
Measured Power: BC

RSSI: 104, 104
iBeacon UUID: 00:09:8C:7D:9D:66:7C:B9:1E:02:01:06:1A:FF:4C:6D
iBeaconMajor: 1915
Minor: 28520
Measured Power: BC
START

RSSI: 177, 177
iBeacon UUID: B9:40:7F:30:F5:F8:46:6E:AF:F9:25:55:6B:57:FE:6D
iBeaconMajor: 5953
Minor: -18880
Measured Power: B6

RSSI: 177, 177
iBeacon UUID: FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:6D
iBeaconMajor: 5953
Minor: -18880
Measured Power: B6

RSSI: 170, 170
iBeacon UUID: B9:40:7F:30:F5:F8:46:6E:AF:F9:25:55:6B:57:FE:6D
iBeaconMajor: 4533
Minor: -14213
Measured Power: BC

RSSI: 170, 170
iBeacon UUID: 7F:30:F5:F8:46:6E:AF:F9:25:55:6B:57:FE:6D:11:6D
iBeaconMajor: 4533
Minor: -14213
Measured Power: BC
START

RSSI: 174, 174
iBeacon UUID: B9:40:7F:30:F5:F8:46:6E:AF:F9:25:55:6B:57:FE:6D
iBeaconMajor: 5953
Minor: -18880
Measured Power: B6

```

---

<div class="post-metadata">

**Author:** ![developer\_bt](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/developer_bt/32/1311_2.png) [@developer\_bt](https://community.particle.io/u/developer_bt)\
**Post date:** [June 16, 2017, 7:03pm UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554/28 "2017-06-16T19:03:46Z")

</div>

Hello!  
Can you use another Bluetooth module for the same application?  
In particular I am interested in whether this module can be used: [https://shop.mikroe.com/ble-2-click](https://shop.mikroe.com/ble-2-click) in combination with Electron.  
@krvarma @jbennett @peekay123 @ScruffR

Have a nice weekend 🙂

---

<div class="post-metadata">

**Author:** ![krvarma](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/krvarma/32/3089_2.png) [@krvarma](https://community.particle.io/u/krvarma)\
**Post date:** [June 21, 2017, 5:33pm UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554/29 "2017-06-21T17:33:27Z")

</div>

@developer_bt, the code is for BLE Mini board and it uses HCI commands. I am not familiar with the BLE2 Click board and not sure it supports HCI commands. Even if it supports you have to change the code for this board.

---

<div class="post-metadata">

**Author:** ![developer\_bt](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/developer_bt/32/1311_2.png) [@developer\_bt](https://community.particle.io/u/developer_bt)\
**Post date:** [June 22, 2017, 11:05am UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554/30 "2017-06-22T11:05:20Z")

</div>

Hi @krvarma  
Thanks for the answer. I currently have only this module. I’ll check it out, but it looks like I will have to buy BLE mini.

---

<div class="post-metadata">

**Author:** ![developer\_bt](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/developer_bt/32/1311_2.png) [@developer\_bt](https://community.particle.io/u/developer_bt)\
**Post date:** [June 27, 2017, 3:03pm UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554/31 "2017-06-27T15:03:29Z")

</div>

@krvarma  
Did you manage to successfully read more than one ibeacon? Or the problem has not yet been found.

---

<div class="post-metadata">

**Author:** ![krvarma](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/krvarma/32/3089_2.png) [@krvarma](https://community.particle.io/u/krvarma)\
**Post date:** [June 30, 2017, 2:57am UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554/32 "2017-06-30T02:57:38Z")

</div>

@developer_bt, no, I didn’t solve that. It is kept aside for a long time. I am sure when I will be able to resume it since I am busy with other works. Sorry about that.

---

<div class="post-metadata">

**Author:** ![developer\_bt](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/developer_bt/32/1311_2.png) [@developer\_bt](https://community.particle.io/u/developer_bt)\
**Post date:** [June 30, 2017, 11:15am UTC](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554/33 "2017-06-30T11:15:19Z")

</div>

Thanks for the answer. I’ll see what can be done.

[Previous page](https://community.particle.io/t/detect-ibeacons-using-spark-core-and-ble-mini/5554.md?page=1)
