project for nrf51822 qfab

Dependencies:   eddystone_URL mbed

Fork of eddystone_URL by vo dung

Revision:
5:267bdacf5508
Parent:
4:2386637c9c7c
diff -r 2386637c9c7c -r 267bdacf5508 main.cpp
--- a/main.cpp	Thu Nov 23 08:46:00 2017 +0000
+++ b/main.cpp	Thu Nov 23 15:38:48 2017 +0000
@@ -2,40 +2,26 @@
 #include "BLEDevice.h"
 
 BLEDevice  ble;
-static const uint16_t uuid16_list[]        = {0x00A0};
 const static uint8_t beaconPayload_url[] = {
-    0xaa,
-    0xfe,
- 
-    // URL
- 
-    0x10, // Frame Type
-    0x20, // Ranging Data
-    0x02, // URL Scheme (http:// = 0x02)
- 
-    'i',
-    'o',
-    't',
-    'm',
-    'a',
-    'k',
-    'e',
-    'r',
-    '.',
-    'v',
-    'n',
+                            0x4C, 0x00, //ID Company
+                            0x02,       //Type
+                            0x15,       //Length of data
+                            0xE2, 0x0A, 0x39, 0xF4, 0x73, 0xF5, 0x4B, 0xC4, //UUID
+                            0xA1, 0x2F, 0x17, 0xD1, 0xAD, 0x07, 0xA9, 0x61, //
+                            0x04, 0x62, //Major
+                            0x0D, 0x10, //Mirnor
+                            0xC8,       //Txpower 
+                            
+
 };
 int main(void)
 {
     ble.init();
-    ble.accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED|GapAdvertisingData::LE_GENERAL_DISCOVERABLE);
- 
-    ble.accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS, (uint8_t *)uuid16_list, sizeof(uuid16_list));
- 
-    //ble.accumulateAdvertisingPayload(GapAdvertisingData::SERVICE_DATA,beaconPayload_uid, sizeof(beaconPayload_uid));
-    ble.accumulateAdvertisingPayload(GapAdvertisingData::SERVICE_DATA,beaconPayload_url, sizeof(beaconPayload_url));
-    //ble.accumulateAdvertisingPayload(GapAdvertisingData::SERVICE_DATA,beaconPayload_tlm, sizeof(beaconPayload_tlm));
- 
+    
+    ble.accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE );
+    
+    ble.accumulateAdvertisingPayload(GapAdvertisingData::MANUFACTURER_SPECIFIC_DATA, beaconPayload_url, sizeof(beaconPayload_url));
+    
     ble.setAdvertisingType(GapAdvertisingParams::ADV_NON_CONNECTABLE_UNDIRECTED);
  
     ble.setAdvertisingInterval(160);