|
|
|
# AnW_BT_SRV
|
|
|
|
|
|
|
|
AnW Bluetooth Service API, offered two sorts of releases
|
|
|
|
|
|
|
|
1. [APP Release (sta5_btsrv_sdk_*)](#run-app-on-targets-sta5_btsrv_app.zip) : executable **BTDemo**, launcher **btsrv_client.sh**, essentails libraries (**.so**), and App configures (**.xml**)
|
|
|
|
2. [SDK Release (sta5_btsrv_sdk_*)](#run-app-on-targets-sta5_btsrv_app.zip) : open source with **AnWBTServiceDemo.cpp**, imported essentials libraries (**.so**), header (**anwbtservice.h**), and App configures (**.xml**)
|
|
|
|
|
|
|
|
# RELEASE NOTE
|
|
|
|
20220429 [TAG:1.0.2.7](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.2.7)
|
|
|
|
1.Customer release
|
|
|
|
|
|
|
|
20220425 [TAG:1.0.1.44.sony.demo](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.44.sony.demo)
|
|
|
|
1.fix: TAMUL No audio output while toggle output device to "BT" from mobile
|
|
|
|
2.known & reopen : 0002015: TAMUL_07 outgoing call number is no info return
|
|
|
|
|
|
|
|
20220425 [TAG:1.0.1.42.sony.demo](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.42.sony.demo)
|
|
|
|
1.fix 0002009: TAMUL_01 Rapid connections has fail rate;
|
|
|
|
2.fix 0002010: TAMUL_02 PBAP download has fail rate
|
|
|
|
3.fix 0002013: TAMUL_05 API PBAP_INFO is failed return, when to phonebook transfer;
|
|
|
|
4.fix 0002015: TAMUL_07 outgoing call number is no info return;
|
|
|
|
5.fix 0002016: TAMUL_08 Rapidly Play/Pause switching, cause media info update delay update;
|
|
|
|
6.fix 0002017: TAMUL_09 The media information update is not regular;
|
|
|
|
|
|
|
|
20220412 [TAG:1.0.1.40.sony.demo](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.40.sony.demo)
|
|
|
|
1、modify HFP Audio Transfer;(issue6)
|
|
|
|
2、add telephone number type in struct AnWBTService_PBAP_TELEPHONE_DATA_S;(issue3)
|
|
|
|
3、fix issue "Part of name is cut off in the phonebook";(issue4)
|
|
|
|
|
|
|
|
20220406 [TAG:1.0.1.38.sony.demo](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.38.sony.demo)
|
|
|
|
1、modify the crash issue of AnWBTSRV_SetScanMode;
|
|
|
|
2、fix the issue of pair device failed;
|
|
|
|
|
|
|
|
20220401 [TAG:1.0.1.37.sony.demo](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.37.sony.demo)
|
|
|
|
|
|
|
|
1.add "song_id3_interval_ms" in btmonitor-config.xml, default 500ms;
|
|
|
|
2.Fix HFP 20sec delay issue. root course is SOC audio PCM is customized as slave mode by SI vendor.
|
|
|
|
|
|
|
|
[known issue] id3 issue by some phone brand
|
|
|
|
|
|
|
|
20220330 [TAG:1.0.1.28](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.28)
|
|
|
|
|
|
|
|
1.Add member pairingMethodSupported in struct AnWBTService_LocalDevInfo_S;
|
|
|
|
2.Modify functions:
|
|
|
|
AnWBTSRV_GetLocalDevInfo;
|
|
|
|
AnWBTSRV_GetAllPairedDeviceInfo
|
|
|
|
![Snipaste_2022-03-30_13-00-12](/uploads/5aa01088f1930dfbd817e95c06f466b6/Snipaste_2022-03-30_13-00-12.png)
|
|
|
|
|
|
|
|
20220318 [TAG:1.0.1.27](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.27)
|
|
|
|
1. modify demo add hfp audio flow
|
|
|
|
|
|
|
|
20220318 [TAG:1.0.1.26](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.26)
|
|
|
|
1. Provide AnWBTSRV_HFP_Enable_Audio_Flow function
|
|
|
|
|
|
|
|
20220317 [TAG:1.0.1.24](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.24)
|
|
|
|
1. Change CFG_HFPAG_PRESENT to 0.
|
|
|
|
|
|
|
|
20220315 [TAG:1.0.1.23](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.23)
|
|
|
|
1. Added HFP audio wrapper implementation for Tamul platform.
|
|
|
|
2. Enable I2S setting in anwbt.h.
|
|
|
|
|
|
|
|
20220303 [TAG:1.0.1.22](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.22)
|
|
|
|
1. Fixed Marvell DSPMgr NBS mode did not working.
|
|
|
|
2. Fixed DSPMgr flow was disabled in SDK layer.
|
|
|
|
|
|
|
|
20220301 [TAG:1.0.1.21](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.21)
|
|
|
|
- Add: workaround.During the phone call, run following commands to establish audio path.
|
|
|
|
|
|
|
|
20220223 [TAG:1.0.1.20](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.20)
|
|
|
|
- Add: "AnWBTSRV_SPP_GetInformation", to get get CP & AA spp uuid information
|
|
|
|
- Clear Log
|
|
|
|
|
|
|
|
20220223 [TAG:1.0.1.18](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.18)
|
|
|
|
- patch audio sound config.
|
|
|
|
|
|
|
|
20220222 [TAG:1.0.1.10](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.10)
|
|
|
|
- RAT pass : iPhone/Android + bi-direction connecting. HFP/A2DP/AVRCP/CA/BR
|
|
|
|
|
|
|
|
20220221 [TAG:1.0.1.8](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.1.8)
|
|
|
|
1. add AVRCP_BR, AVRCP_CA profile support
|
|
|
|
2. add menu test function of "CA", "BT" ..
|
|
|
|
|
|
|
|
20220214 [TAG:1.0.0.6](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.0.6)
|
|
|
|
1. add AVRCP, A2DP profile support
|
|
|
|
2. add menu test function of "A2DP", "AVRCP" ..
|
|
|
|
|
|
|
|
20220128 [TAG:1.0.0.1](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.0.1)
|
|
|
|
1. [FUNC]supports pbap downloading & data callback
|
|
|
|
2. [DEMO]update service demo
|
|
|
|
3. [DOC]update SDK API Document
|
|
|
|
|
|
|
|
20220128 [TAG:1.0.0.1](http://git-nas03.anwsoft.com:8088/delly.chen/anw_bt_srv/-/tags/1.0.0.1)
|
|
|
|
1. [FUNC]supports pbap downloading & data callback
|
|
|
|
2. [DEMO]update service demo
|
|
|
|
3. [DOC]update SDK API Document
|
|
|
|
|
|
|
|
20220121 [TAG:0.0.03](http://192.168.1.51:8088/delly.chen/anw_bt_srv/-/tags/0.0.0.3)
|
|
|
|
1. [FUNC]supports android auto connect & write data to android
|
|
|
|
2. [FUNC]Add some functions, For details, refer to anwbtservice.h
|
|
|
|
|
|
|
|
20220118 [TAG:TAMUL_BT_V2](http://192.168.1.51:8088/delly.chen/anw_bt_srv/-/tags/TAMUL_BT_V2)
|
|
|
|
1. [FUNC]supports iphone carplay connect & write carplay data to iphone
|
|
|
|
|
|
|
|
20220117 [TAG:TAMUL_BT_V1](http://192.168.1.51:8088/delly.chen/anw_bt_srv/-/tags/TAMUL_BT_V1)
|
|
|
|
1. [FUNC] supports basic BT pair & connect
|
|
|
|
|
|
|
|
<div style="page-break-after: always"></div>
|
|
|
|
|
|
|
|
# USAGE
|
|
|
|
1. Support HFP, A2DP, AVRCP, PBAP, .. AnW BT stack
|
|
|
|
2. Support Device Search & Pair, Call, Phonebook, Music, ...
|
|
|
|
3. If you want to use HFP, provide workaround.During the phone call, run following commands to establish audio path.
|
|
|
|
```
|
|
|
|
arecord -Dhw:0,1 -c2 -r16000 -fS16_LE | aplay -Ddefault -c2 -r8000 -fS16_LE
|
|
|
|
arecord -Ddefault -c2 -r8000 -fS16_LE | aplay -Dhw:0,1 -c2 -r8000 -fS16_LE
|
|
|
|
```
|
|
|
|
## Pre-Requirement
|
|
|
|
(FOR TAMUL WORK)
|
|
|
|
Modify combo module init script **/etc/init.d/ubloxinit.sh**
|
|
|
|
```plaintext
|
|
|
|
echo "[DDMISO] UBLOX Driver"
|
|
|
|
modprobe jody-w2-sdiouart
|
|
|
|
ifconfig uap0 192.168.1.10
|
|
|
|
hostapd /etc/ublox/hostapd.conf -B
|
|
|
|
udhcpd /etc/ublox/udhcpd.conf
|
|
|
|
ifconfig uap0 up
|
|
|
|
wpa_supplicant -B -D nl80211 -i mlan0 -c /etc/ublox/wpa_supplicant.conf
|
|
|
|
#modprobe jody-w2-sdiouart-bt
|
|
|
|
#hciattach /dev/ttyAMA1 any 3000000 flow
|
|
|
|
#hciconfig -a hci0 up
|
|
|
|
#hciconfig -a hci0
|
|
|
|
udhcpc -i mlan0
|
|
|
|
```
|
|
|
|
|
|
|
|
## Run App on targets (tamul_btsrv_app.zip)
|
|
|
|
1. unzip
|
|
|
|
2. Copy results folder "/build/btsrv" to target "/home/btsrv"
|
|
|
|
3. go to target, in terminal entering /btsrv folder
|
|
|
|
4. run btsrv_client.sh to launch BTDemo demo app and following the menu commands or
|
|
|
|
```
|
|
|
|
>./btsrv_client.sh
|
|
|
|
```
|
|
|
|
## Install
|
|
|
|
```
|
|
|
|
Please select the function to test:
|
|
|
|
1. Install AnWBTService Sdk
|
|
|
|
2. Start btsrv
|
|
|
|
3. Stop btsrv
|
|
|
|
99. Exit btsrv Client.
|
|
|
|
>1
|
|
|
|
```
|
|
|
|
then audio (asound.conf) & App Settings will be copied install to system folder (e.g. /etc & /etc/anwbtservice)
|
|
|
|
```
|
|
|
|
install_btsrv /home/root/btsrv
|
|
|
|
bt service install successfully.
|
|
|
|
AnWBTService Sdk install successfully root path: /home/root/btsrv
|
|
|
|
```
|
|
|
|
**NOTICE!! The system is required to power off (hard reset) for alsa driver's correct reload.**
|
|
|
|
### structure(sta5_btsrv_app.zip)
|
|
|
|
<pre>
|
|
|
|
.
|
|
|
|
└── btsrv
|
|
|
|
├── BTDemo (sample program)
|
|
|
|
├── btsrv_client.sh (launcher for BTDemo)
|
|
|
|
└── etc
|
|
|
|
└──anwbtservice
|
|
|
|
├── \*.xml, \*.cfg (app settings)
|
|
|
|
└── lib
|
|
|
|
└── *.so (essentials libraries)
|
|
|
|
</pre>
|
|
|
|
## Customize on SDK (sta5_btsrv_sdk.zip)
|
|
|
|
1. unzip
|
|
|
|
2. in terminal entering ./anwbtsrv_sdk/Demo folder
|
|
|
|
3. setup tool-chain by command line (source ...) or edit in ./anwbtsrv_sdk/Demo/build_demo.sh
|
|
|
|
4. run make or build_demo.sh
|
|
|
|
|
|
|
|
```
|
|
|
|
> cd ./build/anwbtsrv_sdk/Demo
|
|
|
|
> source /opt/poky-**/2.5.1/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
|
|
|
|
> make
|
|
|
|
or
|
|
|
|
>./build_demo.sh
|
|
|
|
```
|
|
|
|
then, result is collected in **./Demo/btsrv**
|
|
|
|
<div style="page-break-after: always"></div>
|
|
|
|
|
|
|
|
### structure(sta5_btsrv_sdk.zip)
|
|
|
|
<pre>
|
|
|
|
.
|
|
|
|
└── Demo
|
|
|
|
├── AnWBTServiceDemo.cpp (examples to use anwbtservice)
|
|
|
|
├── build_demo.sh (build script, call to make)
|
|
|
|
├── makefile (makefile for BTDemo)
|
|
|
|
├── btsrv_client.sh (launcher for BTDemo)
|
|
|
|
├── etc
|
|
|
|
│ └──anwbtservice
|
|
|
|
│ ├── \*.xml, \*.cfg (app settings)
|
|
|
|
│ └── lib
|
|
|
|
│ └── *.so (essentials libraries)
|
|
|
|
├── import (anwbtservice)
|
|
|
|
│ ├── anwbtservice.h (service api header)
|
|
|
|
│ └── \*.so (include libraries)
|
|
|
|
└── btsrv (ouput for produced, e.g. BTDemo)
|
|
|
|
</pre> |
|
|
|
\ No newline at end of file |