ble

(BLE) CC2640R2 SPI驱动(基于TI Drivers) 注意点

喜欢而已 提交于 2019-12-07 15:45:12
系统升级功能需要 把内部flash数据发送到外部flash做备份等操作。 注意,内部flash起始地址为0,和NULL是一样的, 因此在使用驱动接口的时候,对于第一个page的flash,会当作NULL处理, 这就引发bug,SPI驱动会认为TX-BUF为NULL而使用默认的0x00作为填充数据! 所以对于这个特别的page,先拷贝到ram再发送到驱动层, 且注意,不要使用memcpy,因为也会进行NULL判断。 按照如下方式(代码来自upgrade.c) //then copy the first page /****************************************************** Caution!!!! The fisrt flash page start addr is 0 !!! That is the same as NULL!!!! so copy to ram buffer first!!! DO NOT use memcpy!! ******************************************************/ do{ uint8_t buff[4]; pSrc = (const uint8_t*)INTFLASH_BLE_APP_ADDR; dstAddr=extFlashAddr; ((uint32

react native 的 ble 蓝牙开发

梦想的初衷 提交于 2019-12-07 15:18:23
react native 的蓝牙开发基本还没有人介绍,经过摸索终于有了收获 这里介绍android平台下的蓝牙开发 在Android平台下创建BleManagerModule,BleManagerPackage,这个只是react native基础的交互说明,具体参考: http://facebook.github.io/react-native/docs/native-modules-android.html 把接口react native和android接口调用弄通,然后把蓝牙相关代码加入,这个就不介绍了,就是在加蓝牙的时候出现的bug,下面是解决方法 这里需要执行,在node.js下 react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --sourcemap-output android/app/src/main/assets/index.android.map --assets-dest android/app/src/main/res/ 不然会报错误,具体参考 http://blog.csdn.net/b992379702b

(BLE) CC2640R2 BIM下 SPI接口驱动能力问题

不羁的心 提交于 2019-12-07 02:05:10
Demo(示例代码)提供的bim工程使用sFlash,其spi接口上只挂载了这一个外设,因此没问题。 但实际项目,有2个spi外设,这样需要考虑spi接口驱动能力。 因此如下代码必须添加在SPI初始化接口中: //MUST add these code, //this makes spi multiply devices drive capbility IOCIOPortPullSet(BSP_SPI_MISO,IOC_IOPULL_DOWN); IOCIODrvStrengthSet(BSP_SPI_MOSI,IOC_CURRENT_8MA,IOC_STRENGTH_MAX); IOCIODrvStrengthSet(BSP_SPI_CLK_FLASH,IOC_CURRENT_8MA,IOC_STRENGTH_MAX); 1,分别表示需要给MISO接口进行下拉处理,否则其波形会有问题(当外设为高阻态时候) 2,CLK和MOSI必须设置最大的驱动能力。 在APP程序中,使用了TI的中间层, 实现文件《SPICC26XXDMA.c》里的 SPICC26XXDMA_initIO 函数, 可以看到驱动能力已经初始化为了为 PIN_DRVSTR_MED。 这样在app程序里面挂2个外设可以没有问题。 但是最好设置为max.因为一定几率下会出现问题。 来源: oschina 链接:

蓝牙BLE: 蓝牙(BLE)协议栈

随声附和 提交于 2019-12-06 12:18:21
蓝牙协议是通信协议的一种,一般而言,我们把某个协议的实现代码称为协议栈(protocol stack), BLE协议栈就是实现低功耗蓝牙协议的代码 ,理解和掌握BLE协议是实现BLE协议栈的前提。当前的蓝牙协议分为基础率/增强数据率(BR/EDR)和低耗能(LE)两种技术类型,本文将重点介绍BLE(Bluetooth Low Energy)。 1、BLE低功耗蓝牙协议栈框架 要实现一个BLE应用,首先需要一个支持BLE射频的芯片,然后还需要提供一个与此芯片配套的BLE协议栈,最后在协议栈上开发自己的应用。可以看出BLE协议栈是连接芯片和应用的桥梁,是实现整个BLE应用的关键。那BLE协议栈具体包含哪些功能呢?简单来说,BLE协议栈 主要用来对你的应用数据进行层层封包,以生成一个满足BLE协议的空中数据包,也就是说,把应用数据包裹在一系列的帧头(header)和帧尾(tail)中 。 蓝牙协议规定了两个层次的协议,分别为蓝牙核心协议(Bluetooth Core)和蓝牙应用层协议(Bluetooth Application)。蓝牙核心协议关注对蓝牙核心技术的描述和规范,它只提供基础的机制,并不关心如何使用这些机制;蓝牙应用层协议,是在蓝牙核心协议的基础上,根据具体的应用需求,百花齐放,定义出各种各样的策略,如FTP、文件传输、局域网等等。 而蓝牙核心协议(Bluetooth Core

简单链接Simplelink 传感器标签SensorTag

蓝咒 提交于 2019-12-04 17:39:52
传感器标签现在支持 iBeacon技术 为了让你的传感器标签升级到与iBeancon技术兼容,你需要和苹果公司签约一个iBeacon许可,然后你可以请求访问软件,通过点击这里 http://www.ti.com/tool/sensortag-sw 一旦你签署了iBeancon许可你可以将传感器标签升级到最新的iBeancon,可以使用火线来测试并用iBeacon开发 怎么做升级和配置iBeacon,根据以下链接 http://processors.wiki.ti.com/index.php/SensorTag_with_iBeacon 蓝牙智能是一个新的标准,可以允许蓝牙设备在一个电池上运行数年。根据IMS的研究,蓝牙智能配件市场是增长最快的移动手机配件市场在未来几年里。这项新技术集成了新的低能耗传感器,许多移动手机应用开发者为移动手机应用开发了没有限制的机会。 传感器标签可以将蓝牙应用开发的设计时间从数月缩短至数小时,该工具删除了对 对那些想利用数量在递增的低能耗智能手机和平板的开发者 的限制。这是第一个 解决无线传感器应用 的蓝牙低能耗开发工具,是对智能手机应用开发者的唯一开发工具。 蓝牙传感器标签已经证明了蓝牙的低能耗能力(aka蓝牙4.0和蓝牙智能) * 不需要嵌入式软件设计知识 * 不需要嵌入式编译知识 * 包括6个低能耗MEMS(微电子机械系统

android -------- 蓝牙Bluetooth

懵懂的女人 提交于 2019-12-04 17:39:38
什么是蓝牙? 也可以说是蓝牙技术。所谓蓝牙(Bluetooth)技术,实际上是一种短距离无线电技术,是由爱立信公司公司发明的。利用“蓝牙”技术,能够有效地简化掌上电脑、笔记本电脑和移动电话手机等移动通信终端设备之间的通信,也能够成功地简化以上这些设备与因特网Internet之间的通信,从而使这些现代通信设备与因特网之间的数据传输变得更加迅速高效,为无线通信拓宽道路。 Android 4.3(API Level 18)开始引入Bluetooth Low Energy(BLE,低功耗蓝牙)的核心功能并提供了相应的 API, 应用程序通过这些 API 扫描蓝牙设备、查询 services、读写设备的 characteristics(属性特征)等操作。 Android BLE 使用的蓝牙协议是 GATT 协议,有关该协议的详细内容可以参见 蓝牙官方文档 。以下我引用一张官网的图来大概说明 Android 开发中我们需要了解的一些 Bluetooth Low Energy 的专业术语。 Android提供BluetoothAdapter类蓝牙通信。通过调用创建的对象的静态方法getDefaultAdapter()。其语法如下给出。 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); 首先需要AndroidManifest

BluezV5.42 DBUS C API for BLE?

匿名 (未验证) 提交于 2019-12-03 09:02:45
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have developed BLE application for openwrt using BLUEZV5.30 . I was able to create the application by extracting source code gatttool and hcitool . I have also added few more functionality then provided by these tools (like reading rssi ). However, i have upgraded my bluez stack to 5.42 and i am planning to use DBUS interface for all BLE related operations. The functionality i want: Reading RSSI Connecting and Disconnecting Bonding Pairing Deleting Bonding information Discovery Scanning Advertising Write/Reading to Characteristics

Android BLE startDiscovery() callback is not fired even with Location permissions

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: The app is targeted to 22 with minimum version 18 and works as expected on Lollipop. Starting Marshmallow apps need to require 'fine' and 'coarse' permissions for BLE. I've added them but the callback is not fired. AndroidManifest: ... < uses - feature android : name = "android.hardware.bluetooth_le" android : required = "true" /> <!-- ble --> < uses - permission android : name = "android.permission.BLUETOOTH" /> < uses - permission android : name = "android.permission.BLUETOOTH_ADMIN" /> < uses - permission android : name =

Reading Bluetooth RSSI for BLE proximity profile in Android

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am currently developing Bluetooth Low Energy proximity profile for Android and I have stumbled upon an issue regarding RSSI. In order to make proximity profile work I have to receive RSSI data with already connected device every short period. As I did some research I understand it is possible to get Bluetooth RSSI during device discovery. That doesn't work for me as the slave device doesn't advertise after connection. The other way round is digging down to HCI level and using BlueZ. It seems to be pretty low level. Has anyone had any

Android stops finding BLE devices: onClientRegistered() - status=133 clientIf=0

匿名 (未验证) 提交于 2019-12-03 03:05:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am developing an app in which I can both find and configure BLE devices. I am using standard Android BLE API, but recently I've encountered some strange problems. When I turn on my app the BLE scan works OK. I am scanning using: mBluetoothAdapter.startLeScan(mLeScanCallback); // for Kitkat and below and mBluetoothAdapter.getBluetoothLeScanner().startScan(mScanCallback); // for Lollipop and above In the Logcat I am getting following messages (I guess this is important for this issue): D/BluetoothAdapter: onClientRegistered() - status=0