Bluetooth Sco Audio Drivers For Mac

Bluetooth Sco Audio Drivers For Mac 7,4/10 3439 reviews


NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Android Wireless Build and Porting Guide

Content is no longer maintained and is being kept for reference only!


Overview of Bluetooth Audio. There are two different Audio profiles implemented in Bluetooth. Which one to use depends on how you plan to use your headset. The 'sco' audio profile is a low quality, low latency connection. The sound quality is comparable to a cell phone. The poor sound quality is very noticeable when listening to music. You can't tell at a glance whether audio will play from the AirPods or your Mac's built-in speaker, you have to dig into a Bluetooth submenu to connect, and then.


This guide documents the steps to integrate Wireless SDK for WL1271 (WLAN and Bluetooth) into TI Android DevKit.

Bluetooth Sco Audio Drivers For Mac

Refer to TI-Android-FroYo-DevKit-V2.2 UserGuide or TI-Android-GingerBread-2.3-DevKit-1.0 UserGuide for instructions on using WLAN and Bluetooth from Android environment


Important
The following instructions are for TI-Android-FroYo-DevKit-V2.2 and TI-Android-GingerBread-2.3-DevKit-1.0 only. For instructions regarding newer versions of TI Android DevKit refer to the respective Porting Guide.



  • 5Porting guide
    • 5.1Project: device/ti/omap3evm
      • 5.1.3init.rc
    • 5.2Project: system/bluetooth

Prerequisites

  • TI Android DevKit sources (TI-Android-FroYo-DevKit-V2.2 or TI-Android-GingerBread-2.3-DevKit-1.0)
  • OMAP3EVM (AM37x) revG board with wireless module

Build android for omap3evm (am37x) target<syntaxhighlight>$ cd $ROWBOAT$ make TARGET_PRODUCT=omap3evm OMAPES=5.x</syntaxhighlight>The android kernel supplied with the devkit is already patched to include support for WL1271 WLAN and Bluetooth on AM37x.

Ensure that the kernel is built for omap3evm before proceeding.

Building wireless drivers

  • Download WL1271_Linux_SDK 3_00_01_06 package from http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/ecs/WL1271_Linux_SDK/3_00_01_06/index_FDS.html
  • Install the SDK

<syntaxhighlight>$ chmod a+x V3.00.01.06-WL6.1.6.0-Linux-x86-Install$ ./V3.00.01.06-WL6.1.6.0-Linux-x86-Install --mode console</syntaxhighlight>The installer will confirm that the SDK will be installed. Enter 'Y' to continue.The default installation path is ~/V3.00.01.06-WL6.1.6.0. Accept the default by pressing Enter.

The SDK is installed. Continue with extracting the SDK sources.<syntaxhighlight>$ cd V3.00.01.06-WL6.1.6.0/software$ tar xvzf OMAP35x_WL1271_6.1.0.0.144.tar.gz</syntaxhighlight><syntaxhighlight>$ cd MS_TI_OMAP35x_WL1271_6.1.0.0.144/MS_TI_WL1271_Sources</syntaxhighlight>

  • Download the Android patch package WL1271Android-patches.tar.gz from http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/TI_Android_DevKit/02_02_00/index_FDS.html and install as follows

<syntaxhighlight>tar xvzf WL1271Android-patches.tar.gz -C V3.00.01.06-WL6.1.6.0/software/MS_TI_OMAP35x_WL1271_6.1.0.0.144/MS_TI_WL1271_Sources</syntaxhighlight>Copy the files WLAndroidBuild.sh and wl1271-android.patch into MS_TI_WL1271_Sources directory if the files are extracted into a subdirectory.

  • Go to the build directory (if not already done)

<syntaxhighlight>$ cd V3.00.01.06-WL6.1.6.0/software/MS_TI_OMAP35x_WL1271_6.1.0.0.144/MS_TI_WL1271_Sources</syntaxhighlight>

  • Update the $ROWBOAT_ROOT_PATH variable in WLAndroidBuild.sh with the correct path to rowboat android sources
  • Build wlan drivers

<syntaxhighlight>$ ./WLAndroidBuild.sh build wlan</syntaxhighlight>

Installing wireless drivers

  • After build is complete, the drivers are copied into image/WL1271_demo_01/wlan directory. Copy them into the android filesystem

<syntaxhighlight>$ cp image/WL1271_demo_01/wlan/tiwlan_drv.ko $ROWBOAT/out/target/product/omap3evm/system/etc/wifi$ cp image/WL1271_demo_01/wlan/tiwlan.ini $ROWBOAT/out/target/product/omap3evm/system/etc/wifi$ cp image/WL1271_demo_01/wlan/firmware.bin $ROWBOAT/out/target/product/omap3evm/system/etc/wifi</syntaxhighlight>Note: Do not copy wpa_supplicant.conf file

  • Copy the Bluetooth firmware

<syntaxhighlight>$ mkdir -p $ROWBOAT/out/target/product/omap3evm/system/lib/firmware$ cp common/BT_firmware/TIInit_7.2.31.bts $ROWBOAT/out/target/product/omap3evm/system/lib/firmware$ cp common/tools/wl1271bt_enable $ROWBOAT/out/target/product/omap3evm/root</syntaxhighlight>

Proceed with creating the roofs tar file as per instructions in the Android DevKit User Guide. See the step Prepare the root filesystem

WLAN Calibration

To generate the WLAN calibration NVS file, follow steps listed below. These are based on the steps given here.

  • Enable WLAN from Android UI. Ensure that the driver is loaded by checking the messages on the serial console.
  • Start the wireless configuration utility wlan_cu on the serial console and enter the commands as follows
Text to be entered on the console is in red colour.
  • Copy the generated nvs_map.bin to /system/etc/wifi
  • Modify wlan_loader service in init.rc as follows:

With the new settings, when WLAN is enabled, the following log is seen on the console

Porting guide

This section describes the changes done in Android to enable WLAN and Bluetooth on AM37x.

For convenience, the changes are categorized on the basis of the android project in which the changes appear.

Project: device/ti/omap3evm

BoardConfig.mk

  • WL1271 WLAN is enabled in android with the following settings in BoardConfig.mk

The setting BOARD_WLAN_DEVICE := wl1271 enables building of android components required to support the WL1271 WLAN including the firmware loader. Test apps etc.

  • Bluetooth is enabled with the following setting in BoardConfig.mk

omap3evm.mk

  • Additional settings to copy the permission settings xml files for WLAN and Bluetooth

init.rc

For
  • Set owner/group and permissions for various files required to run WLAN and Bluetooth
  • Setup services for WLAN and Bluetooth
WLAN

The following services are registered in init.rc for WLAN operation:

  • wlan interface tiwlan0
  • wlan_loader - This service loads the WLAN firmware in WL1271
  • wpa_supplicant
  • dhcpcd
Bluetooth

The following services are registered in init.rc for Bluetooth operation:

  • dbus
  • bluetoothd
  • hciattach - This service attaches the BT UART HCI interface to the bluetooth stack. It is also responsible for loading the BT firmware on WL1271. Specify the UART device node the bluetooth module is interfaced to and the baudrate. On omap3evm the settings are /dev/ttyS1 and 3000000 baud.
  • btpwr - This service runs the wl1271bt_enable app to power-on/power-off the BT module in WL1271. See Bluedroid section below for more information. This is not required if your kernel supports rfkill interface to power on/off the BT module.
  • opush - BT Object Push Profile
  • hfag and hsag - Audio Gateway service for Hands-free profile, Headset profile. This feature is available only on Gingerbread release of TI Android DevKit

Project: system/bluetooth

Bluedroid

Mac mass mailer activation code. Bluedroid is used by Android UI to enable/disable Bluetooth. It uses the linux kernel rfkill infrastructure for this.The current kernel supplied with TI Android DevKit does not support rfkill, hence bluedroid is modified to use the wl1271bt_enable app provided with the Wireless SDK.The wl1271bt_enable app is registered as a service named btpwr in init.rc.

Refer the sources for Bluedroid at system/bluetooth/bluedroid for implementation.

Project: external/bluetooth/bluez

patch for TI-specific hciattach tool

Changing visited link color in chrome for mac. If you have a visual impairment, some colors may also be harder to distinguish. Unfortunately, some website owners specify the same color for both types of links, which can be confusing. The color depends on the settings of the person who created the page. Different colors for clicked and unvisited hyperlinks make it easier to see at a glance which pages you have already viewed. When you click a hyperlink in a browser such as Google Chrome, the color of the link changes.

Project: kernel

The kernel patch from the Wireless SDK is applied to the TI Android DevKit kernel sources. This adds WLAN and BT support for AM37x evm revG.

The following kernel configs are enabled for WLAN:

The following kernel configs are enabled for Bluetooth support:

The following kernel configs are enabled for Bluetooth AVRCP support:

Project: hardware/ti/omap3

Note: The following information applies to TI-Android-GingerBread-2.3-DevKit-1.0 release only.

ALSA HAL is modified to add the Bluetooth SCO audio device. The correct device name is returned when android requests to use Bluetooth SCO device.

File: modules/alsa/alsa_module.cpp


Refer to the sources for implementation details.

Bluetooth SCO Audio

Note: The following information is for TI-Android-GingerBread-2.3-DevKit-1.0 and is not valid for earlier releases.

This section provides additional information on audio over SCO link. This is used in Bluetooth Headset profile or Handsfree profile (BT HSP/HFP).

The kernel patch from Wireless SDK creates an additional audio device for bluetooth.

It is possible to use alsa utilities to record/play audio on bluetooth directly once SCO connection with the headset is established. Use BluetoothSCOApp application to establish SCO link with an active Bluetooth headset.

To play audio on bluetooth headset over SCO

Only 16-bit, 8kHz PCM audio (wav format) is supported for bluetooth audio over sco.

You can use the Android Sound Recorder or Voice Recorder application to record audio.

  • Sound Recorder app saves the audio in 3gp format. This audio file cannot be played over SCO. However regular analog audio out and A2DP can be used for playback
  • Voice Recorder app saves audio in wav format. When it is configured to save in 16-bit, 8kHz PCM format, the resulting file can be played over SCO with alsa_aplay as shown above.
Retrieved from 'https://processors.wiki.ti.com/index.php?title=Android_wireless_build_and_porting_guide&oldid=217921'


VirtualBox guest OS doesn’t recognize Bluetooth adapter by default. Here is how to enable the built in Bluetooth adapter for Ubuntu guest on Windows host. OS and the version I used are below.

Host: Windows 10
Guest: Ubuntu 16.04

I tested the steps with Microsoft Surface Pro 4 and Dell Precision 3510.

Here is the list of contents of this post.

Contents
– Assumptions
– Steps
1. Disable Bluetooth Adapter on Windows
2. Launch Ubuntu Linux
3. Enable Bluetooth Adapter on Windows
4. Enable Bluetooth Adapter on Ubuntu (Guest)
5. Verify
– Reference

Assumptions
There are some prerequisites before starting the steps.

  • Windows PC with Bluetooth Adapter
  • Ubuntu installed as VirtualBox guest OS and running on Windows PC
  • VirtualBox Guest Additions installed on Ubuntu guest OS

Steps
1. Disable Bluetooth Adapter on Windows
1-1. Launch “Device Manager” (right-click on Windows icon at left bottom corner, then select “Device Manager”)

1-2. Disable Bluetooth adapter (right-click on your Bluetooth device and select “Disable device”)

2. Launch Ubuntu Linux
2-1. Launch “Oracle VM VirtualBox”.

2-2. Select your Ubuntu guest and click on “Start” icon on “Oracle VM VirtualBox Manager” window.

3. Enable Bluetooth Adapter on Windows
3-1. Go back to Device Manager, enable the Bluetooth adapter. (right-click on the Bluetooth device and select “Enable device”)

4. Enable Bluetooth Adapter on Ubuntu (Guest)
4-1. In “Oracle VM VirtualBox” window, select “Devices” > “USB” from the top menu bar.

4-2. Then, select Bluetooth adapter to enable.

5. Verify
5-1. Check if Bluetooth is enabled on Ubuntu by typing the command below.

If everything is fine, you should be able to see something like below. Be sure it says “UP RUNNING” (Line 4 in the example below).

2
4
6
8
10
12
14
16
hci0:Type:BR/EDR Bus:USB
BD Address:xx:xx:xx:xx:xx:xx ACL MTU:1021:7SCO MTU:240:3
RX bytes:1039acl:0sco:0events:54errors:0
Features:0xff0xfe0x8f0xfe0xdb0xff0x7b0x87
Link policy:RSWITCH HOLD SNIFF
Name:'vm'
Service Classes:Rendering,Capturing
HCI Version:4.0(0x6)Revision:0x8300
Manufacturer:Marvell Technology Group Ltd.(72)

Reference
– How To Install Ubuntu Linux On Windows 10 In 24 Steps
https://www.lifewire.com/install-ubuntu-linux-windows-10-steps-2202108

lessonslaserq.netlify.app© 2020