GATT服务器问题 [英] GATT Server Questions
问题描述
您好
我刚刚开始将一个简单的服务从BLED加密狗移动到新的Windows 10 GATT服务器,并且出现了一些问题。
I have just started moving a simple service from a BLED dongle to the newish Windows 10 GATT Server and a few questions came up.
- 我可以很好地设置我的服务,但是想要操纵广告包,特别是向其添加制造商数据并更改本地名称。
- 我希望不仅在特征获得订阅时以及在建立连接/断开连接时得到通知
- 我想要为了一次只连接/订阅一个用户,我可以跟踪订阅但是想拒绝连接/订阅。 GattSession.Close()似乎缺失
- 我正在使用nRF Connect测试我的服务并看到奇怪的行为。一旦我连接,我就不再看广告了。如果我断开连接,我仍然不会再看到它,并且必须重新启动我的应用程序才能显示。根据AdvertisementStatusChanged
广告不应该停止或出现故障。 - 如果我断开客户端连接,我就不会触发SubscribedClientsChanged。我必须先取消订阅。这让我忘记订阅的客户端,如果一个人失败(例如电池或崩溃)
如果有人对我有一些答案会很好:)
Would be great if someone has some answers for me :)
推荐答案
喜欢吸烟鱼ps,
Hi smokingfish ps,
感谢您在此发帖。
>> 我可以很好地设置我的服务,但是想要操纵广告包,特别是添加
制造商数据并更改本地名称。是否可以或计划在未来更新?
您可以在UserVoice上传您的要求。支持团队将考虑您的需求。
You could upload you requirement on UserVoice. The support team will consider what you want.
Microsoft UserVoice https:/ /microsoftteams.uservoice.com/forums/555103-public
Microsoft UserVoice https://microsoftteams.uservoice.com/forums/555103-public
>> 我希望不仅在特征获得订阅时得到通知但是当连接/断开连接
时
当你连接/断开连接时,你可以拨打电话 SubscribedClientsChanged
event。
When you get connection/disconnection, you could call SubscribedClientsChanged event.
>> 我想一次只有一个用户连接/订阅,我可以跟踪订阅但是想要
拒绝连接/订阅。 GattSession.Close()似乎缺失
我建议您可以制作一个列表来记录用户,然后做出判断。如果有多个用户可以做某事。
I suggest that you could make a list to record the user, and then make a judgement. If there is more than one user to could do something.
>> 如果我断开客户端连接,我不会触发SubscribedClientsChanged。我必须先取消订阅。如果一个人失败(例如电池或崩溃),这会让我失去对订阅客户的追踪
你可以制作在断开与取消订阅之前提醒消息。
You could make a remind like message before disconnect to unsubscribe.
最好的问候,
Wendy
这篇关于GATT服务器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!