2015-04-13 19:39:47 +08:00
|
|
|
Bluetooth subsystem
|
|
|
|
|
|
|
|
= Architecture =
|
|
|
|
|
|
|
|
All processing is done in fibers. Basic structure for packet processing
|
|
|
|
is bt_buf. Packets are queued to different queues and processed. Packet
|
|
|
|
allocation is done through a free packets queue which gets populated
|
2015-04-17 19:56:53 +08:00
|
|
|
during the initialization.
|
2015-04-13 19:39:47 +08:00
|
|
|
|
|
|
|
= Building =
|
|
|
|
|
2015-04-17 19:56:53 +08:00
|
|
|
Build host tools:
|
|
|
|
|
2015-04-13 19:39:47 +08:00
|
|
|
$ make -C host/src
|
2015-04-17 19:56:53 +08:00
|
|
|
|
|
|
|
Build samples
|
|
|
|
|
2015-04-13 19:39:47 +08:00
|
|
|
$ make -C samples/bluetooth/<app>
|
|
|
|
|
|
|
|
= Testing =
|
|
|
|
|
|
|
|
Host Bluetooth controler is connected to the second qemu serial line
|
|
|
|
through a UNIX socket (qemu option -serial unix:/tmp/bt-server-bredr).
|
|
|
|
|
|
|
|
On the host side BlueZ allows to "connect" Bluetooth controller through
|
|
|
|
a so-called user channel. Use the btproxy tool for that:
|
|
|
|
|
|
|
|
$ sudo tools/btproxy -u
|
|
|
|
Listening on /tmp/bt-server-bredr
|
|
|
|
|
|
|
|
Now qemu can connect serial line to the 'bt-server-bredr' UNIX socket
|
|
|
|
with following command:
|
|
|
|
|
2015-04-17 19:56:53 +08:00
|
|
|
For microkernel configuration run:
|
|
|
|
|
|
|
|
$ make microkernel.qemu
|
|
|
|
|
|
|
|
For nanokernel configuration run:
|
|
|
|
|
|
|
|
$ make nanokernel.qemu
|
|
|
|
|
|
|
|
Extra parameter to qemu might be added through QEMU_EXTRA_FLAGS.
|
|
|
|
|
|
|
|
There is smoke test application in nanokernel and microkernel test
|
|
|
|
directories which gets run in sanity check script:
|
|
|
|
|
|
|
|
$ scripts/sanity_chk/sanity_chk -T gcc [-B <BSP>]
|
|
|
|
|
|
|
|
For quick regression test use bt_regression, it only check Bluetooth test
|
|
|
|
|
|
|
|
$ samples/bluetooth/bt_regression.sh
|