3

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.

17
  • are you sure this has anything to do with Apple ?
    – Ruskes
    Commented Nov 10, 2018 at 16:02
  • @Buscar웃 Well screen is apple command Commented Nov 10, 2018 at 16:15
  • great, so you can tell us what Mac and what OSX
    – Ruskes
    Commented Nov 10, 2018 at 16:31
  • @Buscar웃 It's Mac OS Mojave Commented Nov 10, 2018 at 16:40
  • check the information on the Incoming port ls /dev/cu.* this will tell you if your driver is working
    – Ruskes
    Commented Nov 10, 2018 at 16:41

2 Answers 2

2

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 
0

I suggest you download Bluetooth Explorer as part of the 'Additional Tools for Xcode' package that's available (registration required) at

https://developer.apple.com/download/more/

Go to that link, then search for 'Additional', and find the Additional Tools package for the latest version of Xcode (you don't actually need Xcode installed to use the Bluetooth Explorer app!).

That will allow you more in depth BT analysis and information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .