Hi,
我正在向现有的Linux IOT集线器应用程序添加对DA14585(库存多传感器固件版本)的支持。我一直在阅读Doc“Da14585 IoT MultiSensor开发套件软件参考应用程序”,但仍有一些问题。雷竞技安卓下载简而言之,我尝试使用Linux“bluetoothctl”应用程序来获得温度通知工作,但没有运气。在研究论坛中,虽然似乎可能存在带有Linux Bluez软件的错误(或者至少可能已经过去)了一些错误。或者,虽然我只能将错误的命令发送到传感器(完全可能)。无论如何,无论我做什么,我似乎都没有从任何特征获取通知我启用它们(包括我只能读取的“wrbl_dws_control_reply_char”)。下面的任何速度是我的问题 -
1) To just enable temperature notifications what I'd guessed from the doc and doing some research was that I would -
A) enable notifications for "wrbl_dws_control_reply_char"
b)将配置字符串写入“WRBL_DWS_CONTROL_CHAR”以启用TEMP传感器
(I sent "0x0A 0x08 0x03 0x06 0x03 0x06 0x00 0x02 0x0A 0x00 0x01 0x00 0x00 0x00 0x05")
c)启用“WRBL_DWS_TEMP_CHAR”的通知
D) possibly send a "start" command (0x01) to "wrbl_dws_control_char"?
- I've tried many combinations of these with no luck
2) On Page 39, in the "DWSv2 characteristics" table, the description field of the "wrbl_dws_temp_char" reads "Temperature Report. Legacy DWS compatibility, not used." Does that mean this characteristic should not be used? Do we use only "wrbl_dws_multi_sens_char" instead?
3)Start命令(0x01到“wrbl_dws_control_char”)确切地说是什么?第71页,它读取“修改后的设置将在下一个启动命令后应用”。这是否意味着在每次写入“WRBL_DWS_CONTROL_CHAR”之后,您需要使用start命令跟进?这似乎不太可能,但我无法找到其他描述。
Anyway, sorry for the long questions, hopefully this will get me going and I'll know one way or another if it's something I'm doing wrong or if there is still an issue with bluez.
Thx, Tal

嗨乌米,
Thanks for your post. Let me check your issue and I will get back to you as soon as possible.
谢谢,PM_DIALOG.
Great, thank you. And if you need any additional info to clarify my questions please let me know...
嗨乌米,
你能让我知道温度noti吗fications are not enabled only when you are using the linux bluez software? Did you tried it with one other application? Did you try the IoT Multi Sensor mobile application? Probably, this might be an issue from the bluez side, but let me check it further.
谢谢,PM_DIALOG.
Sorry, I guess I wasn't clear... I'm not trying to say there is anything wrong with the sensor, I'm pretty sure it's fine. More than anything I guess the main question is, from a developer's standpoint, what sequence of commands need to be sent to which characteristics to get the sensor to start sending temperature notifications? Just very basically, assuming a stock sensor/firmware that has been just turned on and connected to, what do I need to do next? From my original post what I tried was -
1) enable notifications for "wrbl_dws_control_reply_char"
2) write a configuration string to "wrbl_dws_control_char" to enable the temp sensor
(I sent "0x0A 0x08 0x03 0x06 0x03 0x06 0x00 0x02 0x0A 0x00 0x01 0x00 0x00 0x00 0x05")
3) enable notifications for "wrbl_dws_temp_char"
4) possibly send a "start" command (0x01) to "wrbl_dws_control_char"?
它不起作用(没有收到任何类型的通知或回复)。应该工作,还是我错过了一些步骤?如果我知道它应该工作,那么我必须假设它是一个蓝色问题,否则希望你能给我一个应该有效的序列。
Thanks again!
我认为我会回来并回答一些可能发生的人的一些问题......首先,由于任何原因Bluez似乎有一个问题,传感器谈判较大的MTU比旧的BLE最大值。我不确定它是否是一个蓝色的错误,或者传感器正在不正确的东西,但我有两个来自不同制造商的较新传感器,这些传感器显示出相同的行为。以任何速度,由于新的Bluez“获取”DBus接口返回MTU,我刚刚拍摄了一个随机拍摄并尝试了它(而不是正常的startnotify接口),并开始通知。所以这是我没有得到数据的原因的一部分。此外,根据我的第二个问题,您只能通过“wrbl_dws_multi_sens_char”来获取数据(或者至少仅为ME工作)。所以,标有“遗留DWS兼容性的条目”。不应该使用。他们可能不会被记录(或至少更好地解释)。就正确的顺序而言,我仍然没有真正确定,但是从试验和错误看起来它首先为wrbl_dws_control_reply_char和wrbl_dws_multi_sens_char特征启用通知。然后将命令类型“0x0a”写入wrbl_dws_control_char,以配置要启用/接收的任何传感器,然后写入“0x01”start命令(也向WRBL_DWS_CONTROL_CHAR编写)。
Again, I'm not really sure this is exactly correct but it seems to be working so it's a starting point for anyone else using the bluez/d-bus api/library. If there's anything anyone can add, correct, or clarify that'd be great. All of this so far is really just from trial and error (a lot of error actually)...
嗨乌米,
Thanks for your feedback and your indications.
谢谢,PM_DIALOG.
好吧,再次,只是为了任何人else that comes across this. There's some weird behavior in the bluez bluetoothctl interactive line command with the DA14585 but happily you don't have to use the AcquireNotify interfaces after all. When you use the line command if you enable notifications using "notify on" and then do the writes to start getting notifications you won't get anything unless... you follow the last write command with a "select-characteristic" command and select the characteristic you wanted notifications from. Then they magically start. So a bug possibly in the line command or some sensor behavior they don't expect/support. Regardless, the good news is that once I worked out the commands I needed to send, in my bluez based app everything worked as expected. My app uses all the same d-bus calles that bluetoothctl does so not sure why it works but it does so... again, just following up for anyone else having similar issues in the future.