PIC32蓝牙
我想在我的期末学士项目中实现蓝牙通信,但我有很多疑问。
该项目的先决条件之一是拥有一个可以通过蓝牙与微型计算机通信的 Java 应用程序。经过大量研究后,我发现了一个我认为 SPP 配置文件非常好的解决方案,但我仍然对它有很多疑问:
PC 上的所有蓝牙都实现了 SPP 配置文件堆栈吗?
如果您需要开发一个在每台实现 SPP 堆栈的 PC 上运行的 Java 应用程序,您会怎么做?
我们首先尝试使用 BlueCove 和 JavaBluetooth.org API,第一个运行良好,但我不知道它是否仅在我的电脑上,第二个发送错误(堆栈未初始化)。您会使用哪一个,为什么?
我们决定从 Sparkfun 购买这个蓝牙模块,对于那些有任何评论的人已经使用了吗?
谢谢
I want to implement bluetooth communication on my final bachelor project, but I'm having a lot of doubts.
One of the requisites of this project is to have a Java application that can talk to the micro via Bluetooth. After a lot of research, I've found one that I think it's very good with a SPP profile, but I still have a lot of questions about it:
All the bluetooth on a PC implements the SPP profile stack?
If you need to develop a Java application that runs on every PC that implements the SPP stack, how would you do it?
We started by trying to use BlueCove and JavaBluetooth.org API, the first one runs great but I don't know if it's just on my PC and the second one sends an error (Stack not initialized). Which one would you use, and why?
We decided to buy this bluetooth module, from Sparkfun, any comments for those of you who already use it?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在 Sparkfun (RN-41) 的高级设计项目中使用了类似的产品:http://www.sparkfun .com/products/10559
它开箱即用,作为一个简单的 UART。这使得我和我的团队能够开发一个简单的 C# 应用程序,该应用程序使用 .NET SerialPort 类 (System.IO.Ports) 在 MSP430 和我们正在开发的 PC 应用程序之间进行通信。如果您只关心流数据,那么这些蓝牙模块效果很好。 Java 为 RS-232 通信实现了类似的 SerialPort 类。不要忘记蓝牙是为了取代串行电缆而开发的。
我希望这个答案有帮助!祝你好运。
I used a similar product for my senior design project from Sparkfun (RN-41): http://www.sparkfun.com/products/10559
It worked right out of the box as a simple UART. This allowed my team and I to develop a simple C# application that used the .NET SerialPort class (System.IO.Ports) to communicate between an MSP430 and the PC application we were developing. If streaming data is all you care about, these Bluetooth modules work great. Java implements a similar SerialPort class for RS-232 communications. Don't forget that Bluetooth was developed to replace a serial cable.
I hope this answer helps! Good luck.
我亲自实现了使用 Sparkfun 的 bluesmirf 设备与我自己的 Java 应用程序(一个 Eclipse 插件)进行通信。我在 Windows、MacOS 和 Windows 下测试成功。基于Linux 的系统。
蓝牙设备配对后,我使用 RXTX Java 库 连接到相应的串行端口。在 Linux 下,我什至实现了配置 rfcomm 以根据需要自动配对蓝牙设备。
从我的实验中,我遇到了一些稳定性问题...有时,即使给定端口存在,它也无法连接到该端口,或者拒绝重新连接。有时它会挂起整个系统......
我从未找到任何好的解决方案来解决那些似乎完全依赖于系统的问题。如果有人能够正确使用它,我会很感兴趣......
I personnally achieved to use the Sparkfun's bluesmirf devices to communicate with my own Java application (an Eclipse plug-in). I tested it successfully under Windows, MacOS & Linux based systems.
I used the RXTX Java library to connect to the corresponding serial port once the Bluetooth devices were paired. Under Linux I even achieved to configure rfcomm to automatically pair the Bluetooth devices on demand.
From my experiment I encountered some stability issues... Sometimes it simply fails to connect to the given port even if it exists or refuse to reconnect on it. Sometimes it hangs the whole system...
I never found any good solution to fix those issues that seems to be completely system dependent. I would be interested if any one achieved to use it properly...