Blue Tooth

Blue tooth has some protocols, such as H4, BCSP and H4DS, etc.


Topic One: Deep Sleep

1) H4 protocol does not support Deep Sleep.

2) Either BCSP or H4DS should be used to support DeepSleep.


In case of BCSP  -> Deep Sleep is auto based on UART traffic.
In case of H4DS  -> Deep Sleep is achieved by sending a UART message.
Otherwise, we meed to provide a GPIO based mechanism, BT_HOSTIF_MODE pin will be used to tell BT chip to sleep or wake. we can implement toggling of this GPIO as part of .suspend or .resume calls.

 

For example, the CSR BC6 chip is eligible to enter Deep Sleep if there has been no UART traffic from the host for at least one second and if there is no data waiting to be passed to the host. The "one second" is actually the value of the PS Key PSKEY_UART_SLEEP_TIMEOUT (0x0222). This must not be set to less than the host's BCSP retransmission period, normally 250 milliseconds, otherwise the chip may be asleep again when the host resends its packet. currently we don't set this means, we use default value.

 

Suspend sequence : User Bluetooth Application -> Bluetooth Stack -> Bluetooth Driver (Tasks, Work Queues)-> UART Driver

 

Topic Two:  BT Architecuture on Android

 

Bluetooth Application:

Bluetooth Stack: 

Bluetooth Driver (Tasks, Work Queues): Kernel/drivers/bluetooth/hci_ldisc.c

UART Driver:  Kernel/drivers/serial/tegra_hsuart.c

 

Bluetooth Tool: System/bluetooth

Bluetooth Daemon: /hardware/tegra/daemons/nv_hciattach

你可能感兴趣的:(user,application,less,BT,protocols)