修改蓝牙聊天样品code与非Android设备连接 [英] Modify Bluetooth Chat Sample Code to connect with non-Android Devices

查看:148
本文介绍了修改蓝牙聊天样品code与非Android设备连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提出一个应用程序的基础上的官方Android开发人员网站给出的示例蓝牙聊天。我的应用程序正常工作,同时与其他Android手机聊天。但是,它并没有,当我把它连接到非Android设备(即我的球队已经取得了一定的电子电路)的工作。 互联网研究表明,样品code只是意味着在两个Android设备进行通信。 那么,我该如何改变样品code,使其与其他非Android设备正常工作。

I am making an App based on the Sample Bluetooth Chat given on the Official Android Developer website. My App works fine whilst chatting with another Android Phone. However, it does not work when I connect it to a non-Android Device (namely some electronic circuit that my team has made). Internet Research has shown that the Sample Code is only meant to communicate between two Android Devices. So, how do I change the Sample Code to make it work with other non-Android Devices as well.

推荐答案

我想出答案通过分析BlueTerm应用程序的源 - code。实际上,我只需要改变,我是在App从 fa87c0d0-afac-11de-8a39-0800200c9a66 设置为 00001101-0000-的UUID 1000-8000-00805F9B34FB

I figured out the Answer through analysing the source-code of the BlueTerm App. Effectively, I only needed to change the UUID that I was setting in the App from fa87c0d0-afac-11de-8a39-0800200c9a66 to 00001101-0000-1000-8000-00805F9B34FB"

我不是这方面的专家,所以我不能说,为什么是这样的话,但它确实有助于解决我的问题。该BlueTerm来源$ C ​​$ C可在 Pymasde 的官方下载网站

I'm not an expert on this area so I can't say WHY that is the case, but it does help solve my problem. The BlueTerm SourceCode is available on Official Download Website of Pymasde

这篇关于修改蓝牙聊天样品code与非Android设备连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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