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

iOS iBeacon proximityUUID

I'm looking to use the nRF51822 as an iBeacon transmitter for iOS, reading the docs it appears that I need to know the proximityUUID of the sensor that I can set the OS to tell my app when the OS reads this specific sensors. So far I have been unable to find the proximityUUID of the sensor. From what I've read this should be something read-only on the device, so my question is how can I read this? Any thoughts or suggestions?

Thanks

iOS details developer.apple.com/.../Reference.html

Parents
  • Even though Apple haven't supplied much details on iBeacon, it isn't hard to start one iDevice as an iBeacon, following Apple's documentation, and then replicating the advertising format seen there on an nRF51.

    This could for example become like this:

    
    typedef __packed struct
    {
        uint16_t unknown1;
        uint8_t uuid[16];
        uint16_t major;
        uint16_t minor;
        uint8_t unknown2;
    } clbeacon_info_t;
    ...
    static void advertising_init(void)
    {
        uint32_t      err_code;
        uint8_t       flags = BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED;
        ble_advdata_t advdata;
        
        uint8_t uuid[16] = {0x01, 0x12, 0x23, 0x34, 0x45, 0x56, 0x67, 0x78, 0x89, 0x9a, 0xab, 0xbc, 0xcd, 0xde, 0xef, 0xf0};
        
        clbeacon_info_t beacon_info;
        beacon_info.unknown1 = 0x1502;
        memcpy(&beacon_info.uuid, &uuid, sizeof(uuid));
        beacon_info.major = 0x3412;
        beacon_info.minor = 0x7798;
        beacon_info.unknown2 = 0xC5;
    
        ble_advdata_manuf_data_t manuf_specific_data;
        manuf_specific_data.company_identifier = 0x004C;
        manuf_specific_data.data.p_data        = (uint8_t *) &beacon_info;
        manuf_specific_data.data.size          = sizeof(beacon_info);
        
        // Build and set advertising data
        memset(&advdata, 0, sizeof(advdata));
        
        advdata.name_type               = BLE_ADVDATA_NO_NAME;
        advdata.flags.size              = sizeof(flags);
        advdata.flags.p_data            = &flags;
        advdata.p_manuf_specific_data   = &manuf_specific_data;
        
        err_code = ble_advdata_set(&advdata, NULL);
        APP_ERROR_CHECK(err_code);
    }
    
    
    /**@brief Start advertising.
     */
    static void advertising_start(void)
    {
        uint32_t             err_code;
        ble_gap_adv_params_t adv_params;
        
        // Start advertising
        memset(&adv_params, 0, sizeof(adv_params));
        
        adv_params.type        = BLE_GAP_ADV_TYPE_ADV_NONCONN_IND;
        adv_params.p_peer_addr = NULL;
        adv_params.fp          = BLE_GAP_ADV_FP_ANY;
        adv_params.interval    = APP_ADV_INTERVAL;
        adv_params.timeout     = APP_ADV_TIMEOUT_IN_SECONDS;
    
        err_code = sd_ble_gap_adv_start(&adv_params);
        APP_ERROR_CHECK(err_code);
        nrf_gpio_pin_set(ADVERTISING_LED_PIN_NO);
    }
    
    ...
    
    
  • Thanks! But have you tried it? Doesn't seem to work for me. Looking at the code, you are missing a couple of bytes from the beginning of the advertising payload if I'm not mistaken:

    http://stackoverflow.com/questions/18906988/what-is-the-ibeacon-bluetooth-profile

Reply Children
No Data
Related