如何使用灯塔两款Android设备之间传输数据? [英] How to transfer data between two Android devices using Beacon?

查看:303
本文介绍了如何使用灯塔两款Android设备之间传输数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用航标两款Android设备之间发送文本数据。我使用Android的蓝牙低功耗API开发应用程序。但我卡在读取数据。

I am trying to send text data between two Android devices using beacon. I am using Android Bluetooth Low Energy APIs to develop the application. But i am stuck in reading the data.

每当我试图设置值的特点,其他设备无法接收数据。特征的GetValues​​返回null。

Whenever i am trying to set Values to the Characteristics , the other device not able to receive the data. The Characteristics getValues return null.

我已经问<一个href=\"http://stackoverflow.com/questions/35903325/android-ble-characteristics-getvalue-returns-null/\">this在其他线程问题中的#1 即可。不过还是我再次传达我的查询以图形格式。

I have already asked this question in other thread in Stackoverflow. But still again i am conveying my queries in Graphical format.

在这里输入的形象描述

这是上面的图像,说明了情况。

This is the above image which explains the scenario.

请建议我一些解决方案和技术来解决我的问题。

Please suggest me some solution and technique to resolve my issue.

推荐答案

最灯塔设备仅通过广告数据包发送报文和不接受的连接。 (这个名字的一种暗示的)一些航标设备允许你连接到他们修改他们发送该消息,但我不认为有任何灯塔设备,使其他设备的邮件中继连接。

Most "Beacon" devices only transmit messages via advertising packets and don't accept connections. (The name kind of hints at this) Some beacon devices allow you to connect to them to modify the message they're transmitting, but I don't think there's any Beacon devices that make connections to other devices to relay messages.

所以,虽然你可以连接到信标设置一个消息,灯塔会再发送该消息作为一个公共广播,任何设备可以拿起。但同样,大多数灯塔设备只发送一个固定的code,它不能改变。

So, while you may be able to connect to the Beacon to set a message, the Beacon will then send that message as a public broadcast that any device can pick up. But again, most Beacon devices only transmit a fixed code that can't be altered.

这篇关于如何使用灯塔两款Android设备之间传输数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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