你好,
I'm adding support for the DA14585 (stock multi-sensor firmware version) to an existing Linux IoT hub application. I've been reading the doc "DA14585 IoT Multisensor Development Kit Software Reference Applications" but still have some questions. In short, I tried using the linux "bluetoothctl" app to get temperature notifications working but have had no luck. In researching it in the forum though it seems that there may be some bug(s) with the linux bluez software (or at least there may have been in the past). Alternatively though I could just be sending the wrong commands to the sensor (entirely possible). Regardless, as it currently stands no matter what I do I don't seem to get notifications from any characteristic I enable them for (including "wrbl_dws_control_reply_char" which I can only read). At any rate below are my questions -
1)只需启用温度通知我猜到了DOC和做一些研究的情况是我会的 -
a)启用“wrbl_dws_control_reply_char”的通知
B) write a configuration string to "wrbl_dws_control_char" to enable the temp sensor
(我发送“0x0a 0x08 0x03 0x06 0x03 0x06 0x00 0x02 0x0a 0x00 0x01 0x00 0x00 0x00 0x05”)
C) enable notifications for "wrbl_dws_temp_char"
d)可能将“start”命令(0x01)发送到“wrbl_dws_control_char”?
- 我已经尝试过许多与运气的组合
2)在第39页,在“DWSv2特性”表中,“WRBL_DWS_TEMP_CHAR”读取“温度报告的描述字段。传统DWS兼容性,未使用。”这是否意味着不应该使用这种特性?我们只使用“wrbl_dws_multi_sens_char”吗?
3)Start命令(0x01到“wrbl_dws_control_char”)确切地说是什么?第71页,它读取“修改后的设置将在下一个启动命令后应用”。这是否意味着在每次写入“WRBL_DWS_CONTROL_CHAR”之后,您需要使用start命令跟进?这似乎不太可能,但我无法找到其他描述。
无论如何,对不起很长的问题,希望这会让我走向我,如果它是我做错的话,或者如果仍然存在蓝兹的问题,那么我会知道一种方式。
thx,tal.

Hi omniot,
谢谢你的帖子。让我检查你的问题,我会尽快回复你。
Thanks, PM_Dialog
太好了谢谢。如果您需要任何其他信息来澄清我的问题,请告诉我...
Hi omniot,
你能告诉我,只有在使用Linux Bluez软件时才能启用温度通知吗?你用另一个应用程序尝试过吗?您是否尝试过IoT Multi Sensor移动应用程序?可能,这可能是蓝兹方面的问题,但让我进一步检查。
Thanks, PM_Dialog
对不起,我猜我不清楚......我不是想说传感器有什么问题,我很确定它很好。不仅仅是我猜的主要问题是,从开发人员的角度来看,需要发送哪些命令序列来获取传感器开始发送温度通知的特征?刚刚基本上,假设刚刚打开并连接的库存传感器/固件,接下来需要做什么?从我的原始帖子,我尝试了什么 -
1)启用“wrbl_dws_control_reply_char”的通知
2)将配置字符串写入“WRBL_DWS_CONTROL_CHAR”以启用TEMP传感器
(我发送“0x0a 0x08 0x03 0x06 0x03 0x06 0x00 0x02 0x0a 0x00 0x01 0x00 0x00 0x00 0x05”)
3)启用“WRBL_DWS_TEMP_CHAR”的通知
4)可能会将“start”命令(0x01)发送到“wrbl_dws_control_char”?
and it didn't work (no notifications or replies of any kind were received). Should that work, or am I missing some step(s)? If I know it should work then I'll have to assume it's a bluez issue, otherwise hopefully you can give me a sequence that should work.
再次感谢!
我想回头回答这些questions for anyone else that might come along... first, for whatever reason bluez seems to have a problem with sensors negotiating larger mtu's than the old ble max. I'm not sure if it's a bluez bug or something the sensors are doing incorrectly but I have two newer sensors from different manufacturers that are showing the same behavior. At any rate, since the new bluez "AcquireNotify" dbus interface returns the mtu I just took a random shot and tried it (as opposed to the normal StartNotify interface), and started getting notifications. So that was part of the reason I wasn't getting data. Additionally, as per my second question you can only get data via the "wrbl_dws_multi_sens_char" characteristic (or at least that only worked for me). So, the entries labeled "Legacy DWS compatibility, not used." should not be used. They probably shouldn't be documented either (or at least better explained). As far as the proper sequence, I'm still not really sure but from trial and error it appears you first enable notifications for the wrbl_dws_control_reply_char and wrbl_dws_multi_sens_char characteristics. Then write a command type "0x0A" to wrbl_dws_control_char to configure whatever sensors you want to enable/receive, and then write the "0x01" START command (also to wrbl_dws_control_char).
再次,我并不真正确定这是完全正确的,但它似乎正在运行,所以它是使用Bluez / D-Bus API /库的其他人的起点。如果有任何人可以添加,更正或澄清那么伟大的任何人。到目前为止,这一切都只是从审判和错误(实际上很多错误)......
Hi omniot,
感谢您的反馈和您的迹象。
Thanks, PM_Dialog
好吧,再次,只是为了遇到这个问题。Bluez Bluetoothctl Interactive Line命令中存在一些奇怪的行为,使用DA14585,但令人愉悦之后,您毕竟不必使用Acquirenotify接口。如果使用line命令,则使用“notify开启”启用通知然后执行要开始的写入通知,否则您将无法获取任何内容,除非...您使用“SELECT-CHARENTISTING”命令并选择最后一次写命令您想要通知的特征。然后他们神奇地开始。因此,可能在Line命令中或某些传感器行为中的错误,它们不希望/支持。无论如何,好消息是,一旦我制定了我需要发送的命令,在我的蓝Z基础的应用中,一切都按预期工作。我的应用程序使用Bluetoothctl的所有相同的D-Bus呼叫,所以不确定它为何工作,但它再次这样做......再次跟进未来其他任何问题的其他人。