通过蓝牙连接 Android 设备并向计算机发送数据?
有什么方法可以通过蓝牙将数据从 Android 设备发送到计算机吗?
谢谢
Is there some way I can send data from an Android device to a computer over Bluetooth?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。也许最直接的入门方法是使用蓝牙聊天示例,您希望可以在 SDK 安装的 Samples 目录中找到该示例,当然也可以从 Google 下载该示例。
蓝牙聊天演示了通过蓝牙串行端口配置文件 (SPP) 从一台 Android 设备到另一台设备交换数据字节。
要在 Android 设备和计算机之间交换数据,您可以使用计算机上的蓝牙驱动程序,该驱动程序在远程蓝牙 SPP 设备连接时为您提供虚拟 COM 端口。这样,您可以简单地在 Android 设备上启动蓝牙聊天,并与可读写计算机上 COM 端口的设备交换数据。例如,在 Windows 计算机上,您可以简单地使用超级终端。
蓝牙聊天示例是创建您自己的自定义蓝牙 Android 应用程序的绝佳基础。
Yes. Perhaps the most straightforward way to get started would be to use the Bluetooth Chat example, which you will hopefully find in the Samples directory of your SDK installation, or can of course be downloaded from Google.
The Bluetooth Chat demonstrates exchanging bytes of data from one Android device to another over the Bluetooth Serial Port Profile (SPP).
To exchange data between the Android device and your computer, you could use a Bluetooth driver on your computer that provides you with a virtual COM port when a remote Bluetooth SPP device connects. This way, you could simply launch Bluetooth Chat on your Android device, and exchange data with something that reads and writes to a COM port on your computer. For example, on a Windows machine you could simply use HyperTerminal.
The Bluetooth Chat example is then an excellent base upon which to create your own custom Bluetooth Android application.