tile_tdi_module.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /**
  2. * NOTICE
  3. *
  4. * Copyright 2020 Tile Inc. All Rights Reserved.
  5. * All code or other information included in the accompanying files ("Tile Source Material")
  6. * is PROPRIETARY information of Tile Inc. ("Tile") and access and use of the Tile Source Material
  7. * is subject to these terms. The Tile Source Material may only be used for demonstration purposes,
  8. * and may not be otherwise distributed or made available to others, including for commercial purposes.
  9. * Without limiting the foregoing , you understand and agree that no production use
  10. * of the Tile Source Material is allowed without a Tile ID properly obtained under a separate
  11. * agreement with Tile.
  12. * You also understand and agree that Tile may terminate the limited rights granted under these terms
  13. * at any time in its discretion.
  14. * All Tile Source Material is provided AS-IS without warranty of any kind.
  15. * Tile does not warrant that the Tile Source Material will be error-free or fit for your purposes.
  16. * Tile will not be liable for any damages resulting from your use of or inability to use
  17. * the Tile Source Material.
  18. *
  19. * Support: firmware_support@tile.com
  20. */
  21. /** @file tile_tdi_module.h
  22. ** @brief Tile Device Information Module. Provides TileLib Device specific information and unique numbers.
  23. */
  24. #ifndef TILE_TDI_MODULE_H_
  25. #define TILE_TDI_MODULE_H_
  26. #include <stdint.h>
  27. /**
  28. * Tile Device Information module.
  29. *
  30. * This module is used by Tile Lib to allow the Tile app to read some
  31. * information about the device in order to properly activate and authenticate
  32. * with the device.
  33. */
  34. struct tile_tdi_module
  35. {
  36. /**
  37. * Tile ID -- 64-bit identifier for Tile Nodes.
  38. * Example: {0x1a, 0x95, 0xd9, 0x97, 0xf0, 0xf2, 0x66, 0x07}.
  39. */
  40. uint8_t *tile_id;
  41. /**
  42. * BLE MAC address -- 48-bit number. Points to the MAC address advertised Over The Air.
  43. */
  44. uint8_t *bdaddr;
  45. /**
  46. * Firmware Version -- 10 8-bit ASCII characters (null terminaison accepted but not required)
  47. * Format: "xx.xx.xx.x"
  48. * Example: "02.00.00.0"
  49. */
  50. char *firmware_version;
  51. /**
  52. * Model Number -- 10 8-bit ASCII characters (null terminaison accepted but not required)
  53. * Format shall follow the following pattern: "XXXX YY.YY" with the following constraints:
  54. * - "XXXX" uses 4 ASCII letters ('A' to 'Z') to describe the Vendor ID.
  55. * - The Vendor ID is assigned by Tile.
  56. * - A space character after "XXXX".
  57. * - "YY.YY" uses 4 ASCII numbers ('0' to '9') and describes the Model ID.
  58. * Example: "TEST 00.00".
  59. */
  60. char *model_number;
  61. /**
  62. * Hardware Revision -- 5 8-bit ASCII characters (null terminaison accepted but not required)
  63. * The character pattern is "YY.YY" and uses 4 ASCII numbers ('0' to '9').
  64. * Example: "01.00".
  65. */
  66. char *hardware_version;
  67. /**
  68. * Serial Number -- (TOA_MPS-1) bytes
  69. */
  70. uint8_t *serial_num;
  71. };
  72. /**
  73. * Register the TDI module with Tile Library.
  74. */
  75. int tile_tdi_register(struct tile_tdi_module *module);
  76. #endif // TILE_TDI_MODULE_H_