What baud rate should I set for bluetooth TTY to Xbox controllers?

I'm trying to do screen tty.Bluetooth-Incoming-Port 9600 on my mac, but I'm not sure about my baud rate. How can I determine this? It's just giving me a "Cannot open line" error.

I'm trying to view output from an Xbox controller.


Solution 1:

What baud rate should I set when using screen tty for Bluetooth?

Baud rate isn't dependent on how you connect to a serial console whether it be via bluetooth or hardwire. It has to do with how fast the host (in this case the XBox controller) is sending bits through the UART (Universal Asynchronous Receiver Trasmitter)

What matters here is that you match the two UART settings with the XBox controller. Those settings are:

  • Baud (bit rate)
  • Serial Port Parameters
    • Data bits
    • Parity bits
    • Stop bits

Baud is the speed at which you're going to transfer data. Common values are 9,600, 28.8K, 56K, or 115.2K (or more commonly as known 115,200). Your XBox console will likely be either 9600 or 115200.

The Serial Port Parameters (or "Configuration") defines how each block of data is to be send/received. This must match or you will get garbled info. Common values are:

  • 8-N-1 or "eight-none-and-one" for 8 data bits, no parity bits, and 1 stop bit
  • 7-E-1 or "seven-even-and-one" for 7 data bits, an even number of logical ones, and 1 stop bit

TL;DR

To launch screen and set your communication parameters, use the following syntax:

$ screen <device> [speed],[config]

(You can get the device name by listing the contents of /dev/cu.* after you plug in the Bluetooth serial adapter)

So, in your case, assuming 9600 baud and 8N1 configuration, use the command:

$ screen /dev/cu.usbserialdevice 9600,cs8