问题描述
在TI的SensorTag的侧面按钮是pressed,配对与设备是可进行约2-3分钟。你如何修改SensorTag固件,使其永远做广告和pressing侧面按钮是没有必要每次都?
When the side button of the TI SensorTag is pressed, pairing with a device is possible for approx. 2-3 minutes. How do you modify the SensorTag's firmware so that it advertises forever and pressing the side button is not necessary every time?
你如何上传固件iOS设备,所以无需使用CC-调试?
And how do you upload the firmware with an iOS device, so without using CC-debugger?
推荐答案
我怎么做的,与克里斯Innanen的帮助(谢谢!)
How I did it, with help of Chris Innanen (thanks!!)
如果你在Mac上,您将需要一个Windows虚拟机。
You will need a Windows virtual machine if you do it on a Mac.
-
下载的IAR Embedded Workbench为8051(<一个href=\"http://supp.iar.com/Download/SW/?item=EW8051-EVAL\">http://supp.iar.com/Download/SW/?item=EW8051-EVAL).确保采取30天的评估副本,而不是4K有限。
Download IAR Embedded Workbench for 8051 (http://supp.iar.com/Download/SW/?item=EW8051-EVAL). Make sure to take the 30-day evaluation copy and not the 4k limited.
从德州仪器()和一个Windows(虚拟)机上安装它。默认情况下,安装程序将安装在这里:C:\\德州仪器\\ BLE-CC254x-1.4.0 \\项目\\ BLE \\ SensorTag \\ CC2541DB \\ SensorTag.eww
Download BLE-STACK from Texas Instruments (http://www.ti.com/tool/ble-stack) and install it on a Windows (virtual) machine. By default, the installer will install here: "C:\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\SensorTag\CC2541DB\SensorTag.eww".
与打开的IAR Embedded Workbench这个SensorTag.eww文件。
Open this SensorTag.eww file with IAR Embedded Workbench.
在下拉菜单上的工作空间部分中,选择CK2541DK传感器-OAD-IMGA左
Select "CK2541DK-Sensor-OAD-ImgA" in the dropdown menu in the "workspace" section on the left
要prevent一个编译错误以后:转到项目 - >选项...和虚拟寄存器数的值更改为16〜8
To prevent a compiling error later on: go to Project -> Options... and change the value for "Number of virtual registers" from 16 to 8.
在左边的工作区部分文件树查找SensorTag.c:SensorTag - CK2541DK传感器-OAD-IMGA / APP / SensorTag.c
Find "SensorTag.c" in the filetree in the workspace section on the left: "SensorTag - CK2541DK-Sensor-OAD-ImgA/APP/SensorTag.c"
搜索GAP_ADTYPE_FLAGS_LIMITED并将其更改为GAP_ADTYPE_FLAGS_GENERAL使indefinit广告
Search for GAP_ADTYPE_FLAGS_LIMITED and change it to GAP_ADTYPE_FLAGS_GENERAL to enable indefinit advertising
请与项目的生成 - >进行。等到它完成
Make the build with Project -> Make. Wait until it's done
默认情况下,新版本的固件(.bin文件)现在在C:\\德州仪器\\ BLE-CC254x-1.4.0 \\项目\\ BLE \\ SensorTag \\ CC2541DB \\ CC2541DK-SENSOR-OAD- IMGA \\ Exe文件(确保在某处放置它,你可以从Mac OS X后到达它,如果你使用的虚拟机)
By default, the new firmware image (.bin file) is now in "C:\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\SensorTag\CC2541DB\CC2541DK-Sensor-OAD-ImgA\Exe" (Make sure to place it somewhere you can reach it from Mac OS X later, if you use a virtual machine)
重复步骤4至10,但现在CC2541DK-SENSOR-OAD-IMGB
Repeat steps 4 to 10, but now for "CC2541DK-Sensor-OAD-ImgB"
现在得到应用上传了空气中的新固件。在这里获得:<一href=\"https://itunes.apple.com/us/app/ti-sensortag/id552918064?mt=8\">https://itunes.apple.com/us/app/ti-sensortag/id552918064?mt=8
Now get the app to upload the new firmware over the air. Get it here: https://itunes.apple.com/us/app/ti-sensortag/id552918064?mt=8
打开iTunes在Mac OS X和打开您的iOS设备,进入应用程序部分,滚动到页面底部看到与文件共享的可能性的应用程序。 SensorTag应该是在该列表中。点击它,并添加了两个新的固件文件,影像都A和B。
Open iTunes in Mac OS X and open your iOS device, go to the 'Apps' section, scroll to the bottom to see the apps with filesharing possibilities. "SensorTag" should be in that list. Click on it and add the two new firmware files, both Image A and B.
如果这样做了,打开你的iOS设备上的应用程序SensorTag并将其连接到SensorTag。然后在应用内点更新FW的底部 - >选择FW文件 - >共享文件>,然后点击图片B和上传。它需要几分钟的时间。 A型固件已经在你的SensorTag默认。因为你已经把它B图像就在刚才,有什么新的变化,你需要上传图像的。
If that's done, open the SensorTag app on your iOS device and connect it to the SensorTag. Then in the bottom of the app tap "Update FW" -> "Select FW file" -> Shared Files > And then tap Image B and upload it. It takes a few minutes. A firmware with type A is already on your SensorTag by default. Because you've put a B Image on it just now, with any new changes you would need to upload an Image A.
祝你好运!
1)找到HCI_EXT_ClkDivOnHaltCmd,你会后添加一个新行(和可选的注释):
// 加成的调整发射功率电平
HCI_EXT_SetTxPowerCmd(HCI_EXT_TX_POWER_0_DBM);
1) Find "HCI_EXT_ClkDivOnHaltCmd" and you'll add a new line (and optional comment) after it: // ADDITION Adjust TX power level HCI_EXT_SetTxPowerCmd( HCI_EXT_TX_POWER_0_DBM );
1b)中,您可以更改_0_DBM到_4_DBM或_MINUS_6_DBM或_MINUS_23_DBM以及
1b) You can change "_0_DBM" to "_4_DBM" or "_MINUS_6_DBM" or "_MINUS_23_DBM" as well
2)找到GAP_ADTYPE_POWER_LEVEL,改变下一行的值以匹配上面的功率电平
2) Find "GAP_ADTYPE_POWER_LEVEL" and change the value on the next line to match the above power level
这篇关于如何修改TI SensorTag固件无限期做广告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!