Android的蓝牙串行/ RFCOMM / SPP,如何改变波特率? [英] Android Bluetooth Serial/RFCOMM/SPP, How to Change the BAUD RATE?

查看:2188
本文介绍了Android的蓝牙串行/ RFCOMM / SPP,如何改变波特率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是非常令人沮丧,因为我一直在尝试了几个星期,甚至没有一个在互联网上的线索。

This is very frustrating as I've been trying for weeks and not even a clue on the internet.

我正在读/项目写上不同的养殖硬件蓝牙串行数据。

I am working on a project that reads/writes bluetooth serial data on different farming hardware.

大多数的硬件是旧的和不断变化的波特率的最高人民检察院是不是一种选择。

most of these hardware are old and changing the baud rate of their SPP is not an option.

我使用的是Android的蓝牙聊天为基础,读/写,我只改变了UUID,以允许连接到设备我有

I'm using the android bluetooth chat as a basis to read/write, I've only changed the UUID to allow connection to the devices I have

我已经成功从标签读取器读取在19,200不良率精美,并格式化很好

I've managed to read from a tag reader at a bad rate of 19,200 beautifully, and formatted nicely

不过,我现在套牢其中有一个波特率9600,显示奇怪的字符在我的应用程序中的尺度,甚至还没有接近,应该来自秤的格式

However, I'm stuck now with the scales which has a baud rate of 9,600 and shows funny characters in my app, not even close to the format that should come from the scales

该项目已完成previously在旧的Windows Mobile和波特率可在他们的API进行更改

This project was done previously on a old Windows Mobile and baud rates could be changed in their API

有没有办法做到这一点在Android的还是我找错了树?

Is there a way to do this in Android or am I barking up the wrong tree?

推荐答案

presumably一些蓝牙到串行转换器附着到传统设备?如果是这样,你应该能够编写一次总是使用特定的比特率。然后就没有必要在蓝牙客户端设置比特率...

Presumably some Bluetooth to serial converter is attached to the legacy devices? If so you should be able to program it once to always use a particular bit rate. Then there would be no need for the Bluetooth client to set the bit rate...

这篇关于Android的蓝牙串行/ RFCOMM / SPP,如何改变波特率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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