为UsbDeviceConnection设置波特率

问题描述 投票:5回答:2

我正在尝试使Android USB主机模式工作;但是我需要将波特率设置为56000。我只找到以下代码:

UsbDeviceConnection myConnection;
myConnection.controlTransfer(0x40, 0x03, 0x4138, 0, null, 0, 0);//baudrate 9600

在参考文献中,我没有发现任何有关此的内容。

非常感谢!

android usb baud-rate
2个回答
1
投票

显示的命令包含波特率除数。计算波特率的一个很好的解释是(此处)[http://www.mev.co.uk/pages/Support/USB-Baud-Spoof.html]


0
投票

此链接中有一个计算USB波特率的函数:Changing USB Baud Rate from 9600 to 115200 on Android

© www.soinside.com 2019 - 2024. All rights reserved.