本文介绍了SensorTag 2 CC2650不确定地发布固件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用SensorTag 2,以便它坐在那里,从打开它的时间到(如果我曾经关闭过的话)广播它的数据(并且可以通过蓝牙进行关键连接).开箱即用,标签设置为仅在蓝牙上宣传几分钟,这意味着当连接最终失败或当连接到标签的设备启动等时,如果不物理访问标签并进行重置,您将无法再次连接它.

I want to use a SensorTag 2 so that it is sitting there broadcasting it's data (and, critically connectable over bluetooth) from when it's turned on to when\if I ever turn it off. Out of the box, the tag is set to only advertise over Bluetooth for a few mins which means that when the connection eventually fails or when the device connected to the tag boots etc etc you can't connect again without physically visiting the tag and resetting it.

我看到myWeatherCenter人们创建了一种固件,它通过将标签设置为无限期地发布,从而使该标签可以用作气象站...尽管他们的固件只是sensortag版本1,但令人沮丧的是:-(

I see there is firmware that the myWeatherCenter people have created that lets the tag work as a weather station by basically setting it to advertise indefinitely... frustratingly though their firmware is only the sensortag version 1 :-(

我已经研究了数月之久,没有任何回报..暗示没有其他人想要这个,有一个非常简单的解决方案,其他人都知道还是...?我什至看不到其他人真的在问这个问题……这令人担忧.是否有人拥有为sensortag 2设置此设置的固件文件,或者是否知道如何修改固件以设置此设置?

I've researched on and off for months and months now and nothing coming back.. suggesting either nobody else wants this, there is a really simple solution everyone one else knows about or ...? I can't even see anyone else asking this question really... which is worrying.Does anyone have a firmware file that sets this setting for the sensortag 2 or know how to modify the firmware to set this setting?

推荐答案

绝对有可能更改SensorTag 2/CC2650平台,使其行为适合您的用例.我-例如-当前使用的是自定义固件,对SensorTag上的传感器读数进行预处理,并无限期直接在广告消息中直接发送数据(当然,您必须调整间隔和有效负载才能获得不错的电池寿命).

It is definitely possible to change the SensorTag 2/CC2650 platform so that its behavior suits your use case. I - for example - currently use a custom firmware doing pre-processing of sensor readings on the SensorTag and sending data directly in the advertisement message indefinitely (of course you have to tweak intervals and payload to get a decent battery life).

我假设您手边有CCS和源(SensorTagApp和SensorTagStack)?

I assume you have CCS and the sources (SensorTagApp and SensorTagStack) at hand?

我建议先刷新当前的SensorTagStack(如果尚未完成的话)(尽管我自己还没有使用2.2).

I recommend flashing the current SensorTagStack first, if not done yet (though I'm not yet on 2.2 myself).

在应用程序"下的"SensorTagApp"项目中,找到"SensorTag.c".在其中,您应该更改:

In the SensorTagApp project under Application you find SensorTag.c. In there you should change:

#define DEFAULT_DISCOVERABLE_MODE             GAP_ADTYPE_FLAGS_LIMITED

#define DEFAULT_DISCOVERABLE_MODE             GAP_ADTYPE_FLAGS_GENERAL

这是通常的建议,可能已经解决了问题.

This is the usual advise and might already do the trick.

在固件中,我也进行了更改(在SensorTag.c中的SensorTag_init函数中):

In my firmware I also changed (in SensorTag.c, in the SensorTag_init function):

uint16_t advertOffTime = 0;

uint16_t advertOffTime = 1;

请尝试这些更改,然后再次与我联系.如果那还不够,我将对库存固件和我的自定义固件进行更彻底的比较.我还建议更具体的 ti蓝牙低能耗论坛.

Please try these changes and get back to me. If that wasn't enough I will do a more thorough comparison of the stock firmware and my custom firmware. I also recommend the more specific ti Bluetooth low energy forum.

这篇关于SensorTag 2 CC2650不确定地发布固件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 16:46