att_delayed_response.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // att_delayed_response.h generated from ../../example/att_delayed_response.gatt for BTstack
  2. // it needs to be regenerated when the .gatt file is updated.
  3. // To generate att_delayed_response.h:
  4. // ../../tool/compile_gatt.py ../../example/att_delayed_response.gatt att_delayed_response.h
  5. // att db format version 1
  6. // binary attribute representation:
  7. // - size in bytes (16), flags(16), handle (16), uuid (16/128), value(...)
  8. #include <stdint.h>
  9. const uint8_t profile_data[] =
  10. {
  11. // ATT DB Version
  12. 1,
  13. // 0x0001 PRIMARY_SERVICE-GAP_SERVICE
  14. 0x0a, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x28, 0x00, 0x18,
  15. // 0x0002 CHARACTERISTIC-GAP_DEVICE_NAME-READ
  16. 0x0d, 0x00, 0x02, 0x00, 0x02, 0x00, 0x03, 0x28, 0x02, 0x03, 0x00, 0x00, 0x2a,
  17. // 0x0003 VALUE-GAP_DEVICE_NAME-READ-'Delayed Response'
  18. // READ_ANYBODY
  19. 0x18, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x2a, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
  20. // 0x0004 PRIMARY_SERVICE-GATT_SERVICE
  21. 0x0a, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x28, 0x01, 0x18,
  22. // 0x0005 CHARACTERISTIC-GATT_DATABASE_HASH-READ
  23. 0x0d, 0x00, 0x02, 0x00, 0x05, 0x00, 0x03, 0x28, 0x02, 0x06, 0x00, 0x2a, 0x2b,
  24. // 0x0006 VALUE-GATT_DATABASE_HASH-READ-''
  25. // READ_ANYBODY
  26. 0x18, 0x00, 0x02, 0x00, 0x06, 0x00, 0x2a, 0x2b, 0x14, 0x24, 0x60, 0x9a, 0xb5, 0x4b, 0x79, 0x3c, 0xc7, 0xe4, 0x37, 0x67, 0x2d, 0x2f, 0x39, 0x27,
  27. // Some Service
  28. // 0x0007 PRIMARY_SERVICE-0000FF10-0000-1000-8000-00805F9B34FB
  29. 0x18, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x28, 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x10, 0xff, 0x00, 0x00,
  30. // Some Characteristic, with read and write
  31. // 0x0008 CHARACTERISTIC-0000FF11-0000-1000-8000-00805F9B34FB-READ | WRITE | DYNAMIC
  32. 0x1b, 0x00, 0x02, 0x00, 0x08, 0x00, 0x03, 0x28, 0x0a, 0x09, 0x00, 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x11, 0xff, 0x00, 0x00,
  33. // 0x0009 VALUE-0000FF11-0000-1000-8000-00805F9B34FB-READ | WRITE | DYNAMIC-''
  34. // READ_ANYBODY, WRITE_ANYBODY
  35. 0x16, 0x00, 0x0a, 0x03, 0x09, 0x00, 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x11, 0xff, 0x00, 0x00,
  36. // END
  37. 0x00, 0x00,
  38. }; // total size 99 bytes
  39. //
  40. // list service handle ranges
  41. //
  42. #define ATT_SERVICE_GAP_SERVICE_START_HANDLE 0x0001
  43. #define ATT_SERVICE_GAP_SERVICE_END_HANDLE 0x0003
  44. #define ATT_SERVICE_GATT_SERVICE_START_HANDLE 0x0004
  45. #define ATT_SERVICE_GATT_SERVICE_END_HANDLE 0x0006
  46. #define ATT_SERVICE_0000FF10_0000_1000_8000_00805F9B34FB_START_HANDLE 0x0007
  47. #define ATT_SERVICE_0000FF10_0000_1000_8000_00805F9B34FB_END_HANDLE 0x0009
  48. //
  49. // list mapping between characteristics and handles
  50. //
  51. #define ATT_CHARACTERISTIC_GAP_DEVICE_NAME_01_VALUE_HANDLE 0x0003
  52. #define ATT_CHARACTERISTIC_GATT_DATABASE_HASH_01_VALUE_HANDLE 0x0006
  53. #define ATT_CHARACTERISTIC_0000FF11_0000_1000_8000_00805F9B34FB_01_VALUE_HANDLE 0x0009