玩转Light Blue之添加设备信息
生活随笔
收集整理的這篇文章主要介紹了
玩转Light Blue之添加设备信息
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
項目終于快結項了,閑下時間重新掰回light blue 。
Light Blue中的ADVERTISEMENT DATA,的所有信息都定義在 advertData和scanRspData中,只是獲取的方式不一樣罷了,一個是在廣播時獲取,一個是得到的掃描信息。
在Light Blue掃描到外設時,會出現0 Server,1 Server 。。。?
是因為advertData中的
添加服務項在advertData中 0x03, // length of this dataGAP_ADTYPE_16BIT_MORE, // some of the UUID's, but not allLO_UINT16( SIMPLEPROFILE_SERV_UUID ),HI_UINT16( SIMPLEPROFILE_SERV_UUID ),
static const uint8 devInfoModelNumber[] = "Model Number";// Serial Number String characteristic static uint8 devInfoSerialNumberProps = GATT_PROP_READ; static const uint8 devInfoSerialNumber[] = "Serial Number";// Firmware Revision String characteristic static uint8 devInfoFirmwareRevProps = GATT_PROP_READ; static const uint8 devInfoFirmwareRev[] = "Firmware Revision";// Hardware Revision String characteristic static uint8 devInfoHardwareRevProps = GATT_PROP_READ; static const uint8 devInfoHardwareRev[] = "Hardware Revision";// Software Revision String characteristic static uint8 devInfoSoftwareRevProps = GATT_PROP_READ; static const uint8 devInfoSoftwareRev[] = "Software Revision";// Manufacturer Name String characteristic static uint8 devInfoMfrNameProps = GATT_PROP_READ; static const uint8 devInfoMfrName[] = "Manufacturer Name";
雖然不知道light blue 到底是什么時候接到的消息,不過能顯示出來就行了~
總結
以上是生活随笔為你收集整理的玩转Light Blue之添加设备信息的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C# 索引器简介
- 下一篇: unraid win10_搞定unrai