3.4 HCI_EEPROM_READ Command and Event

Use the HCI_EEPROM_READ command to read back the data from the EEPROM location specified by the Start_Address parameter. The OCF is 0x29 and the HCI OpCode is 0xFC29. To verify, use the HCI_EEPROM_READ command to read back the EEPROM record after a HCI_EEPROM_WRITE command.

  • Start_Address – Indicates the start address of the EEPROM record and takes 2 bytes
  • Length – Indicates the read length of the EEPROM record and takes 1 byte (approximately ranging from 1-240)

Data is returned in the command complete event:

  • Status – Indicates the operation status and takes 1 byte
  • Start_Address – Indicates the start address of the EEPROM record and takes 2 bytes
  • Length – Indicates the length of the EEPROM record and takes 1 byte (approximately ranging from 1-240)
  • Data – Indicates the data of the EEPROM record and takes Length bytes
Table 3-6.  HCI_EEPROM_Read Command

Command

OCF

Command Parameters

Return Parameters

HCI_EEPROM_Read

0x29

Start_Address and Length

Status, Start_Address, Length and Data

Use the HCI_EEPROM_Read command to read the data from EEPROM.

Start_Address

Size – 2 bytes

Value

Parameter Description

0xXXXX

Start reading address

Length

Size – 1 byte

Value

Parameter Description

N

Indicates the length of the data to read (in bytes) from EEPROM.

N: 1-240

Status

Size – 1 byte

Value

Parameter Description

0x00

HCI_EEPROM_Read command succeeded

0x01-0xFF

HCI_EEPROM_Read command failed. See listing of Error Codes.

Start_Address

Size – 2 bytes

Value

Parameter Description

0xXXXX

Start reading address

LengthSize – 1 byte

Data

Size – N bytes

Value

Parameter Description

N bytes of data read from EEPROM

  • Example data – HCI_EEPROM_READ Command
    • 0x01 – HCI command packet
    • 0x29 0xFC – OpCode 0xFC29 is sent in a little endian as 0x29 0xFC
    • 0x03 – The parameter length of the HCI command
    • 0x00 0x07 – Start_Address of the E2PROM record
    • 0x03 – Read back the length of the EEPROM record
    Figure 3-9. Exampe of HCI_EEPROM_READ Command
  • Example data – Event to HCI_EEPROM_ READ command
    • 0x04 – HCI event packet
    • 0x0E – Command complete event of the HCI event
    • 0x0A – Total 10 bytes of parameter appended
    • 0x01 0x29 0xFC – The processed HCI command
    • 0x00 – Indicate a success
    • 0x00 0x07 – Start_Address of the EEPROM record
    • 0x03 – Read back the length of the EEPROM record
    • 0x04 0x04 0x24 – Read back data of the EEPROM record
    Figure 3-10. Event of HCI_EEPROM_READ Command