출처 : http://permalink.gmane.org/gmane.linux.bluez.devel/75

Re: [Bluez-devel] Re: (no subject)

Hello,

It seems that many people are stuck at the same place when trying to
transmit voice over SCO. The nature of Marcel's replies suggests to me
that there may 
be something that we all get wrong, so I'll try to summarize what I 
understand, to see if we can locate the misconception together.

a- SCO sockets in Bluez just encapsulate SCO links from the BT stack.

b- Voice can be transmitted over SCO links.

c- BT devices have embedded algorithms for transmitting voice over SCO.
They encode sound received from the host into a specific "air" format,
and the other way around.

d- Encoding can be parameterized through the "hciconfig hci0 voice"
command. Basically, one can choose the "host" encoding among formats
such as PCM ulaw, PCM Alaw, PCM linear, etc, and the "air" encoding
among formats such as CVSD or PCM.

e- CVSD is a lossy format which encodes differences from a predicted
signal, and consequently it is impossible to detect bugs by comparing
what's given at one end and what's received at the other end.

f- Given a sound file, and (for instance) two PCs with BT dongles, one
can transmit the sound over BT and play it by:
  0. having the two BT dongles use the same "air" encoding, say CVSD
(this is done through "hciconfig hci0 voice"
  1. converting the sound to the "host" encoding expected by the BT
dongle (encoding which has been specified through "hciconfig hci0
voice")
  2. opening a SCO socket and transmitting the sound over it
  3. at the receiving end, converting the sound from the "host" encoding
(encoding which has been specified through "hciconfig hci0 voice") to a
format usable by /dev/dsp
  4. feed the sound to /dev/dsp

This is basically it. The problem is that when doing this, it does not
work for me: I mostly get noise at the other end. The problem is that it
is hard to debug, because :
 - I don't know for sure if the problem is SCO-related or sound-related.
 - one cannot just test the SCO connection by sending and comparing
samples, because of the CVSD encoding.

Here are some bits of code I used for doing this.

Le mar 10/06/2003 à 16:04, Marcel Holtmann a écrit :
> Hi Jian,
> 
> > hciconfig hci0 voice 40
> > hciconfig hci1 voice 40
> > It still cannot work. I just dump some 0xff or 0x00 data.
> 
> first of all this must be "hciconfig hci0 voice 0x0040".
> 
> > I use 2.4.20 with patch-2.4.20-mh7.gz,
> > I try mandrake 9.1 with 2.4.21 kernel and hci_usb-031803.tar.gz
> 
> Use 2.4.20-mh9. And do scoinfo tell you that the device support SCO over
> HCI (MAP_SCO_PCM=0x00).
> 
> > I use scotest.c instead of hstest.c. I have no bluetooth headset. I have just two bluetooth usb adapters.
> > 
> > Could you tell me how to debug the scotest.c and bluez modules kernel together?
> 
> Convert your wav file into PCM format (according to the voice setting)
> and transport it over the SCO link. On the other side convert it back to
> wav. The bits may change, but if you play it, it will to sound similar.
> 
> Regards
> 
> Marcel
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
> thread debugger on the planet. Designed with thread debugging features
> you've never dreamed of, try TotalView 6 free at www.etnus.com.
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
> 
Attachment (sco.tgz): application/x-gzip, 2301 bytes
 
mpg123 -s rolie6.mp3 | sox -V -t raw -r 44100 -s -w -c 2 - -r 8000 -c 1 -b rolie6.sb

sox -t raw -r 8000 -c 1 -s -b audio -t ossdsp -r 44100 -c 2 -s -w /dev/dsp vol 2.0 2> /dev/null

'개발 개발 > Bluetooth' 카테고리의 다른 글

SCO 디버깅 하기  (0) 2011.12.28
블루투스(Bluetooth)의 개요와 기초  (0) 2011.12.26
FTS4BT Bluetooth Analyzer 사용하기  (0) 2011.12.21
블루투스 스펙 2012.12.5 일 현재  (1) 2011.12.07
출처 : http://www.microvision.co.kr/bluetooth/bluetooth_lecture.htm



'개발 개발 > Bluetooth' 카테고리의 다른 글

SCO 디버깅 하기  (0) 2011.12.28
블루투스(Bluetooth)의 개요와 기초  (0) 2011.12.26
FTS4BT Bluetooth Analyzer 사용하기  (0) 2011.12.21
블루투스 스펙 2012.12.5 일 현재  (1) 2011.12.07

Adopted Bluetooth Core Specifications

Specification
Adopted Date
Notes
Core Version 4.0 30 June 2010  
Core Version 3.0 + HS  21 April 2009   
Core Specification Addendum (CSA) 1 26 June 2008 Applicable to v2.0 + EDR and v2.1 + EDR
Core Version 2.1 + EDR 26 July 2007  
Volume 4: HCI Transports 01 January 2006  
Core Version 2.0 + EDR 04 November 2004  


To the top

 

Adopted Bluetooth Profiles, Services, Protocols and Transports

 
GATT-Based Specifications (Qualifiable)
 
 
Adopted Versions
ANP Alert Notification Profile 1.0
ANS Alert Notification Service 1.0
BLP Blood Pressure Profile 1.0
BLS Blood Pressure Service 1.0
CTS Current Time Service 1.0
DIS Device Information Service 1.1
FMP Find Me Profile 1.0
HTP Health Thermometer Profile 1.0
HTS Health Thermometer Service 1.0
HRP Heart Rate Profile 1.0
HRS Heart Rate Service 1.0
IAS Immediate Alert Service 1.0
LLS Link Loss Service 1.0
NDCS Next DST Change Service 1.0
PASP Phone Alert Status Profile 1.0
PASS Phone Alert Status Service 1.0
PXP Proximity Profile 1.0
RTUS Reference Time Update Service 1.0
TIP Time Profile 1.0
TPS Tx Power Service 1.0
 
Traditional Profiles (Qualifiable)
 
 
Adopted Versions
A2DP Advanced Audio Distribution Profile 1.0 / 1.2
AVRCP A/V Remote Control Profile 1.0 / 1.3 / 1.4
BIP Basic Imaging Profile 1.0 / 1.1
BPP Basic Printing Profile 1.0 / 1.2
DI Device ID Profile 1.2 / 1.3
DUN Dial-Up Networking Profile 1.1
FTP File Transfer Profile 1.1 / 1.2
GAVDP Generic A/V Distribution Profile 1.0 / 1.2
GOEP Generic Object Exchange Profile 1.1 / 2.0
HCRP Hardcopy Cable Replacement Profile 1.0 / 1.2
HDP Health Device Profile 1.0
HFP Hands-Free Profile 1.5 / 1.6
HSP Headset Profile 1.1 / 1.2
HID Human Interface Device Profile 1.0
MAP Message Access Profile 1.0
OPP Object Push Profile 1.1 / 1.2
PAN Personal Area Networking Profile 1.0
PBAP Phone Book Access Profile 1.0 / 1.1
SAP SIM Access Profile 1.0 / 1.1
SDAP Service Discovery Application Profile 1.1
SPP Serial Port Profile 1.1
SYNCH Synchronization Profile 1.1
VDP Video Distribution Profile 1.0
 
Protocols
 
Adopted Version(s)
AVCTP A/V Control Transport (Qualifiable) 1.0 / 1.2 / 1.3
AVDTP A/V Distribution Transport (Qualifiable) 1.0 / 1.2
BNEP Bluetooth Network Encapsulation Protocol (Qualifiable) 1.0
IrDA IrDA Interoperability 1.1 / 2.0
MCAP Multi-Channel Adaptation Protocol (Qualifiable) 1.0
RFCOMM RFCOMM (Qualifiable) 1.1


To the top

 

Adopted Bluetooth Errata Service Releases

Errata Service Release
Adopted Date
Notes
ESR05 23 August 2011  
ESR04 18 December 2008  
ESR03 06 February 2008  
Erratum 747 25 November 2005 Enabling Boot Mode Only (HID Lite) Hosts
ESR02 21 June 2005  
ESR01 25 August 2003  

'개발 개발 > Bluetooth' 카테고리의 다른 글

SCO 디버깅 하기  (0) 2011.12.28
블루투스(Bluetooth)의 개요와 기초  (0) 2011.12.26
FTS4BT Bluetooth Analyzer 사용하기  (0) 2011.12.21
블루투스 스펙 2012.12.5 일 현재  (1) 2011.12.07
  • Favicon of http://www.moncleroutletespain.com/ BlogIcon moncler 2013.01.04 17:49

    Air France at present facilitates fliers for cheap traveling with the ?Premium Voyageur Offers'. You can win one return ticket to Paris and receive an exclusive L'OCCITANE gift, http://www.moncleroutletespain.com/ http://www.moncleroutletespain.com/. This offer by Air France is meant for its new Premium Economy, http://www.moncleroutletespain.com/ moncler chaquetas, giving you 40% more space, priority check-in, extra miles and much more. The gift is a part of its launch offer. So if you want to fly from Mumbai to Paris in Premium Voyageur, the fare is only INR 67200, from Mumbai to Geneva INR 68300, from Mumbai to Milan INR 68300, from Mumbai to Dublin INR 68600, http://www.moncleroutletespain.com/ moncler outlet, from Mumbai to Frankfurt INR 68900, from Mumbai to London INR 72600, http://www.moncleroutletespain.com/ moncler españa. Under the same Premium Voyageur by Air France for flying from Bengaluru to Paris, you need to pay INR 67700, http://www.moncleroutletespain.com/ moncler online, from Bengaluru to Barcelona INR 68300, from Bengaluru to Rome INR 68700, from Bengaluru to Manchester INR 72500, from Bengaluru to Oslo INR 68700, http://www.moncleroutletespain.com/ moncler. There are many offers offered by Air China as well. So get the bookings done and enjoy an affordable trip!Related articles:


    http://ilashman.tistory.com/4731 http://ilashman.tistory.com/4731

    http://freebooks.tistory.com/35369 http://freebooks.tistory.com/35369