我可以让我的 BLE 设备作为 Eddystone Beacon 进行广播。它使用“ http://www.cypress.com ”广播 Eddystone URL。现在我想将该 URL 更改为特定于国家/地区的扩展,例如"---.com.tr"
这是 Eddystone 协议的 GitHub 源代码。它没有提供有关使用特殊 URL 扩展的任何线索。你知道如何实现它吗?
这也是我项目中的代码片段:
cyBle_discoveryData.advData[13] = 0x00; /* URL scheme- http://www. */
cyBle_discoveryData.advData[14] = 0x63; /* Encoded URL - 'c' */
cyBle_discoveryData.advData[15] = 0x79; /* Encoded URL - 'y' */
cyBle_discoveryData.advData[16] = 0x70; /* Encoded URL - 'p' */
cyBle_discoveryData.advData[17] = 0x72; /* Encoded URL - 'r' */
cyBle_discoveryData.advData[18] = 0x65; /* Encoded URL - 'e' */
cyBle_discoveryData.advData[19] = 0x73; /* Encoded URL - 's' */
cyBle_discoveryData.advData[20] = 0x73; /* Encoded URL - 's' */
cyBle_discoveryData.advData[21] = 0x00; /* Expansion - .com */
/* ADV packet length */
cyBle_discoveryData.advDataLen = 22;