bluetooth2018. 6. 27. 17:33


/system/bt/doc/btsnoop_net.md 문서를 참조하여 아래와 같이 BtSnoopLogOutput=true로 변경 후,

linux host를 이용하여 8872 포트를 통해 실시간으로 hci packet을 모니터링 할 수 있다.



This feature is enabled by  setting `BtSnoopLogOutput=true` in `bt_stack.conf`.

Once it has been enabled and the stack restarted, the stack will listen for

incoming TCP connections on port 8872.


To use this feature with hcidump on a Linux host, you can run:


```

  $ adb forward tcp:8872 tcp:8872

  $ nc localhost 8872 | hcidump -r /dev/stdin

```


현재 테스트 중인 모델은 모든 포트가 막혀있어 적용이 불가능하다.



# netstat -tnlp

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program Name

tcp        0      0 127.0.0.1:8872          0.0.0.0:*               LISTEN      3879/com.android.bluetoot



만일 사용 중인 디바이스가 열린 포트를 확인하여 port가 열려있는 것이 확인이 된다면 linux host에서 아래와 같이 실시간 packet monitoring을 활용하자


#adb connect DEV_IP

$adb forward tcp:8872 tcp:8872

$ nc localhost 8872 | hcidump -r /dev/stdin


ex)

< HCI Command: Remote Name Request (0x01|0x0019) plen 10

    bdaddr 1C:4D:70:28:28:FE mode 1 clkoffset 0x173a (valid)

> HCI Event: Command Status (0x0f) plen 4

    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1

< HCI Command: Vendor (0x3f|0x0157) plen 3

> HCI Event: Command Complete (0x0e) plen 4

    Vendor (0x3f|0x0157) ncmd 1

> HCI Event: Remote Name Req Complete (0x07) plen 255

    status 0x04 bdaddr 1C:4D:70:28:28:FE name ''

    Error: Page Timeout

< HCI Command: Remote Name Request (0x01|0x0019) plen 10

    bdaddr 22:22:72:4D:80:D1 mode 0 clkoffset 0x0000 (valid)

> HCI Event: Command Status (0x0f) plen 4

    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1

< HCI Command: Remote Name Request Cancel (0x01|0x001a) plen 6

    bdaddr 22:22:72:4D:80:D1

> HCI Event: Remote Name Req Complete (0x07) plen 255

    status 0x16 bdaddr 22:22:72:4D:80:D1 name ''

    Error: Connection Terminated by Local Host

> HCI Event: Command Complete (0x0e) plen 10

    Remote Name Request Cancel (0x01|0x001a) ncmd 1

    status 0x00 bdaddr 22:22:72:4D:80:D1

< HCI Command: Remote Name Request Cancel (0x01|0x001a) plen 6

    bdaddr 22:22:72:4D:80:D1

> HCI Event: Command Complete (0x0e) plen 10

    Remote Name Request Cancel (0x01|0x001a) ncmd 1

    status 0x00 bdaddr 22:22:72:4D:80:D1

< HCI Command: Vendor (0x3f|0x0157) plen 3

> HCI Event: Command Complete (0x0e) plen 4

    Vendor (0x3f|0x0157) ncmd 1



참조 : https://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_%EB%A1%9C%EC%BB%AC%EC%84%9C%EB%B2%84_%EC%97%B4%EB%A6%B0_%ED%8F%AC%ED%8A%B8_%ED%99%95%EC%9D%B8



'bluetooth' 카테고리의 다른 글

Profile 별 특징 비교  (0) 2018.08.06
UHID: User-Space HID I/O drivers  (0) 2018.07.04
Bluetooth 5.0 주요 변경사항.  (0) 2018.06.21
bluetooth audio codec  (0) 2018.06.21
Dolby digital 채널 구성에 관하여  (0) 2018.06.21
Posted by easy16
bluetooth2018. 6. 21. 15:35



주요 변경 사항



1, Up to 2x bandwidth of Bluetooth 4.2 with low energy

 // LE(1Mbps) -> 2LE(2Mbps) 전송속도 2배 향상 됨.

2, Up to 4x range of Bluetooth 4.2 with low energy

 // 블루투스 사용 가능 거리가 4배 증가

3, Up to 8x the broadcasting message capacity over Bluetooth 4.2, with support for larger data packets: 31-octet to 255-octet packages. Ability to offload advertising date from the 3 advertising channels to up to 37 broadcasting channels

// broadcasting 에 적재할 수 있는 데이터가 8배 증가함.

 

Q1, Is Bluetooth 5.0 replacing Bluetooth 4.2, 4.1 or 4.0?

No, Bluetooth 5.0 extends the functionality set already provided by previous versions of the Bluetooth Core Specification.

-> //4.2 spec에서 확장된 기능을 제공하는 것일 뿐, 기존 디바이스와의 기능에 영향을 주지 않음.

 

Q2, What is the benefit of using Bluetooth 5.0?

In addition to the new features, using Bluetooth 5.0 allows manufacturers to take advantage of important interoperability and performance improvements incorporated in the Bluetooth Core Specification since the

Will Bluetooth 5.0 devices be backward compatible with current Bluetooth devices in the marketplace? Devices implementing only the low energy feature of Bluetooth 5 will be backward compatible with Bluetooth 4.2, 4.1 and 4.0 devices that also implement the low energy feature. Devices implementing the Basic Rate/Enhanced Data Rate (BR/ EDR) Core Configuration will be backward compatible with all adopted Bluetooth Core Specification versions beginning with 1.1 that also implement Bluetooth BR/EDR. release of Bluetooth 4.2.

( 5.0 LE에 대한 확장으로, 4.2, 4.1, 4.0에 대한 backward compatibility를 가지고 있음. )

 

 

출처 : https://www.mouser.com/pdfdocs/bluetooth-5-faq.pdf

'bluetooth' 카테고리의 다른 글

UHID: User-Space HID I/O drivers  (0) 2018.07.04
android hci debugging tip (실시간 패킷 보기)  (0) 2018.06.27
bluetooth audio codec  (0) 2018.06.21
Dolby digital 채널 구성에 관하여  (0) 2018.06.21
Audio file format  (0) 2018.06.21
Posted by easy16
bluetooth2018. 6. 21. 15:28

SBC


full name : low-complexity subband codec

A2DP사용을 위해 SIG로부터 정의 됨.


mono stereo 지원 

max sampling freqeuncy : 48kHz


max bit rate of mono 198kbit/s

max bit rate of stereo 345kbit/s


https://en.wikipedia.org/wiki/SBC_(codec)



AAC(Advanced Audio Coding)


고급 오디오 부호화

확장자 .m4a, .m4b, .m4p, .m4v, .m4r, .3gp, .mp4, .aac

파일 포맷 종류 오디오 압축 포맷, 손실 압축

표준 ISO/IEC 13818-7,

ISO/IEC 14496-3

고급 오디오 부호화(Advanced Audio Coding, AAC, 표준문서ISO/IEC 13818-7)는 디지털 오디오에서 쓰이는 표준적인 손실 데이터 압축방식이다. AAC는 MP3의 성공적인 후계자로써, MP3를 개발한 프라운호퍼 협회 산하의 집적회로 연구소의 기술이 많이 들어갔으며 그 외에 Dolby Lab. 등의 업체에서 개발한 기능들이 포함되었다.

AAC는 유튜브, 애플의 아이폰, 아이팟, 아이튠즈에 사용되는 기본 오디오 포맷으로, 아이튠즈 스토어의 모든 음원에 사용되고 있다.

AAC는 소니의 플레이스테이션 3의 표준 오디오 포맷으로 사용되고 있으며, MPEG-4 비디오 표준에도 사용되고 있다. 또한 위성 DMB 및 해외 지상파 DMB 등의 오디오 표준으로 사용되고 있으며 한국에서는 지상파 DMB의 오디오 표준으로 AAC 대신 BSAC을 사용하고 있다.

AAC는 닌텐도의 닌텐도 DSi와, 닌텐도 DSi LL, Wii에서 SD카드에 넣은 음악을 플레이할 때 사용하는 파일 포맷이다.

현재 주요 음원 사이트에서 사용하고 있는 압축 포맷이다.(유튜브에서도 사용 중)


https://ko.wikipedia.org/wiki/%EA%B3%A0%EA%B8%89_%EC%98%A4%EB%94%94%EC%98%A4_%EB%B6%80%ED%98%B8%ED%99%94


Others..

aptX(qualcom), LDAC (sony)

'bluetooth' 카테고리의 다른 글

UHID: User-Space HID I/O drivers  (0) 2018.07.04
android hci debugging tip (실시간 패킷 보기)  (0) 2018.06.27
Bluetooth 5.0 주요 변경사항.  (0) 2018.06.21
Dolby digital 채널 구성에 관하여  (0) 2018.06.21
Audio file format  (0) 2018.06.21
Posted by easy16
bluetooth2018. 6. 21. 15:26

모노 (가운데만)

2채널 스테레오 (왼쪽 + 오른쪽)

3채널 스테레오 (왼쪽, 가운데, 오른쪽)

2채널 스테레오 + 모노 서라운드 (왼쪽, 오른쪽, 서라운드)

3채널 스테레오 + 모노 서라운드 (왼쪽, 가운데, 오른쪽, 서라운드)

4채널 입체음향 (왼쪽, 오른쪽, 왼쪽 서라운드, 오른쪽 서라운드)

5채널 입체음향 (왼쪽, 오른쪽, 가운데, 왼쪽 서라운드, 오른쪽 서라운드)


https://ko.wikipedia.org/wiki/%EB%8F%8C%EB%B9%84_%EB%94%94%EC%A7%80%ED%84%B8

'bluetooth' 카테고리의 다른 글

UHID: User-Space HID I/O drivers  (0) 2018.07.04
android hci debugging tip (실시간 패킷 보기)  (0) 2018.06.27
Bluetooth 5.0 주요 변경사항.  (0) 2018.06.21
bluetooth audio codec  (0) 2018.06.21
Audio file format  (0) 2018.06.21
Posted by easy16
bluetooth2018. 6. 21. 15:25

Audio file format


비압축 방식 : WAV, AIFF, AU

압축 방식

손실 압축 : MP3, Vorbis, Musepack, AAC, ATRAC

비손실 압축 : FLAC, Monkey's Audio, WavPack, TTA, 애플 무손실


https://ko.wikipedia.org/wiki/%EC%98%A4%EB%94%94%EC%98%A4_%ED%8C%8C%EC%9D%BC_%ED%8F%AC%EB%A7%B7



'bluetooth' 카테고리의 다른 글

UHID: User-Space HID I/O drivers  (0) 2018.07.04
android hci debugging tip (실시간 패킷 보기)  (0) 2018.06.27
Bluetooth 5.0 주요 변경사항.  (0) 2018.06.21
bluetooth audio codec  (0) 2018.06.21
Dolby digital 채널 구성에 관하여  (0) 2018.06.21
Posted by easy16