RootcanalUtils.HciDevice

public static class RootcanalUtils.HciDevice
extends Object implements AutoCloseable

java.lang.Object
   ↳ com.android.sts.common.RootcanalUtils.HciDevice


Class that encapsulates a virtual HCI device that can be controlled by HCI commands.

Summary

Public methods

void close()
byte[] readHciPacket()

Read one HCI packet from device, blocking until data is available.

void sendHciCmd(int ogf, int ocf, byte[] params)

Convenient wrapper around sendHciPacket to send a HCI command packet to device.

void sendHciPacket(byte[] packet)

Send raw HCI packet to device.

Public methods

close

public void close ()

Throws
IOException

readHciPacket

public byte[] readHciPacket ()

Read one HCI packet from device, blocking until data is available.

Returns
byte[]

Throws
IOException

sendHciCmd

public void sendHciCmd (int ogf, 
                int ocf, 
                byte[] params)

Convenient wrapper around sendHciPacket to send a HCI command packet to device.

Parameters
ogf int: Opcode group field

ocf int: Opcode command field

params byte: the rest of the command parameters

Throws
IOException

sendHciPacket

public void sendHciPacket (byte[] packet)

Send raw HCI packet to device.

Parameters
packet byte: raw packet data to send to device

Throws
IOException