mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-07 03:02:31 +00:00
l2cap-connect can be used to connect to a server: btshell> l2cap-connect 0080 bt: bt_l2cap_chan_connect (0x0011260c): conn 0x001111c0 chan 0x0011065c psm 0x0080 bt: l2cap_le_connect (0x0011260c): conn 0x001111c0 chan 0x0011065c psm 0x0080 bt: l2cap_chan_add (0x0011260c): conn 0x001111c0 chan 0x0011065c cid 0x0040 btshell> bt: bt_l2cap_recv (0x00114e00): Packet for CID 5 len 14 bt: l2cap_chan_recv (0x00114e00): chan 0x00111534 len 14 bt: l2cap_recv (0x00114e00): LE signaling code 0x15 ident 1 len 10 bt: le_conn_rsp (0x00114e00): dcid 0x0040 mtu 672 mps 230 credits 10 result 0x0000 Channel 0011065c connected Change-Id: I8440615225e74d603c0f6bc3db4cf4bd46831841 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> |
||
---|---|---|
.. | ||
beacon | ||
central | ||
init | ||
peripheral | ||
shell | ||
test_bluetooth | ||
tester | ||
README |
Bluetooth subsystem = Building = Build samples $ make -C samples/bluetooth/<app> = Bluetooth Sample application = Host Bluetooth controller is connected to the second qemu serial line through a UNIX socket (qemu option -serial unix:/tmp/bt-server-bredr). This option is already added to qemu through QEMU_EXTRA_FLAGS in Makefile. 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 Note that before calling btproxy make sure that Bluetooth controller is down. Now running qemu result connecting second serial line to 'bt-server-bredr' UNIX socket. When Bluetooth (CONFIG_BLUETOOTH) and Bluetooth HCI UART driver (CONFIG_BLUETOOTH_UART) are enabled, Bluetooth driver registers to the system. From now on Bluetooth might be used by the application. To run application in the qemu run: $ make qemu = Bluetooth sanity check = There is smoke test application in nanokernel and microkernel test directories which gets run in sanity check script: $ scripts/sanity_chk/sanity_chk [-P <platform>] For quick regression test use bt_regression, it only check Bluetooth test $ samples/bluetooth/bt_regression.sh