安卓4.0.4 BLE API,博通 - 摩托罗拉 [英] Android 4.0.4 BLE API, BroadCom - Motorola

查看:211
本文介绍了安卓4.0.4 BLE API,博通 - 摩托罗拉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

荫工作的一个保健项目大气压。我们正在测试的设置,我们使用摩托罗拉RAZR最大与Android 4.0.4作为网关。这款手机的BLE将与IT一个BLE芯片进行通信。 之所以挑选摩托罗拉RAZR MAXX是因为它有它上市 <一href="http://processors.wiki.ti.com/index.php/Category%3aBluetoothLE?DCMP=blestack&HQS=ble-wiki#Smart_Phone_-_Applications_and_examples"相对=nofollow>链接! 根据该手机支持BLE。

Iam working on a HealthCare project atm. we are making a test setup where we use a Motorola Razr Max with android 4.0.4 as Gateway. The phone's BLE will communicate with a BLE Chip from IT. The reason for picking a Motorola Razr maxx was because IT had it listed on a link! under which phones supported BLE.

不过,但摩托罗拉的Andr​​oid 4.0的升级dosnt工作BLE API。

But but Motorola's BLE API from android 4.0 upgrade dosnt work.

我也曾尝试在手机上博通BLE API - 但它不是由手机BLE芯片的支持 - 所以我没有得到票价此处

I have also tried BroadComs BLE API on the phone - but it isnt supported by the phones BLE chip - so I didnt get fare here.

所以,我在这里问。 你会建议我在这里做什么?

So my Question here. what will you suggest I do from here ?

不要ü知道任何Android手机,其中Broadcom的API,我在安卓4.0.4工作 - 它说,宏达电1× - 有一个工作的BLE API - ?有any1能试了一下

Do u know any android phones where Broadcoms API i working in android 4.0.4 - IT says the HTC 1 X - have a working BLE API - Have any1 tried it ?

做任何人,如果摩托罗拉即将与bug修复? (摩托罗拉Developmer支持团队在丹麦 - 不知道在乎有自己的软件/硬件)

Do anyone if motorola is coming with the bug fixes? (The Motorola Developmer support team in Denmark - dont know shit about there own software/hardware.)

------更新--------

荫试图让摩托罗拉的工作 - 现在它不失败的BLE支持=大:)

Iam trying to get the Motorola to work - and now it dont fail the BLE support = Great :)

荫使用Motorola_ICS_R2 API。 但是,当我运行配置文件样本 - 它不会编译 - 因为_ BluetoothDevice.ACTION_GATT BluetoothDevice.EXTRA_GATT 是什么荫失踪之前,我可以运行的样品?

Iam using the Motorola_ICS_R2 API. But when I run the profile sample - it will not compile - because of _ BluetoothDevice.ACTION_GATT and BluetoothDevice.EXTRA_GATT what is it Iam missing before I can run the Profile Sample?

推荐答案

在这里,你会发现你需要与摩托罗拉RAZR的ICS(冰淇淋三明治)的工作库和示例。寻找摩托罗拉手机SDK扩展中心摩托罗拉ICS R2

Here you'll find the libraries and examples you need to work with a Motorola Razr on ICS (Ice Cream Sandwich). Look for " Motorola Handset SDK Addons " and " Motorola ICS R2 ".

该插件自带的两个例子,你必须自己研究它们,没有实际的API的文档在那里,但正确的解释API如何运作的,你会发现的这里

The Addon comes with two examples, you have to study them yourself, there is no actual API-documentation out there, but a proper explanation how the API works you'll find here.

我可以向你保证的API的例子工作比较细跟的 TI的CC2540DVK 的密钥卡和摩托罗拉RAZR(XT910)的。所有你需要做的就是照顾即将使用有效的UUID的!

I can assure you the API-examples work relatively fine with TI's CC2540DVK Keyfob and a Motorola Razr (XT910). All you have to do is to take care about to use valid UUID's!

...更新...

新的开始的Eclipse(靛蓝) Android的SDK(V20)摩托罗拉ICS R2 示例:

Fresh start in Eclipse (Indigo) with Android SDK (v20) and Motorola ICS R2 sample:

  1. 在包资源管理器(右键)==>导入==>现有的Andr​​oid code进入工作区
  2. 根目录:... \ Motorola_ICS_R2 \样本\ Motorola_BLE_profile_sample(复制到工作区)
  3. 在项目(右键)==>属性==> Java构建路径/库==>删除所有jar的,甚至是Android利布斯
  4. 在Java构建路径/库==>添加外部JAR:... \ Motorola_ICS_R2 \库\ BluetoothGatt.jar&放大器; BluetoothGattService.jar
  5. 在项目(右键)==>安卓工具==> 修复项目属性
  6. 现在选择您的传感器设备的现有主要业务,即 0x180A (设备信息):

  1. In Package Explorer (right click) ==> Import ==> Existing Android Code Into Workspace
  2. Root Directory: ...\Motorola_ICS_R2\samples\Motorola_BLE_profile_sample (copy into workspace)
  3. On Project (right click) ==> Properties ==> Java Build Path/Libraries ==> remove ALL jar's even the Android Libs
  4. In Java Build Path/Libraries ==> Add External Jars: ...\Motorola_ICS_R2\libs\BluetoothGatt.jar & BluetoothGattService.jar
  5. On Project (right click) ==> Android Tools ==> Fix project properties
  6. Now choose an existing primary service of your sensor device, i.e. 0x180A (Device Information):

公共静态最终ParcelUuid人力资源管理= ParcelUuid     .fromString(0000180A-0000-1000-8000-00805f9b34fb);

public static final ParcelUuid HRM = ParcelUuid .fromString("0000180A-0000-1000-8000-00805f9b34fb");

构建和运行

这取决于你的传感器设备,你走多远的样品,但你至少应该获得一个连接并得到一些特点。查看LogCat中输出。

It depends on your sensor device how far you get with the sample, but you should at least get a connection and get some characteristics. See the LogCat output.

问候,
PeterVanPansen

Regards,
PeterVanPansen

这篇关于安卓4.0.4 BLE API,博通 - 摩托罗拉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆