You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • As I understand it, the maximum data you can send in a Bluetooth advertising packet is something like 31 bytes - that's 47.

    However you're on the right track. Copying the middle bit of the data (with a change to the flags as we don't support normal Bluetooth modes) should work:

    var d = [0x02, // Number of bytes that follow in first AD structure
    0x01, // Flags AD type
    0x04, // Flags value 0x1A = 000011010  
    //   bit 0 (OFF) LE Limited Discoverable Mode
    //   bit 1 (OFF) LE General Discoverable Mode
    //   bit 2 (ON) BR/EDR Not Supported
    //   bit 3 (OFF) Simultaneous LE and BR/EDR to Same Device Capable (controller)
    //   bit 4 (OFF) Simultaneous LE and BR/EDR to Same Device Capable (Host)
    0x1A, // Number of bytes that follow in second (and last) AD structure
    0xFF, // Manufacturer specific data AD type
    0x4C, 0x00, // Company identifier code (0x004C == Apple)
    0x02, // Byte 0 of iBeacon advertisement indicator
    0x15, // Byte 1 of iBeacon advertisement indicator
    0xe2, 0xc5, 0x6d, 0xb5, 0xdf, 0xfb, 0x48, 0xd2,
    0xb0, 0x60, 0xd0, 0xf5, 0xa7, 0x10, 0x96, 0xe0,// iBeacon proximity uuid
    0x00, 0x00, // major 
    0x00, 0x00, // minor 
    0xc5]; // The 2's complement of the calibrated Tx Power
    NRF.setAdvertising(d, {interval:100});
    

    However I don't have an BLE-capable iDevice here to test this with.

About

Avatar for Gordon @Gordon started