topic>
HCI spec study.
contents>
-HCI: Host Controller Interface
-HCI는 interface시에 총 4 type의 packet을 사용하여 통신함.
1. packets: there are 4 types of packet.
-HCI command packet (host -> controller)
-HCI ACL data packet (bi-directional)
-HCI synchronous data packet (bi-directional)
-HCI event packet (controller -> host)
1)HCI command packet
1)HCI command packet
-format: OpCode(16 bit) + Parameter length(16 bit) + Parameter + ....
-OpCode is consist of OGF, OCF.
.OGF(OpCode Group Field): upper 6 bits
.OCF(OpCode Command Field): remaining 10 bits
=> OpCode (16bits) = OCF(10bits) + OGF(6bits)
so, Command packet = OCF(10bits) + OGF(6bits) + Para length(16bits) 로 구성됨.
.OGF라는 category안에 여러개의 OCF가 존재하는 형태.
-OGF=0x01: HCI Link Control Commands
-OGF=0x02: HCI Link Policy Commands:
-OGF=0x03: HCI Host Controller & BB Commands
-OGF=0x04: HCI Informational Parameters
-OGF=0x05: HCI Status Parameters
-OGF=0x06: HCI Testing Commands.
-OGF=0x3e: TCI-L2CAP
-OGF=0x3f: HCI Vendor Commands
> Read_BD_ADDR is in 'Information Parameters' Group. so, OGF: 0x04(0000 0100)
> and its OCF: 0x0009(0000 0000 0000 1001)
> 따라서 전체 OpCode의 상위 6bits를 구성하는 OGF는 => 00 0100 (0x04)
remaining 10bits 인 OCF는 => 00 0000 1001(0x009)
combining above 2 terms(OGF+OCF), total OpCode is "0001 0000 0000 1001"(0x1009)
> 즉, 총 16bit의 OpCode이며, upper 6bits는 0x04(means "Information Parameters"Group),
remaining 10bits는 0x0009(means "Read_BD_ADDR")
> 이를 command packet 형식에 맞게 mapping하면
OpCode packet = OCF + OGF 이므로
= 0x09 + 0x10 = 0000 1001 0001 0000 의 형태로 mapping
> and its OCF: 0x0009(0000 0000 0000 1001)
> 따라서 전체 OpCode의 상위 6bits를 구성하는 OGF는 => 00 0100 (0x04)
remaining 10bits 인 OCF는 => 00 0000 1001(0x009)
combining above 2 terms(OGF+OCF), total OpCode is "0001 0000 0000 1001"(0x1009)
> 즉, 총 16bit의 OpCode이며, upper 6bits는 0x04(means "Information Parameters"Group),
remaining 10bits는 0x0009(means "Read_BD_ADDR")
> 이를 command packet 형식에 맞게 mapping하면
OpCode packet = OCF + OGF 이므로
= 0x09 + 0x10 = 0000 1001 0001 0000 의 형태로 mapping
댓글 없음:
댓글 쓰기