728x90


Paging

Page scan (slave)

An unconnected Bluetooth device must periodically enter the page scan state; in this state, the device activates its receiver and listens for a master device that might be trying to page it. A device operates in one of three page SR (Scan Repetition) modes:

R0: the device listens continuously for a master paging it.
R1: the device listens at least every 1.28 seconds (2048 slots).
R2: the device listens at least every 2.56 seconds (4096 slots).

During the page scan state, the unconnected device listens on one of 32 channels, for at least 10ms (16 slots). A different channel is selected every 1.28 seconds (2048 slots). The channels and the hopping sequence are calculated from the device's BD_ADDR (Bluetooth Device Address).

Page (master)

When commanded to enter the page state, the master device starts to transmit, using 16 of the 32 channels being used by the paged device. During every even numbered slot it transmits two ID packets on two different channels, and during the following slot it listens on two different channels for the slave's response (also an ID packet). In the next two slots it uses the next two channels, so the hopping sequence (of 16 channels) repeats every 10ms (16 slots).

The master repeats the 16 slot sequence for at least long enough for the paged device to enter the page scan state:

R0: at least once.
R1: at least 128 times (i.e. for at least 1.28 seconds).
R2: at least 256 times (i.e. for at least 2.56 seconds).

If the master doesn't receive a response, it will then try the other 16 channels.

Page sequence

  • Slot n+0: The master transmits one ID packet in the first half slot, then a second ID packet (on a different frequency) in the second half slot.
  • Slot n+1: The slave responds with an ID packet, in either the first half or second half of the slot.
  • Slot n+2: The master transmits an FHS packet.
  • Slot n+3: The slave responds with an ID packet, in the first half of the slot.
  • Slot n+4: The master switches to the normal hopping scheme. The first packet it transmits is a POLL packet.

Inquiry

Inquiry scan (slave)

An unconnected Bluetooth device that wants to be "discovered" by a master device will periodically enter the inquiry scan state; in this state, the device activates its receiver and listens for inquiries. It must enter this state at least every 2.56 seconds (4096 slots).

During the inquiry scan state, the unconnected device listens on one of 32 channels, for at least 10ms (16 slots). A different channel is selected every 1.28 seconds (2048 slots). The channels and the hopping sequence are calculated from the general inquiry address.

Inquiry (master)

When commanded to enter the inquiry state, the master device starts to transmit, using 16 of the 32 channels used for inquiries. During every even numbered slot it transmits twoID packets on two different channels, and during the following slot it listens on those two channels for a slave's response (an FHS packet). In the next two slots it uses the next two channels, so the hopping sequence (of 16 channels) repeats every 10ms (16 slots). The 16 slot sequence must be repeated at least 256 times (i.e. for at least 2.56 seconds) before switching to the other set of 16 channels.


728x90

'BlueTooth > 기본기' 카테고리의 다른 글

Air packet에서 Bluetooth clock 확인  (0) 2017.09.08
baseband ack nack concept  (0) 2017.09.08
bluetooth timeout spec  (1) 2016.01.28
RFComm  (0) 2016.01.07
GPP(Generic PIM Profile)  (0) 2015.12.15
AVDTP signaling/Media  (0) 2014.10.23
kitkat install 다시 시작  (9) 2014.07.19
BLE 4.1  (0) 2014.06.25
Security Mode  (1) 2014.06.24
Vega series에서 HID가 connecting state에 머물러 있음  (0) 2014.03.27
728x90

A2DP를 사용하다 보면 Signaling channel과 Media channel이 구분되어 연결되는 것을 많이 보는데 그러면서도 air log를 확인하지 않으면 정확히 어떤 차이가 있는 지 쉽게 감이 오지 않는다.


Air log를 BomProbe Protocol Analysis System으로 보면 A2DP와 관련하여

AVDTP/AVDTP Signaling/AVDTP Media/A2DP

이러한 탭이 보이는데...


A2DP와 관련된 내용들은 결국 AVDTP 탭에서 다 확인이 가능하다

이 중에서 Media 관련은 AVDTP Media, Signaling 관련은 AVDTP Signaling으로 분류한 정도로 생각하면 된다.


정리하자면 AVDTP Media tab에는 음원을 전달하는 packet들이 들어있고, 이것이 그대로 A2DP tab으로 전달된다.

그럼 AVDTP signaling은 A2DP가 아니냐?

아니다. A2DP는 profile이고 AVDTP는 protocol 이므로 profile 하위에 깔고 있다.

여기서 AVDTP signaling이 무엇인지가 중요해지는데 결국 음원이 아닌 다른 control packet들이라고 생각하면 된다.


Signaling tab을 보면 사실 간단한 명령들이 보인다.



Discover : decoer를 알려달라는 명령

Get capabilities : 해당 decoer의 capability를 확인(codec type,sampling frequency, channel mode 등 지원 가능한 사양 확인)

set configuration : 어떤 코덱을 어떤 설정으로 사용할 것인지

open : channel open

start : media data를 주겠다.

suspend : 중단

기타 등등...


728x90

'BlueTooth > 기본기' 카테고리의 다른 글

baseband ack nack concept  (0) 2017.09.08
bluetooth timeout spec  (1) 2016.01.28
RFComm  (0) 2016.01.07
GPP(Generic PIM Profile)  (0) 2015.12.15
Paging and Inquiry  (0) 2015.11.26
kitkat install 다시 시작  (9) 2014.07.19
BLE 4.1  (0) 2014.06.25
Security Mode  (1) 2014.06.24
Vega series에서 HID가 connecting state에 머물러 있음  (0) 2014.03.27
Bluetooth Packet Type  (0) 2013.11.06
728x90

install ubuntu 12.04 


source code download

참고 : https://source.android.com/source/downloading.html

$ mkdir ~/bin
$ PATH=~/
bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a
+x ~/bin/repo
 $ repo init -u http://git.android-x86.org/manifest -b kitkat-x86
 $ repo sync

install required packages(Ubuntu 12.04

$sudo apt-get install git gnupg flex bison gperf build-essential \
  zip curl libc6
-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11
-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1
-mesa-dev g++-multilib mingw32 tofrodos \
  python
-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln
-s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

한번에 다 설치하면 종속성 때문에 설치가 안될 수 있으니 차근차근 나눠서 설치


Initialize


$ source build/envsetup.sh

$ lunch 

5. android_x86-eng

선택


Build

$ make -j4



아래의 에러를 만나서 진행이 안되는 중..ㅠㅠ


UNEXPECTED TOP-LEVEL EXCEPTION:

com.android.dex.util.ExceptionWithContext

at com.android.dex.util.ExceptionWithContext.withContext(ExceptionWithContext.java:45)

at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:377)

at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:139)

at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:94)

at com.android.dx.command.dexer.Main.processClass(Main.java:682)

at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)

at com.android.dx.command.dexer.Main.access$600(Main.java:78)

at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)

at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)

at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)

at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)

at com.android.dx.command.dexer.Main.processOne(Main.java:596)

at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)

at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)

at com.android.dx.command.dexer.Main.run(Main.java:230)

at com.android.dx.command.dexer.Main.main(Main.java:199)

at com.android.dx.command.Main.main(Main.java:103)

Caused by: java.lang.NullPointerException

at com.android.dx.cf.code.ConcreteMethod.<init>(ConcreteMethod.java:87)

at com.android.dx.cf.code.ConcreteMethod.<init>(ConcreteMethod.java:75)

at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:277)

... 15 more

...while processing <init> (Lcom/android/internal/telephony/gsm/GSMPhone;)V

...while processing com/android/internal/telephony/gsm/GSMPhone$1.class


1 error; aborting

make: *** [out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/classes-with-local.dex] Error 1



728x90

'BlueTooth > 기본기' 카테고리의 다른 글

bluetooth timeout spec  (1) 2016.01.28
RFComm  (0) 2016.01.07
GPP(Generic PIM Profile)  (0) 2015.12.15
Paging and Inquiry  (0) 2015.11.26
AVDTP signaling/Media  (0) 2014.10.23
BLE 4.1  (0) 2014.06.25
Security Mode  (1) 2014.06.24
Vega series에서 HID가 connecting state에 머물러 있음  (0) 2014.03.27
Bluetooth Packet Type  (0) 2013.11.06
quoted-printable decoder  (0) 2013.06.03
728x90

BLE 4.0에서 smart ready(dual mode) 끼리는 연결 안되는 문제가 있었는데

4.1로 넘어가면서 smart ready간 연결도 지원한다고 함.

시간이 나면 4.1도 정리해볼 필요가 있을 것으로 보임.



출처 : 위키디피아

http://ko.wikipedia.org/wiki/%EB%B8%94%EB%A3%A8%ED%88%AC%EC%8A%A4#.EB.B8.94.EB.A3.A8.ED.88.AC.EC.8A.A4_4.1



블루투스 4.0

블루투스 SIG는 클래식 블루투스와 블루투스 하이 스피드와 블루투스 로우 에너지를 포함한 기능을 가진 블루투스 4.0을 발표하였다. 블루투스 하이 스피드는 와이파이 기반으로, 클래식 블루투스는 기존의 블루투스 프로토콜로 구성되어 있다. 2010년 6월 30일에 채택되었다. 블루투스 저전력(Bluetooth Low Energy, 약어: BLE)은 블루투스 v4.0에 포함된 간단한 연결을 빠르게 만들기 위한 완전히 새로운 프로토콜 스택이다. 2011년 말, 호스트를 위한 "Bluetooth Smart Ready" 와 센서를 위한 "Bluetooth Smart" 가 블루투스 저전력(BLE)의 새 로고로써 선보였다.


싱글 모드 구현에선 저전력 프로토콜 스택이 단독적으로 구현된다.

듀얼 모드 구현에선 저전력 기능이 기존의 블루투스 컨트롤러에 통합된다.

Bluetooth SMART는 블루투스 저전력 전용 장치로써 일반적으로 배터리로 동작하는 센서에서 사용된다. 동작에 SMART Ready 또는 다른 SMART 장치를 필요로 한다. 또한 최대 도달 거리가 50M 이다.

Bluetooth SMART Ready 는 듀얼 모드 장치를 나타내며 일반적으로 노트북 또는 스마트폰에서 사용된다. 기존의 블루투스와 블루투스 저전력 장치를 둘다 사용한다.



블루투스 4.1

블루투스 SIG는 2013년 12월 블루투스 4.1의 새로운 기능을 발표했다. 블루투스 4.1의 주요 특징은 다음과 같다.


공존성(coexistence) 향상- 블루투스와 LTE 무선이 서로 통신 상태를 조정해 가까운 대역폭으로 인한 간섭 현상을 줄여준다.

더 나은 연결(better connections)- 블루투스 연결 장치끼리의 거리가 증가해 잠시 연결이 끊어지게 되면, 4.1 블루투스 장치는 거리 내로 되돌아올 시 자동으로 재연결된다.

데이터 전송 개선(improved data transfer)- 블루투스를 사용하는 악세서리 장치(헬스 기구) 등과의 통신 전송 상태를 보다 효율적으로 개선하였다.

개발자에게 더 많은 유연성 제공(more flexibility to developers)- 앞으로 있을 웨어러블 기기 붐에 대비한 업데이트로, 블루투스 연결을 통해 웨어러블 기기가 스마트폰의 주변장치이자 동시에 다른 장치와의 허브 역할도 할 수 있게 해준다. 또한 장래를 위해 사물 인터넷(The Internet of Things)을 위한 새로운 IPV6 사용 표준도 들어가 있다.

728x90

'BlueTooth > 기본기' 카테고리의 다른 글

RFComm  (0) 2016.01.07
GPP(Generic PIM Profile)  (0) 2015.12.15
Paging and Inquiry  (0) 2015.11.26
AVDTP signaling/Media  (0) 2014.10.23
kitkat install 다시 시작  (9) 2014.07.19
Security Mode  (1) 2014.06.24
Vega series에서 HID가 connecting state에 머물러 있음  (0) 2014.03.27
Bluetooth Packet Type  (0) 2013.11.06
quoted-printable decoder  (0) 2013.06.03
synergy MessageSendLater  (0) 2011.04.19

+ Recent posts