Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setting baud rate for UsbDeviceConnection

I am trying to get Android USB host mode to work; but I need to set the baud rate to 56000. I only found this code:

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

In the references I did not find anything about this.

Many thanks!

like image 818
user387184 Avatar asked Nov 14 '22 13:11

user387184


1 Answers

The command shown contains the baud rate divisor. A good explanation for the calculation of baud rates is (here)[ http://www.mev.co.uk/pages/Support/USB-Baud-Spoof.html ]

like image 168
starbolin Avatar answered Nov 16 '22 02:11

starbolin