port/qt-h4: add qt port for Bluetooth Controller connected via UART

This commit is contained in:
Matthias Ringwald 2020-03-02 15:25:27 +01:00
parent 256b905137
commit 4953c773ad
7 changed files with 1192 additions and 0 deletions

View File

@ -69,6 +69,7 @@ No build server | [posix-h4-da14581](https://github.com/bluekitchen/btstack/tree
No build server | [posix-h4-da14585](https://github.com/bluekitchen/btstack/tree/develop/port/posix-h4-da14585) | Unix-based system connected to Dialog Semiconductor DA14585 via H4 over serial port
No build server | [posix-h5](https://github.com/bluekitchen/btstack/tree/develop/port/posix-h5) | Unix-based system connected to Bluetooth module via H5 over serial port
No build server | [posix-h5-bcm](https://github.com/bluekitchen/btstack/tree/develop/port/posix-h5) | Unix-based system connected to Broadcom/Cypress Bluetooth module via H5 over serial port
No build server | [qt-usb](https://github.com/bluekitchen/btstack/tree/develop/port/qt-h4) | Unix- or Win32-based [Qt application](https://qt.io) connected to Bluetooth module via H4 over serial port
No build server | [qt-usb](https://github.com/bluekitchen/btstack/tree/develop/port/qt-usb) | Unix- or Win32-based [Qt application](https://qt.io) with dedicated USB Bluetooth dongle
No build server | [windows-h4](https://github.com/bluekitchen/btstack/tree/develop/port/windows-h4) | Win32-based system connected to Bluetooth module via serial port
No build server | [windows-winusb](https://github.com/bluekitchen/btstack/tree/develop/port/windows-winusb) | Win32-based system with dedicated USB Bluetooth dongle

74
port/qt-h4/.gitignore vendored Normal file
View File

@ -0,0 +1,74 @@
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
# qtcreator generated files
*.pro.user*
# xemacs temporary files
*.flc
# Vim temporary files
.*.swp
# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*
# MinGW generated files
*.Debug
*.Release
# Python byte code
*.pyc
# Binaries
# --------
*.dll
*.exe
CMakeLists.txt.user

207
port/qt-h4/CMakeLists.txt Normal file
View File

@ -0,0 +1,207 @@
cmake_minimum_required(VERSION 3.5)
project(qt-h4 LANGUAGES C CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
message("${Qt5_DIR}")
find_package(Qt5Core)
include(FindPythonInterp)
# BTstack Root
set(BTSTACK_ROOT "../..")
message("BTSTACK_ROOT: ${BTSTACK_ROOT}")
# BTstack include
include_directories(${BTSTACK_ROOT}/3rd-party/micro-ecc)
include_directories(${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include)
include_directories(${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include)
include_directories(${BTSTACK_ROOT}/3rd-party/md5)
include_directories(${BTSTACK_ROOT}/3rd-party/hxcmod-player)
include_directories(${BTSTACK_ROOT}/3rd-party/hxcmod-player/mod)
include_directories(${BTSTACK_ROOT}/3rd-party/lwip/core/src/include)
include_directories(${BTSTACK_ROOT}/3rd-party/lwip/dhcp-server)
include_directories(${BTSTACK_ROOT}/3rd-party/rijndael)
include_directories(${BTSTACK_ROOT}/3rd-party/yxml)
include_directories(${BTSTACK_ROOT}/3rd-party/tinydir)
include_directories(${BTSTACK_ROOT}/chipset/bcm)
include_directories(${BTSTACK_ROOT}/chipset/cc256x)
include_directories(${BTSTACK_ROOT}/chipset/csr)
include_directories(${BTSTACK_ROOT}/src)
include_directories(${BTSTACK_ROOT}/platform/posix)
include_directories(${BTSTACK_ROOT}/platform/embedded)
include_directories(${BTSTACK_ROOT}/platform/lwip)
include_directories(${BTSTACK_ROOT}/platform/lwip/port)
include_directories(${BTSTACK_ROOT}/platform/qt)
include_directories(.)
# BTstack sources
file(GLOB SOURCES_SRC "${BTSTACK_ROOT}/src/*.c" "${BTSTACK_ROOT}/example/sco_demo_util.c")
file(GLOB SOURCES_BLE "${BTSTACK_ROOT}/src/ble/*.c")
file(GLOB SOURCES_GATT "${BTSTACK_ROOT}/src/ble/gatt-service/*.c")
file(GLOB SOURCES_CLASSIC "${BTSTACK_ROOT}/src/classic/*.c")
file(GLOB SOURCES_MESH "${BTSTACK_ROOT}/src/mesh/*.c")
file(GLOB SOURCES_BLUEDROID "${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/*.c" "${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/*.c")
file(GLOB SOURCES_MD5 "${BTSTACK_ROOT}/3rd-party/md5/md5.c")
file(GLOB SOURCES_UECC "${BTSTACK_ROOT}/3rd-party/micro-ecc/uECC.c")
file(GLOB SOURCES_YXML "${BTSTACK_ROOT}/3rd-party/yxml/yxml.c")
file(GLOB SOURCES_HXCMOD "${BTSTACK_ROOT}/3rd-party/hxcmod-player/*.c" "${BTSTACK_ROOT}/3rd-party/hxcmod-player/mods/*.c")
file(GLOB SOURCES_RIJNDAEL "${BTSTACK_ROOT}/3rd-party/rijndael/rijndael.c")
set(SOURCES_POSIX
${BTSTACK_ROOT}/platform/posix/btstack_audio_portaudio.c
${BTSTACK_ROOT}/platform/posix/btstack_tlv_posix.c
${BTSTACK_ROOT}/platform/posix/wav_util.c
)
set(SOURCES_CHIPSET
${BTSTACK_ROOT}/chipset/bcm/btstack_chipset_bcm.c
${BTSTACK_ROOT}/chipset/cc256x/btstack_chipset_cc256x.c
bluetooth_init_cc2564C_1.3.c
${BTSTACK_ROOT}/chipset/csr/btstack_chipset_csr.c
)
set(LWIP_CORE_SRC
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/def.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/inet_chksum.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/init.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ip.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/mem.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/memp.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/netif.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/pbuf.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/tcp.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/tcp_in.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/tcp_out.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/timeouts.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/udp.c
)
set (LWIP_IPV4_SRC
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/acd.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/dhcp.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/etharp.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/icmp.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/ip4.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/ip4_addr.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/ip4_frag.c
)
set (LWIP_NETIF_SRC
${BTSTACK_ROOT}/3rd-party/lwip/core/src/netif/ethernet.c
)
set (LWIP_HTTPD
${BTSTACK_ROOT}/3rd-party/lwip/core/src/apps/http/altcp_proxyconnect.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/apps/http/fs.c
${BTSTACK_ROOT}/3rd-party/lwip/core/src/apps/http/httpd.c
)
set (LWIP_DHCPD
${BTSTACK_ROOT}/3rd-party/lwip/dhcp-server/dhserver.c
)
set (LWIP_PORT
${BTSTACK_ROOT}/platform/lwip/port/sys_arch.c
${BTSTACK_ROOT}/platform/lwip/bnep_lwip.c
)
set (SOURCES_LWIP ${LWIP_CORE_SRC} ${LWIP_IPV4_SRC} ${LWIP_NETIF_SRC} ${LWIP_HTTPD} ${LWIP_DHCPD} ${LWIP_PORT})
file(GLOB SOURCES_BLE_OFF "${BTSTACK_ROOT}/src/ble/le_device_db_memory.c")
list(REMOVE_ITEM SOURCES_BLE ${SOURCES_BLE_OFF})
# select POSIX vs Windows versions
IF (WIN32)
message("Building for Windows using WinUSB")
set(SOURCES_HCI_USB ${BTSTACK_ROOT}/platform/windows/hci_transport_h2_winusb.c)
set(SOURCES_STDIN ${BTSTACK_ROOT}/platform/windows/btstack_stdin_windows.c)
link_libraries( winusb setupapi)
ELSE()
message("Building for POSIX using libusb")
# add libusb
find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h PATH_SUFFIXES "include" "libusb" "libusb-1.0")
find_library(LIBUSB_LIBRARY NAMES usb-1.0 PATH_SUFFIXES "lib" "lib32" "lib64" "dylib")
get_filename_component(LIBUSB_LIBRARY_PATH ${LIBUSB_LIBRARY} DIRECTORY)
include_directories( ${LIBUSB_INCLUDE_DIR} )
link_directories( ${LIBUSB_LIBRARY_PATH} )
link_libraries( usb-1.0 )
set(SOURCES_HCI_USB ${BTSTACK_ROOT}/platform/libusb/hci_transport_h2_libusb.c)
set(SOURCES_STDIN ${BTSTACK_ROOT}/platform/posix/btstack_stdin_posix.c)
list(APPEND SOURCES_POSIX ${BTSTACK_ROOT}/platform/posix/btstack_network_posix.c)
list(APPEND SOURCES_POSIX ${BTSTACK_ROOT}/platform/posix/btstack_uart_block_posix.c)
ENDIF()
set(SOURCES
${SOURCES_MD5}
${SOURCES_YXML}
${SOURCES_BLUEDROID}
${SOURCES_POSIX}
${SOURCES_RIJNDAEL}
${SOURCES_HCI_USB}
${SOURCES_STDIN}
${SOURCES_SRC}
${SOURCES_BLE}
${SOURCES_GATT}
${SOURCES_MESH}
${SOURCES_CLASSIC}
${SOURCES_UECC}
${SOURCES_HXCMOD}
${SOURCES_CHIPSET}
)
list(SORT SOURCES)
# create static lib
add_library(btstack-lib STATIC ${SOURCES})
# create targets for all examples
file(GLOB EXAMPLES_C "${BTSTACK_ROOT}/example/*.c")
list(SORT EXAMPLES_C)
file(GLOB EXAMPLES_GATT "${BTSTACK_ROOT}/example/*.gatt")
# remove some
file(GLOB EXAMPLES_OFF "${BTSTACK_ROOT}/example/panu_demo.c" "${BTSTACK_ROOT}/example/sco_demo_util.c" "${BTSTACK_ROOT}/example/ant_test.c" "${BTSTACK_ROOT}/example/avrcp_browsing_client.c")
list(REMOVE_ITEM EXAMPLES_C ${EXAMPLES_OFF})
# on Mac 10.14, adding lwip to libstack results in a yet not understood link error
# workaround: add lwip sources only to lwip_examples
set (LWIP_EXAMPLES pan_lwip_http_server)
# create targets
foreach(EXAMPLE_FILE ${EXAMPLES_C})
get_filename_component(EXAMPLE ${EXAMPLE_FILE} NAME_WE)
set (SOURCE_FILES ${EXAMPLE_FILE})
# add qt main.cpp and run loop
list(APPEND SOURCE_FILES ${BTSTACK_ROOT}/platform/qt/btstack_run_loop_qt.cpp main.cpp)
# add lwip sources for lwip examples
if ( "${LWIP_EXAMPLES}" MATCHES ${EXAMPLE} )
list(APPEND SOURCE_FILES ${SOURCES_LWIP})
endif()
# add GATT DB creation
if ( "${EXAMPLES_GATT}" MATCHES ${EXAMPLE} )
message("example ${EXAMPLE} -- with GATT DB")
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE}.h
COMMAND ${PYTHON_EXECUTABLE}
ARGS ${BTSTACK_ROOT}/tool/compile_gatt.py ${BTSTACK_ROOT}/example/${EXAMPLE}.gatt ${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE}.h
)
list(APPEND SOURCE_FILES ${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE}.h)
# generated file does not need AUTOMOC and AUOUIC processing
set_property(SOURCE {CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE}.h PROPERTY SKIP_AUTOGEN ON)
else()
message("example ${EXAMPLE}")
endif()
add_executable(${EXAMPLE} ${SOURCE_FILES} )
target_link_libraries(${EXAMPLE} btstack-lib Qt5::Core)
endforeach(EXAMPLE_FILE)

45
port/qt-h4/README.md Normal file
View File

@ -0,0 +1,45 @@
# BTstack Port for QT with H4 Bluetooth Controller
Uses libusb Library on macOS and Linux and WinUSB on Windows.
Windows is supported with the MinGW Kit.
Windows with MSVC or Embedded (bare metal) platforms not supported yet.
## Configuration
Most Bluetooth Bluetooth Controllers connected via UART/H4 require some special configuration, e.g. to set the UART baud rate, and/or require firmware patches during startup. In this port, we've tried to do most of these automatically based on information gathered from the Bluetooth Controller. Here's some Controller specific details:
## TI CC256x
The CC2564x needs the correct init script to start up. The Makfile already has entries for most silicon revisions:
- CC2560: bluetooth_init_cc2564_2.14.c
- CC2564B: bluetooth_init_cc2564B_1.6_BT_Spec_4.1.
- CC2564C: bluetooth_init_cc2564C_1.3.c
Please pick the correct one. The main.c verifies that the correct script is loaded, but the init script is linked to the executable.
## Broadcom BCM/CYW 43430
The correct firmware file needs to be provided in the current working directory. The Makefile downloads the one for the BCM43430 e.g. found on later Raspberry Pi editions. Please see the separate port/raspi, too.
## Compilation
On all platforms, you'll need Qt Python 3 installed.
On macOS/Linux [libusb-1.0](http://libusb.info) or higher is required, too.
When everything is ready, you can open the provided CMakelists.txt project in Qt Creator and run any of the provided examples.
See Qt documentation on how to compile on the command line or with other IDEs
## Running the examples
BTstack's HCI USB transport will try to find a suitable Bluetooth module and use it.
On start, BTstack will try to find a suitable Bluetooth module. It will also print the path to the packet log as well as the USB path.
$ ./le_counter
Packet Log: /tmp/hci_dump.pklg
BTstack counter 0001
USB Path: 06
BTstack up and running on 00:1A:7D:DA:71:13.

View File

@ -0,0 +1,532 @@
// init script created from
// - initscripts-TIInit_6.12.26_v1.3.bts
// - AKA TIInit_6.12.26.bts
// - initscripts-TIInit_6.12.26_ble_add-on_v1.3.bts
#include <stdint.h>
#include "btstack_chipset_cc256x.h"
const uint16_t cc256x_init_script_lmp_subversion = 0x9a1a;
uint16_t btstack_chipset_cc256x_lmp_subversion(void){
return cc256x_init_script_lmp_subversion;
}
#if defined(__GNUC__) && defined(__MSP430X__) && (__MSP430X__ > 0)
__attribute__((section (".fartext")))
#endif
#ifdef __AVR__
__attribute__((__progmem__))
#endif
const uint8_t cc256x_init_script[] = {
// #--------------------------------------------------------------------------------
// # Description : Orca C ROM Initialization Script
// #
// # Compatibility: Orca, 12.0.26 ROM
// #
// # Last Updated: 16-Sep-2019 14:26:21.15
// #
// # Version : 12_26.21
// #
// #
// #
// #
// # Notes : Use this script on Orca C, 12.0.26 ROM device only (FW v12.0.26)
// #--------------------------------------------------------------------------------
//
// #################################################################
// ## START of CC256x Add-On
// #################################################################
//
// ## Change UART baudrate
//
// #################################################################
// ## END of CC256x Add-On
// #################################################################
//
0x01, 0x37, 0xfe, 0x02, 0x0c, 0x1a,
//
//
0x01, 0x05, 0xff, 0xff, 0xd0, 0x65, 0x08, 0x00, 0xfa, 0x0c, 0x1a, 0x09, 0x15, 0x01, 0x6a,
0xc8, 0x7b, 0x00, 0x02, 0x89, 0x7b, 0x01, 0x43, 0x09, 0x48, 0x51, 0x30, 0x02, 0x88, 0x06,
0x48, 0x91, 0x42, 0x03, 0xd1, 0x04, 0x49, 0x09, 0x78, 0x01, 0x29, 0x01, 0xd0, 0x5d, 0x30,
0xf7, 0x46, 0xff, 0x30, 0xd8, 0x30, 0xf7, 0x46, 0x76, 0x24, 0x08, 0x00, 0xbd, 0x28, 0x02,
0x00, 0x69, 0x53, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x1e, 0x80, 0x00, 0x8c, 0x4b, 0x19, 0x50, 0x8a, 0x49, 0x0a, 0x50, 0xf7, 0x46, 0xf0, 0xb5,
0x01, 0x1c, 0x88, 0x69, 0x82, 0x88, 0x53, 0x04, 0x5b, 0x0c, 0x88, 0x4e, 0x88, 0x4f, 0x89,
0x4d, 0x03, 0xd0, 0x60, 0x2b, 0x01, 0xdc, 0xb2, 0x42, 0x14, 0xd0, 0x82, 0x88, 0x01, 0x23,
0x1b, 0x03, 0x54, 0x04, 0x64, 0x0f, 0x24, 0x03, 0x9c, 0x42, 0x08, 0xdb, 0x3b, 0x1c, 0x01,
0x33, 0x54, 0x04, 0x24, 0x0d, 0xe4, 0x00, 0x9c, 0x42, 0x01, 0xda, 0xba, 0x42, 0x03, 0xd0,
0xff, 0x20, 0x88, 0x60, 0xe8, 0x1d, 0xf0, 0xbd, 0x01, 0x24, 0xa6, 0x46, 0x7b, 0x49, 0xfe,
0x44, 0x08, 0x47, 0x38, 0x1c, 0xa6, 0x46, 0x7a, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x30, 0x1c,
0xa6, 0x46, 0x77, 0x49,
0x01, 0x05, 0xff, 0xff, 0xca, 0x66, 0x08, 0x00, 0xfa, 0xfe, 0x44, 0x08, 0x47, 0xa6, 0x46,
0x76, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x38, 0x1c, 0xa6, 0x46, 0x73, 0x49, 0xfe, 0x44, 0x08,
0x47, 0xe8, 0x48, 0x01, 0x68, 0x30, 0x1c, 0xa6, 0x46, 0x71, 0x4a, 0xfe, 0x44, 0x10, 0x47,
0x71, 0x48, 0x40, 0x19, 0xf0, 0xbd, 0x01, 0x1c, 0x0a, 0x7d, 0x6f, 0x48, 0x00, 0x2a, 0x02,
0xd0, 0xc9, 0x68, 0x01, 0x29, 0x01, 0xd0, 0x4f, 0x30, 0xf7, 0x46, 0x31, 0x30, 0xf7, 0x46,
0x41, 0x68, 0x02, 0x39, 0x41, 0x60, 0xe9, 0x48, 0x3f, 0x30, 0xf7, 0x46, 0x1c, 0xb5, 0x41,
0x68, 0xe7, 0x4c, 0x00, 0x29, 0x17, 0xd0, 0x41, 0x69, 0xb0, 0x20, 0x40, 0x18, 0xb8, 0x31,
0x6a, 0x46, 0x01, 0x23, 0x9e, 0x46, 0xe9, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x00, 0x99, 0xe8,
0x48, 0xe4, 0x38, 0x41, 0x43, 0x68, 0x46, 0x80, 0x88, 0x41, 0x18, 0xff, 0x20, 0xae, 0x30,
0x81, 0x42, 0x02, 0xd9, 0x20, 0x1c, 0xbf, 0x30, 0x1c, 0xbd, 0x20, 0x1c, 0xdf, 0x30, 0x1c,
0xbd, 0x10, 0xb5, 0x04, 0x1c, 0xc8, 0x68, 0x0a, 0x21, 0x01, 0x22, 0x96, 0x46, 0xde, 0x4a,
0xfe, 0x44, 0x10, 0x47, 0x00, 0x28, 0x00, 0xd1, 0x8c, 0x20, 0xa0, 0x60, 0xdc, 0x48, 0xdb,
0x30, 0x10, 0xbd, 0xdc, 0x49, 0x04, 0x39, 0x09, 0x78, 0x00, 0x29, 0x01, 0xd1, 0x00, 0x21,
0x41, 0x60, 0x41, 0x68, 0x42, 0x69, 0x51, 0x1a, 0x41, 0x60, 0xd6, 0x48, 0x55, 0x30, 0xf7,
0x46, 0xd6, 0x49, 0x09, 0x78, 0x00, 0x29, 0x04, 0xd1, 0x01, 0x7d, 0xd3, 0x48, 0x02, 0x30,
0xff, 0x22, 0x42, 0x54, 0xd3, 0x48, 0x4f, 0x30, 0xf7, 0x46, 0x01, 0x1c, 0x8a, 0x69, 0x4b,
0x68, 0xd1, 0x48, 0x9a, 0x42, 0x01, 0xd9, 0x3b, 0x30, 0xf7, 0x46, 0xca, 0x60, 0x79, 0x30,
0xf7, 0x46, 0xcf, 0x48,
0x01, 0x05, 0xff, 0xff, 0xc4, 0x67, 0x08, 0x00, 0xfa, 0xcd, 0x49, 0x08, 0x80, 0xce, 0x48,
0xff, 0x30, 0xde, 0x30, 0xf7, 0x46, 0xc2, 0x69, 0xff, 0x21, 0x11, 0x31, 0x8b, 0x5c, 0xcb,
0x49, 0x5b, 0x08, 0x08, 0xd3, 0xff, 0x23, 0x02, 0x33, 0x9a, 0x5c, 0x02, 0x2a, 0x03, 0xd0,
0x01, 0x2a, 0x01, 0xd0, 0x03, 0x2a, 0x02, 0xd1, 0x08, 0x1c, 0x5b, 0x30, 0xf7, 0x46, 0xff,
0x22, 0x42, 0x60, 0x08, 0x1c, 0x39, 0x30, 0xf7, 0x46, 0x00, 0xb5, 0x40, 0x68, 0x01, 0x21,
0x8e, 0x46, 0xe9, 0x49, 0xfe, 0x44, 0x08, 0x47, 0xe9, 0x48, 0x57, 0x30, 0x00, 0xbd, 0x02,
0x8a, 0x01, 0x79, 0x0a, 0x29, 0x00, 0xdb, 0x0a, 0x21, 0xe6, 0x48, 0x8a, 0x42, 0x01, 0xdd,
0x5f, 0x30, 0xf7, 0x46, 0x5b, 0x30, 0xf7, 0x46, 0xf0, 0xb5, 0x01, 0x24, 0xa6, 0x46, 0xe2,
0x48, 0xfe, 0x44, 0x00, 0x47, 0x01, 0x28, 0x05, 0xd0, 0xa6, 0x46, 0xdf, 0x48, 0xfe, 0x44,
0x00, 0x47, 0x04, 0x28, 0x19, 0xd1, 0x02, 0x26, 0xeb, 0x4d, 0x28, 0x79, 0x00, 0x28, 0x11,
0xd0, 0xe8, 0x7a, 0x06, 0x28, 0x0e, 0xd1, 0x0e, 0x20, 0x01, 0x1c, 0xe8, 0x4f, 0x38, 0x1c,
0x14, 0x38, 0xa6, 0x46, 0xe5, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x38, 0x1c, 0x0e, 0x21, 0xa6,
0x46, 0xe2, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x70, 0x35, 0x01, 0x3e, 0xe7, 0xd1, 0xa6, 0x46,
0xe1, 0x48, 0xfe, 0x44, 0x00, 0x47, 0xe0, 0x49, 0x0b, 0x48, 0x54, 0x30, 0x40, 0x18, 0xf0,
0xbd, 0xc0, 0x46, 0x04, 0xf3, 0x1a, 0x00, 0x80, 0x7b, 0x08, 0x00, 0x03, 0x80, 0x00, 0x00,
0x17, 0x10, 0x00, 0x00, 0xc9, 0xfb, 0x04, 0x00, 0xbb, 0x15, 0x04, 0x00, 0x7d, 0xca, 0x03,
0x00, 0x05, 0x43, 0x02, 0x00, 0x0b, 0xc9, 0x03, 0x00, 0xab, 0x02, 0x00, 0x00, 0xb1, 0x33,
0x02, 0x00, 0xf0, 0xb5,
0x01, 0x05, 0xff, 0xff, 0xbe, 0x68, 0x08, 0x00, 0xfa, 0x8d, 0xb0, 0x01, 0x90, 0x81, 0x69,
0x02, 0x91, 0x01, 0x7d, 0x03, 0x91, 0x42, 0x68, 0x00, 0x92, 0x80, 0x8b, 0x40, 0x00, 0x04,
0x90, 0x6b, 0x48, 0x83, 0x30, 0x00, 0x78, 0x40, 0x00, 0x05, 0x90, 0x00, 0x29, 0x01, 0xd1,
0x00, 0x20, 0xe1, 0xe0, 0x04, 0x98, 0x02, 0x04, 0x12, 0x0c, 0x06, 0x92, 0x02, 0x98, 0x03,
0x99, 0x6b, 0x46, 0x01, 0x24, 0xa6, 0x46, 0xc4, 0x4d, 0xfe, 0x44, 0x28, 0x47, 0x07, 0x90,
0x00, 0x9e, 0x00, 0x20, 0x08, 0x90, 0x7e, 0x48, 0x09, 0x90, 0x0a, 0x90, 0x7f, 0xe0, 0x09,
0x98, 0x00, 0x28, 0x2b, 0xd0, 0x0b, 0x98, 0x09, 0x90, 0x28, 0xe0, 0x05, 0x98, 0x87, 0x42,
0x25, 0xdb, 0x90, 0x79, 0x03, 0x28, 0x01, 0xd0, 0x01, 0x28, 0x20, 0xd1, 0x79, 0x19, 0x05,
0x98, 0x08, 0x1a, 0x07, 0x99, 0xa6, 0x46, 0xb6, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x07, 0x1c,
0x28, 0x1c, 0x07, 0x99, 0xa6, 0x46, 0xb3, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x01, 0x04, 0x09,
0x0c, 0x3a, 0x04, 0x12, 0x0c, 0x00, 0x20, 0xa6, 0x46, 0xaf, 0x4b, 0xfe, 0x44, 0x18, 0x47,
0x00, 0x28, 0x04, 0xd1, 0x0a, 0x98, 0x00, 0x28, 0x03, 0xd0, 0x0a, 0x97, 0x01, 0xe0, 0x00,
0x20, 0x0a, 0x90, 0xb6, 0x68, 0x00, 0x2e, 0x03, 0xd0, 0x30, 0x88, 0x07, 0x99, 0x88, 0x42,
0x49, 0xdb, 0x08, 0x98, 0x00, 0x28, 0x46, 0xd1, 0x5f, 0x49, 0x09, 0x98, 0x88, 0x42, 0x42,
0xd1, 0x0a, 0x98, 0x88, 0x42, 0x3f, 0xd1, 0x03, 0x98, 0x00, 0x28, 0x2c, 0xd0, 0x02, 0x9d,
0x03, 0x98, 0x0c, 0x90, 0x00, 0x27, 0x28, 0x88, 0x0b, 0x90, 0x04, 0x99, 0xa6, 0x46, 0x9a,
0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x28, 0x07, 0xd0, 0x0b, 0x99, 0x04, 0x98, 0xa6, 0x46,
0x96, 0x4a, 0xfe, 0x44,
0x01, 0x05, 0xff, 0xff, 0xb8, 0x69, 0x08, 0x00, 0xfa, 0x10, 0x47, 0x00, 0x28, 0x11, 0xd1,
0x08, 0x98, 0xb8, 0x42, 0x09, 0xd0, 0x08, 0x98, 0xc1, 0x00, 0x02, 0x98, 0x40, 0x18, 0x29,
0x1c, 0x08, 0x22, 0xa6, 0x46, 0xed, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x08, 0x98, 0x40, 0x1c,
0x00, 0x06, 0x00, 0x0e, 0x08, 0x90, 0x08, 0x35, 0x01, 0x37, 0x0c, 0x98, 0x01, 0x38, 0x0c,
0x90, 0xd6, 0xd1, 0x08, 0x98, 0x00, 0x28, 0x0c, 0xd0, 0x02, 0x98, 0x08, 0x99, 0x06, 0x9a,
0x6b, 0x46, 0xa6, 0x46, 0x83, 0x4d, 0xfe, 0x44, 0x28, 0x47, 0x07, 0x90, 0x00, 0x9e, 0x3d,
0x48, 0x09, 0x90, 0x0a, 0x90, 0x00, 0x2e, 0x3a, 0xd0, 0x35, 0x88, 0x07, 0x98, 0x85, 0x42,
0x36, 0xda, 0xb0, 0x68, 0x00, 0x28, 0x05, 0xd0, 0x00, 0x88, 0x07, 0x99, 0x88, 0x42, 0x01,
0xdc, 0x47, 0x1b, 0x04, 0xe0, 0x07, 0x98, 0x40, 0x1b, 0x00, 0x99, 0x09, 0x88, 0x0f, 0x18,
0x72, 0x68, 0x91, 0x88, 0x05, 0x98, 0x40, 0x18, 0x87, 0x42, 0x00, 0xda, 0x6a, 0xe7, 0x48,
0x19, 0x07, 0x99, 0xa6, 0x46, 0x71, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x0b, 0x90, 0x79, 0x19,
0x05, 0x98, 0x08, 0x1a, 0x07, 0x99, 0xa6, 0x46, 0x6c, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x02,
0x04, 0x12, 0x0c, 0x0b, 0x98, 0x01, 0x04, 0x09, 0x0c, 0x00, 0x20, 0xa6, 0x46, 0x68, 0x4b,
0xfe, 0x44, 0x18, 0x47, 0x00, 0x28, 0x00, 0xd1, 0x48, 0xe7, 0x00, 0x20, 0x09, 0x90, 0x06,
0xe0, 0xc0, 0x46, 0xe0, 0x31, 0x08, 0x00, 0x1d, 0x48, 0x09, 0x99, 0x81, 0x42, 0x02, 0xd0,
0x09, 0x98, 0x0a, 0x90, 0x02, 0xe0, 0x0a, 0x99, 0x81, 0x42, 0x01, 0xd0, 0x0a, 0x98, 0x04,
0xe0, 0x06, 0x98, 0xa6, 0x46, 0xe0, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x01, 0x99, 0x48, 0x60,
0xdd, 0x48, 0xff, 0x30,
0x01, 0x05, 0xff, 0xff, 0xb2, 0x6a, 0x08, 0x00, 0xfa, 0x10, 0x30, 0x0d, 0xb0, 0xf0, 0xbd,
0xb7, 0x4b, 0x04, 0x00, 0xfd, 0x79, 0x00, 0x00, 0xdb, 0x49, 0x09, 0x78, 0x2a, 0x29, 0x01,
0xd1, 0x08, 0x21, 0x00, 0xe0, 0x06, 0x21, 0x41, 0x60, 0xd6, 0x48, 0x43, 0x30, 0xf7, 0x46,
0xc0, 0x46, 0x4f, 0x81, 0x03, 0x00, 0xc6, 0x05, 0x00, 0x00, 0x65, 0x2d, 0x00, 0x00, 0x79,
0x47, 0x00, 0x00, 0x0d, 0x13, 0x02, 0x00, 0x76, 0x24, 0x08, 0x00, 0xe0, 0xa0, 0x1b, 0x00,
0x89, 0x28, 0x05, 0x00, 0x3d, 0x39, 0x02, 0x00, 0x60, 0x5b, 0x08, 0x00, 0xff, 0xff, 0x00,
0x00, 0xd9, 0xaa, 0x00, 0x00, 0xd5, 0x75, 0x00, 0x00, 0xfc, 0xb5, 0x00, 0x90, 0xc8, 0x48,
0x00, 0x78, 0x02, 0x28, 0x43, 0xd1, 0xc7, 0x49, 0xff, 0x20, 0x41, 0x30, 0x40, 0x18, 0x01,
0x90, 0xc6, 0x48, 0x40, 0x5c, 0x00, 0x26, 0x38, 0xe0, 0xb1, 0x00, 0x01, 0x98, 0x45, 0x58,
0x00, 0x2d, 0x30, 0xd0, 0xfe, 0x20, 0x40, 0x5d, 0x00, 0x28, 0x2c, 0xd0, 0xf2, 0x20, 0x41,
0x5d, 0x00, 0x29, 0x28, 0xd1, 0xff, 0x20, 0x02, 0x30, 0x40, 0x5d, 0x01, 0x28, 0x23, 0xd0,
0x24, 0x20, 0x01, 0x24, 0xa6, 0x46, 0xba, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x06, 0x00,
0x0e, 0xf3, 0x22, 0x51, 0x5d, 0x81, 0x42, 0x17, 0xd0, 0x50, 0x55, 0x00, 0x28, 0x14, 0xd1,
0x2f, 0x8d, 0x39, 0x1c, 0xb4, 0x48, 0xa6, 0x46, 0x26, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x29,
0x8e, 0x79, 0x18, 0x08, 0x1a, 0x40, 0x1e, 0x39, 0x1c, 0xa6, 0x46, 0x22, 0x4a, 0xfe, 0x44,
0x10, 0x47, 0x40, 0x00, 0x28, 0x86, 0x28, 0x8e, 0x40, 0x08, 0x28, 0x86, 0x01, 0x36, 0xab,
0x48, 0x00, 0x78, 0x86, 0x42, 0xc4, 0xd3, 0xff, 0x21, 0x41, 0x31, 0x00, 0x98, 0x41, 0x60,
0xa9, 0x48, 0xa8, 0x49,
0x01, 0x05, 0xff, 0xff, 0xac, 0x6b, 0x08, 0x00, 0xfa, 0x08, 0x18, 0xfc, 0xbd, 0x23, 0x01,
0x05, 0x00, 0xb3, 0x09, 0x02, 0x00, 0xf9, 0x97, 0x00, 0x00, 0x8f, 0x8d, 0x01, 0x00, 0x10,
0xb5, 0x00, 0x79, 0x01, 0x28, 0x06, 0xd1, 0x88, 0x8b, 0x09, 0x7d, 0x01, 0x22, 0x96, 0x46,
0xa0, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xa0, 0x4c, 0x20, 0x78, 0x01, 0x28, 0x04, 0xd1, 0x01,
0x20, 0x86, 0x46, 0x9e, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x00, 0x20, 0x20, 0x70, 0x9c, 0x49,
0x97, 0x48, 0x88, 0x38, 0x40, 0x18, 0x10, 0xbd, 0xc0, 0x46, 0xa4, 0x13, 0x08, 0x00, 0xe5,
0x06, 0x05, 0x00, 0x14, 0x05, 0x1a, 0x00, 0x77, 0xc5, 0x01, 0x00, 0xb9, 0xc5, 0x01, 0x00,
0xa1, 0x95, 0x01, 0x00, 0x95, 0x49, 0x05, 0x00, 0x21, 0x96, 0x01, 0x00, 0xf0, 0xb5, 0x86,
0xb0, 0x01, 0x92, 0x02, 0x91, 0x06, 0x1c, 0x88, 0x68, 0x00, 0x6a, 0x03, 0x90, 0x80, 0x00,
0x01, 0x99, 0x44, 0x18, 0x04, 0x94, 0x04, 0x19, 0x05, 0x94, 0x04, 0x19, 0x01, 0x98, 0x03,
0x99, 0x01, 0x25, 0xae, 0x46, 0x89, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x04, 0x98, 0x03, 0x99,
0xae, 0x46, 0x86, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x05, 0x98, 0x03, 0x99, 0xae, 0x46, 0x83,
0x4a, 0xfe, 0x44, 0x10, 0x47, 0x02, 0x98, 0x80, 0x68, 0xc7, 0x69, 0x30, 0x68, 0x39, 0x1c,
0x03, 0x9a, 0xae, 0x46, 0x7f, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x00, 0x28, 0x47, 0xd5, 0x70,
0x68, 0x39, 0x1c, 0x03, 0x9a, 0xae, 0x46, 0x7a, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x00, 0x28,
0x3e, 0xd5, 0x30, 0x68, 0x01, 0x99, 0x02, 0x9a, 0x23, 0x1c, 0xae, 0x46, 0x76, 0x4f, 0xfe,
0x44, 0x38, 0x47, 0x00, 0x94, 0x30, 0x68, 0x01, 0x99, 0x04, 0x9a, 0x02, 0x9b, 0xae, 0x46,
0x73, 0x4f, 0xfe, 0x44,
0x01, 0x05, 0xff, 0xff, 0xa6, 0x6c, 0x08, 0x00, 0xfa, 0x38, 0x47, 0x00, 0x94, 0x30, 0x68,
0x02, 0x99, 0x89, 0x68, 0xc9, 0x6a, 0x01, 0x9a, 0x02, 0x9b, 0xae, 0x46, 0x6d, 0x4f, 0xfe,
0x44, 0x38, 0x47, 0x01, 0x98, 0x04, 0x99, 0x05, 0x9a, 0x02, 0x9b, 0xae, 0x46, 0x6a, 0x4f,
0xfe, 0x44, 0x38, 0x47, 0x02, 0x98, 0x80, 0x68, 0x01, 0x6b, 0x05, 0x98, 0x01, 0x9a, 0x02,
0x9b, 0xae, 0x46, 0x65, 0x4f, 0xfe, 0x44, 0x38, 0x47, 0x70, 0x68, 0x04, 0x99, 0x02, 0x9a,
0x23, 0x1c, 0xae, 0x46, 0x5f, 0x4c, 0xfe, 0x44, 0x20, 0x47, 0x01, 0x98, 0x04, 0x99, 0x03,
0x9a, 0xae, 0x46, 0x5b, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x00, 0x28, 0x02, 0xd0, 0x00, 0x20,
0xc0, 0x43, 0x00, 0xe0, 0x00, 0x20, 0x06, 0xb0, 0xf0, 0xbd, 0xf0, 0xb5, 0x85, 0xb0, 0x45,
0x69, 0x86, 0x69, 0xc0, 0x69, 0x02, 0x90, 0x0f, 0x6a, 0x48, 0x6a, 0x03, 0x90, 0x88, 0x6b,
0x04, 0x90, 0x28, 0x1c, 0x00, 0x95, 0x31, 0x6a, 0x89, 0x00, 0x4d, 0x19, 0x01, 0x95, 0x4d,
0x19, 0x31, 0x68, 0x01, 0x29, 0x0d, 0xd1, 0x72, 0x69, 0x39, 0x1c, 0x01, 0x24, 0xa6, 0x46,
0x11, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x72, 0x69, 0x01, 0x98, 0xb9, 0x18, 0xa6, 0x46, 0x0d,
0x4b, 0xfe, 0x44, 0x18, 0x47, 0x68, 0x46, 0x02, 0x99, 0x2a, 0x1c, 0x01, 0x24, 0xa6, 0x46,
0x45, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x45, 0x4d, 0x00, 0x28, 0x02, 0xd0, 0x28, 0x1c, 0x21,
0x30, 0x08, 0xe0, 0xb2, 0x69, 0x03, 0x98, 0x04, 0x99, 0xa6, 0x46, 0x41, 0x4b, 0xfe, 0x44,
0x18, 0x47, 0x28, 0x1c, 0xa9, 0x30, 0x05, 0xb0, 0xf0, 0xbd, 0x5d, 0x5f, 0x05, 0x00, 0x3e,
0x48, 0x00, 0x78, 0x00, 0x07, 0x40, 0x0e, 0x89, 0x6b, 0x49, 0x06, 0x89, 0x0c, 0x08, 0x18,
0x39, 0x49, 0x08, 0x80,
0x01, 0x05, 0xff, 0xff, 0xa0, 0x6d, 0x08, 0x00, 0xfa, 0x3a, 0x48, 0xc5, 0x30, 0xf7, 0x46,
0x01, 0x1c, 0x0a, 0x79, 0x39, 0x48, 0x06, 0x2a, 0x03, 0xdb, 0x92, 0x1f, 0x4a, 0x60, 0x2f,
0x30, 0xf7, 0x46, 0x79, 0x30, 0xf7, 0x46, 0x01, 0x1c, 0x88, 0x69, 0x43, 0x78, 0x3e, 0x22,
0x1a, 0x40, 0x33, 0x48, 0x06, 0x2a, 0x05, 0xdb, 0x9a, 0x06, 0x92, 0x0e, 0x06, 0x3a, 0x4a,
0x60, 0x23, 0x30, 0xf7, 0x46, 0x49, 0x30, 0xf7, 0x46, 0x30, 0xb5, 0x45, 0x68, 0xff, 0x20,
0x11, 0x30, 0x40, 0x5d, 0x80, 0x09, 0x0c, 0xd3, 0x11, 0x21, 0x09, 0x01, 0x4a, 0x5d, 0xdf,
0x20, 0x10, 0x40, 0x48, 0x55, 0x28, 0x1c, 0x00, 0x21, 0x01, 0x22, 0x96, 0x46, 0x26, 0x4a,
0xfe, 0x44, 0x10, 0x47, 0x01, 0x20, 0x04, 0x1c, 0x86, 0x46, 0x24, 0x49, 0xfe, 0x44, 0x08,
0x47, 0xa9, 0x8b, 0x28, 0x1c, 0xa6, 0x46, 0x22, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x21, 0x48,
0x9b, 0x30, 0x30, 0xbd, 0xc0, 0x46, 0x6d, 0x95, 0x00, 0x00, 0x4d, 0x96, 0x01, 0x00, 0x7b,
0x5e, 0x02, 0x00, 0x69, 0x53, 0x08, 0x00, 0x45, 0x10, 0x08, 0x00, 0x54, 0x24, 0x08, 0x00,
0x07, 0x0e, 0x00, 0x00, 0x2b, 0xf0, 0x04, 0x00, 0xff, 0xff, 0xff, 0x01, 0x5b, 0x32, 0x08,
0x00, 0x8f, 0x02, 0x00, 0x00, 0xcd, 0x92, 0x01, 0x00, 0x6f, 0x4b, 0x02, 0x00, 0x54, 0x66,
0x08, 0x00, 0x43, 0x1c, 0x03, 0x00, 0xf5, 0x70, 0x00, 0x00, 0x21, 0x37, 0x05, 0x00, 0xa9,
0x36, 0x05, 0x00, 0xc3, 0x6c, 0x05, 0x00, 0xa5, 0x6c, 0x05, 0x00, 0xd1, 0x1c, 0x05, 0x00,
0x19, 0x6c, 0x08, 0x00, 0x91, 0x48, 0x05, 0x00, 0x47, 0x37, 0x05, 0x00, 0x1c, 0x30, 0x19,
0x00, 0x96, 0xa5, 0x1b, 0x00, 0x61, 0x61, 0x03, 0x00, 0xe1, 0x72, 0x03, 0x00, 0x5f, 0x73,
0x03, 0x00, 0xf5, 0x56,
0x01, 0x05, 0xff, 0xff, 0x9a, 0x6e, 0x08, 0x00, 0xfa, 0x02, 0x00, 0xbb, 0x88, 0x03, 0x00,
0x3b, 0x3b, 0x02, 0x00, 0x9d, 0xcf, 0x02, 0x00, 0x00, 0xb5, 0x00, 0x69, 0xff, 0x21, 0x02,
0x31, 0x09, 0x5c, 0x09, 0x29, 0x05, 0xd1, 0x01, 0x21, 0x00, 0x22, 0x8e, 0x46, 0xcb, 0x4b,
0xfe, 0x44, 0x18, 0x47, 0x00, 0xbd, 0xca, 0x4a, 0x11, 0x88, 0x01, 0x20, 0x40, 0x03, 0x08,
0x43, 0x10, 0x80, 0xf7, 0x46, 0x30, 0xb5, 0x00, 0x69, 0xf4, 0x21, 0x08, 0x5c, 0x01, 0x28,
0x16, 0xd1, 0xc5, 0x48, 0x00, 0x78, 0x03, 0x28, 0x12, 0xd0, 0x00, 0x25, 0x28, 0x1c, 0xc3,
0x49, 0x01, 0x24, 0xa6, 0x46, 0xc2, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x28, 0x08, 0xd0,
0xc1, 0x49, 0xc1, 0x4a, 0xbb, 0x32, 0x20, 0x20, 0x2b, 0x1c, 0xa6, 0x46, 0xc0, 0x4c, 0xfe,
0x44, 0x20, 0x47, 0x30, 0xbd, 0x70, 0xb5, 0x85, 0x69, 0x00, 0x7d, 0x80, 0x1f, 0x11, 0xd0,
0x47, 0x38, 0x2e, 0xd1, 0xa9, 0x79, 0x28, 0x20, 0x48, 0x43, 0xea, 0x4a, 0x10, 0x18, 0x23,
0x22, 0x12, 0x5c, 0x01, 0x2a, 0x25, 0xd1, 0x80, 0x7b, 0x00, 0x28, 0x22, 0xd0, 0xe6, 0x4a,
0x00, 0x20, 0x50, 0x54, 0x70, 0xbd, 0x01, 0x24, 0xa6, 0x46, 0xe4, 0x48, 0xfe, 0x44, 0x00,
0x47, 0x01, 0x28, 0x05, 0xd0, 0xa6, 0x46, 0xe1, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x04, 0x28,
0x11, 0xd1, 0xe8, 0x78, 0x00, 0x28, 0x0e, 0xd1, 0x0e, 0x26, 0x31, 0x1c, 0xed, 0x4d, 0x28,
0x1c, 0x14, 0x38, 0xa6, 0x46, 0xea, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x28, 0x1c, 0x31, 0x1c,
0xa6, 0x46, 0xe7, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x70, 0xbd, 0x70, 0xb5, 0x01, 0x1c, 0x88,
0x69, 0x89, 0x8a, 0xe5, 0x4a, 0x89, 0x1a, 0x1c, 0xd0, 0x1c, 0x39, 0x20, 0xd1, 0xc5, 0x7a,
0x01, 0x21, 0x0c, 0x1c,
0x01, 0x05, 0xff, 0xff, 0x94, 0x6f, 0x08, 0x00, 0xfa, 0x8e, 0x46, 0xe2, 0x4a, 0xfe, 0x44,
0x10, 0x47, 0x06, 0x1c, 0x10, 0x20, 0xa6, 0x46, 0xe0, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x00,
0x2d, 0x11, 0xd0, 0x02, 0x2e, 0x0f, 0xd0, 0xdd, 0x49, 0xde, 0x4a, 0xd9, 0x32, 0x20, 0x20,
0x00, 0x23, 0xa6, 0x46, 0x92, 0x4c, 0xfe, 0x44, 0x20, 0x47, 0x70, 0xbd, 0xc0, 0x7a, 0x00,
0x28, 0x02, 0xd1, 0x00, 0x20, 0xd8, 0x49, 0x08, 0x70, 0x70, 0xbd, 0x00, 0xb5, 0x00, 0x69,
0xff, 0x21, 0x04, 0x31, 0x09, 0x5c, 0x06, 0x29, 0x06, 0xd1, 0xff, 0x21, 0x05, 0x31, 0x0a,
0x5c, 0x2c, 0x2a, 0x01, 0xd1, 0x2d, 0x22, 0x0a, 0x54, 0xff, 0x21, 0x05, 0x31, 0x09, 0x5c,
0x34, 0x29, 0x11, 0xd1, 0xff, 0x21, 0x0b, 0x31, 0x09, 0x5c, 0x91, 0x29, 0x0c, 0xd1, 0xf1,
0x21, 0x09, 0x5c, 0x60, 0x22, 0x4a, 0x43, 0xca, 0x4b, 0x00, 0x21, 0x99, 0x54, 0x06, 0x21,
0x01, 0x22, 0x96, 0x46, 0xc8, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0xbd, 0xf0, 0xb5, 0x06,
0x1c, 0xf7, 0x69, 0x08, 0x20, 0xc0, 0x19, 0x01, 0x24, 0xa6, 0x46, 0xc3, 0x49, 0xfe, 0x44,
0x08, 0x47, 0xc1, 0x7b, 0x09, 0x02, 0x80, 0x7b, 0x08, 0x43, 0x05, 0x04, 0x2d, 0x0c, 0x02,
0x2d, 0x12, 0xd0, 0xbf, 0x48, 0x00, 0x88, 0xa8, 0x42, 0x0e, 0xd1, 0xbe, 0x48, 0x00, 0x78,
0x01, 0x28, 0x0a, 0xd1, 0xbd, 0x48, 0x82, 0x8f, 0x81, 0x6b, 0x08, 0x1c, 0x10, 0x43, 0x04,
0xd0, 0x38, 0x1c, 0xa6, 0x46, 0xba, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x35, 0x60, 0xb9, 0x48,
0x24, 0x30, 0x30, 0x62, 0xf0, 0xbd, 0xf0, 0xb5, 0x85, 0xb0, 0x04, 0x90, 0x87, 0x69, 0x81,
0x8a, 0xb5, 0x48, 0x08, 0x1a, 0x74, 0xd0, 0xb5, 0x49, 0x40, 0x1a, 0x28, 0xd0, 0xb4, 0x49,
0x40, 0x1a, 0x1d, 0xd1,
0x01, 0x05, 0xff, 0xff, 0x8e, 0x70, 0x08, 0x00, 0xfa, 0xe9, 0x48, 0x05, 0x1c, 0x84, 0x3d,
0x00, 0x78, 0x02, 0x28, 0x17, 0xd1, 0x01, 0x24, 0xa6, 0x46, 0xb0, 0x48, 0xfe, 0x44, 0x00,
0x47, 0x00, 0x28, 0x10, 0xd1, 0xa6, 0x46, 0xae, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x00, 0x28,
0x0a, 0xd1, 0xa6, 0x46, 0xac, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x00, 0x28, 0x04, 0xd1, 0x28,
0x78, 0x00, 0x28, 0x01, 0xd1, 0xa8, 0x78, 0x00, 0x28, 0x00, 0xd0, 0x8b, 0xe0, 0xa6, 0x20,
0xa6, 0x46, 0xf0, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x85, 0xe0, 0x99, 0x48, 0x51, 0x38, 0x00,
0x78, 0x2a, 0x28, 0x7c, 0xd1, 0x0e, 0x20, 0xc6, 0x19, 0x44, 0x20, 0x0c, 0x21, 0x1a, 0x22,
0x01, 0x24, 0xa6, 0x46, 0xe9, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0xe8, 0x48, 0x81, 0x78, 0xc2,
0x78, 0xe8, 0x48, 0xa6, 0x46, 0xe8, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x06, 0x20, 0xb8, 0x80,
0x08, 0x25, 0x35, 0x70, 0x01, 0x36, 0x30, 0x1c, 0x00, 0x21, 0xa6, 0x46, 0xe3, 0x4a, 0xfe,
0x44, 0x10, 0x47, 0x06, 0x1c, 0x35, 0x70, 0x01, 0x36, 0x30, 0x1c, 0x0d, 0x21, 0xa6, 0x46,
0xdf, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x06, 0x1c, 0xa6, 0x46, 0xec, 0x48, 0xfe, 0x44, 0x00,
0x47, 0x81, 0x02, 0xd7, 0x48, 0xc0, 0x78, 0x40, 0x06, 0x40, 0x0e, 0x08, 0x43, 0xe7, 0x49,
0x01, 0x43, 0x09, 0x04, 0x09, 0x0c, 0x30, 0x1c, 0xa6, 0x46, 0xd5, 0x4a, 0xfe, 0x44, 0x10,
0x47, 0x7d, 0x80, 0x38, 0x1c, 0xff, 0x21, 0x02, 0x31, 0x00, 0x22, 0xa6, 0x46, 0xed, 0x4b,
0xfe, 0x44, 0x18, 0x47, 0x38, 0xe0, 0x38, 0x1c, 0x00, 0x21, 0x6a, 0x46, 0x01, 0x24, 0xa6,
0x46, 0xea, 0x4b, 0xfe, 0x44, 0x18, 0x47, 0x02, 0xa8, 0x00, 0x21, 0x06, 0x22, 0xa6, 0x46,
0xe7, 0x4b, 0xfe, 0x44,
0x01, 0x05, 0xff, 0xff, 0x88, 0x71, 0x08, 0x00, 0xfa, 0x18, 0x47, 0x00, 0x25, 0x02, 0xe0,
0x68, 0x1c, 0x05, 0x04, 0x2d, 0x0c, 0x6a, 0x48, 0x4f, 0x38, 0x00, 0x78, 0x85, 0x42, 0x23,
0xda, 0x11, 0x20, 0x40, 0x01, 0x68, 0x43, 0xe0, 0x49, 0x0e, 0x18, 0x10, 0x20, 0x80, 0x19,
0x69, 0x46, 0xa6, 0x46, 0xec, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x28, 0xe9, 0xd1, 0x68,
0x46, 0x02, 0xa9, 0xa6, 0x46, 0xe8, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x28, 0xe1, 0xd0,
0xb0, 0x78, 0x01, 0x28, 0xde, 0xd0, 0x38, 0x1c, 0x60, 0x49, 0x3a, 0x22, 0xa6, 0x46, 0xe3,
0x4b, 0xfe, 0x44, 0x18, 0x47, 0xe0, 0x49, 0xe2, 0x31, 0x04, 0x98, 0x01, 0x62, 0x05, 0xb0,
0xf0, 0xbd, 0xc0, 0x46, 0xdd, 0x9d, 0x00, 0x00, 0x3e, 0xa6, 0x1b, 0x00, 0x18, 0x32, 0x08,
0x00, 0xce, 0x04, 0x00, 0x00, 0x23, 0xb9, 0x02, 0x00, 0x19, 0x67, 0x08, 0x00, 0xfd, 0x79,
0x00, 0x00, 0x5d, 0x66, 0x08, 0x00, 0xf0, 0xb5, 0x07, 0x1c, 0xb9, 0x69, 0x48, 0x78, 0xfd,
0x69, 0x25, 0x22, 0x82, 0x1a, 0x28, 0xd0, 0x01, 0x3a, 0x54, 0xd1, 0x04, 0x22, 0xaa, 0x80,
0x0c, 0x22, 0x56, 0x19, 0x40, 0x00, 0x09, 0x78, 0x01, 0x43, 0x31, 0x70, 0x08, 0x20, 0x70,
0x70, 0x02, 0x36, 0x30, 0x1c, 0x0d, 0x21, 0x01, 0x24, 0xa6, 0x46, 0x9a, 0x4a, 0xfe, 0x44,
0x10, 0x47, 0x06, 0x1c, 0xa6, 0x46, 0xa7, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x82, 0x02, 0xd5,
0x48, 0x00, 0x78, 0x40, 0x06, 0x41, 0x0e, 0x11, 0x43, 0xa2, 0x48, 0x08, 0x43, 0x01, 0x04,
0x09, 0x0c, 0x30, 0x1c, 0xa6, 0x46, 0x90, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x25, 0xe0, 0x04,
0x22, 0xaa, 0x80, 0x0c, 0x22, 0x56, 0x19, 0x40, 0x00, 0x09, 0x78, 0x01, 0x43, 0x31, 0x70,
0x08, 0x20, 0x70, 0x70,
0x01, 0x05, 0xff, 0xff, 0x82, 0x72, 0x08, 0x00, 0xfa, 0x02, 0x36, 0x30, 0x1c, 0x0d, 0x21,
0x01, 0x24, 0xa6, 0x46, 0x86, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x06, 0x1c, 0xa6, 0x46, 0x94,
0x48, 0xfe, 0x44, 0x00, 0x47, 0x82, 0x02, 0xc2, 0x48, 0x00, 0x78, 0x40, 0x06, 0x41, 0x0e,
0x11, 0x43, 0x8e, 0x48, 0x08, 0x43, 0x01, 0x04, 0x09, 0x0c, 0x30, 0x1c, 0xa6, 0x46, 0x7c,
0x4a, 0xfe, 0x44, 0x10, 0x47, 0x06, 0x20, 0x68, 0x80, 0x03, 0x20, 0x28, 0x80, 0xdb, 0x48,
0xd9, 0x49, 0x08, 0x18, 0x38, 0x62, 0xf0, 0xbd, 0xd4, 0x1d, 0x08, 0x00, 0x94, 0x54, 0x08,
0x00, 0x8f, 0x8d, 0x01, 0x00, 0x10, 0xb5, 0xd6, 0x48, 0x00, 0x21, 0x01, 0x24, 0xa6, 0x46,
0xd5, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xd4, 0x49, 0x01, 0x28, 0x01, 0xd0, 0x00, 0x20, 0x01,
0xe0, 0x08, 0x68, 0x01, 0x30, 0x08, 0x60, 0xa6, 0x46, 0xd1, 0x48, 0xfe, 0x44, 0x00, 0x47,
0x00, 0x28, 0x06, 0xd0, 0x4b, 0x48, 0x00, 0x78, 0x02, 0x28, 0x02, 0xd1, 0x02, 0x20, 0xcd,
0x49, 0x08, 0x80, 0x10, 0xbd, 0xfd, 0x06, 0x05, 0x00, 0x14, 0x05, 0x1a, 0x00, 0xa2, 0xfd,
0x00, 0x00, 0x65, 0x2d, 0x00, 0x00, 0x7d, 0xca, 0x03, 0x00, 0x59, 0x67, 0x08, 0x00, 0x79,
0x47, 0x00, 0x00, 0x78, 0x24, 0x08, 0x00, 0x76, 0xa0, 0x1b, 0x00, 0xc5, 0x8e, 0x00, 0x00,
0x5b, 0x19, 0x04, 0x00, 0xba, 0x53, 0x08, 0x00, 0x90, 0xa1, 0x1b, 0x00, 0xa8, 0x59, 0x08,
0x00, 0x25, 0x6f, 0x04, 0x00, 0x79, 0x6c, 0x04, 0x00, 0x05, 0x04, 0x00, 0x00, 0xfc, 0x0b,
0x00, 0x00, 0x1d, 0x10, 0x00, 0x00, 0xc1, 0x72, 0x03, 0x00, 0x1b, 0x5f, 0x03, 0x00, 0x53,
0x38, 0x02, 0x00, 0xf8, 0xb5, 0x80, 0x8a, 0xff, 0x21, 0x0b, 0x31, 0x88, 0x42, 0x5f, 0xd0,
0xff, 0x21, 0x45, 0x31,
0x01, 0x05, 0xff, 0xff, 0x7c, 0x73, 0x08, 0x00, 0xfa, 0x88, 0x42, 0x16, 0xd1, 0x2c, 0x48,
0x00, 0x78, 0x02, 0x28, 0x12, 0xd1, 0xaf, 0x49, 0xff, 0x20, 0x41, 0x30, 0x40, 0x18, 0x00,
0x90, 0xae, 0x48, 0x40, 0x5c, 0x00, 0x26, 0x86, 0x42, 0x10, 0xd3, 0x51, 0x25, 0xad, 0x00,
0x28, 0x1c, 0x01, 0x24, 0xa6, 0x46, 0xaa, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x00, 0x28, 0x70,
0xd1, 0x28, 0x1c, 0xa8, 0x49, 0xa6, 0x46, 0xa8, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xf8, 0xbd,
0xb1, 0x00, 0x00, 0x98, 0x45, 0x58, 0x00, 0x2d, 0x30, 0xd0, 0xfe, 0x20, 0x40, 0x5d, 0x00,
0x28, 0x2c, 0xd0, 0xf2, 0x20, 0x41, 0x5d, 0x00, 0x29, 0x28, 0xd1, 0xff, 0x20, 0x02, 0x30,
0x40, 0x5d, 0x01, 0x28, 0x23, 0xd0, 0x24, 0x20, 0x01, 0x24, 0xa6, 0x46, 0x9c, 0x4a, 0xfe,
0x44, 0x10, 0x47, 0x00, 0x06, 0x00, 0x0e, 0xf3, 0x22, 0x51, 0x5d, 0x81, 0x42, 0x17, 0xd0,
0x50, 0x55, 0x00, 0x28, 0x14, 0xd1, 0x2f, 0x8d, 0x39, 0x1c, 0x96, 0x48, 0xa6, 0x46, 0x96,
0x4a, 0xfe, 0x44, 0x10, 0x47, 0x29, 0x8e, 0x79, 0x18, 0x08, 0x1a, 0x40, 0x1e, 0x39, 0x1c,
0xa6, 0x46, 0x92, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x40, 0x00, 0x28, 0x86, 0x28, 0x8e, 0x40,
0x08, 0x28, 0x86, 0x01, 0x36, 0x8e, 0x48, 0x00, 0x78, 0xb2, 0xe7, 0xc0, 0x46, 0x45, 0x10,
0x08, 0x00, 0x00, 0x20, 0x01, 0x24, 0xa6, 0x46, 0x8b, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x01,
0x1c, 0x00, 0x90, 0x89, 0x4d, 0x28, 0x68, 0x01, 0x30, 0x28, 0x60, 0x0b, 0x27, 0x7f, 0x01,
0x87, 0x4e, 0x88, 0x48, 0x00, 0x8d, 0x32, 0x68, 0x10, 0x18, 0x80, 0x01, 0x80, 0x09, 0xa6,
0x46, 0x85, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x28, 0x11, 0xdd, 0x00, 0x98, 0x30, 0x60,
0x28, 0x68, 0x03, 0x28,
0x01, 0x05, 0xff, 0xff, 0x76, 0x74, 0x08, 0x00, 0xfa, 0x0a, 0xd9, 0x00, 0x20, 0xa6, 0x46,
0x80, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x7d, 0x48, 0x38, 0x5c, 0xa6, 0x46, 0x7d, 0x49, 0xfe,
0x44, 0x08, 0x47, 0x00, 0x20, 0x28, 0x60, 0xf8, 0xbd, 0x21, 0xf0, 0x04, 0x00, 0xdb, 0x8e,
0x04, 0x00, 0xfc, 0x53, 0x08, 0x00, 0xc6, 0x02, 0x00, 0x00, 0x8d, 0x8f, 0x04, 0x00, 0xf9,
0x2d, 0x00, 0x00, 0x30, 0xb5, 0x05, 0x69, 0x24, 0x20, 0x00, 0x21, 0x01, 0x24, 0xa6, 0x46,
0x68, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xf3, 0x21, 0x48, 0x55, 0x51, 0x25, 0xad, 0x00, 0x28,
0x1c, 0xa6, 0x46, 0x61, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x00, 0x28, 0x05, 0xd1, 0x28, 0x1c,
0x5f, 0x49, 0xa6, 0x46, 0x5f, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x30, 0xbd, 0xc0, 0x46, 0x00,
0x82, 0xff, 0xff, 0xa9, 0x57, 0x05, 0x00, 0x41, 0x69, 0x00, 0x7e, 0x00, 0x28, 0x11, 0xd1,
0xff, 0x22, 0x04, 0x32, 0x50, 0x5c, 0x01, 0x28, 0x0c, 0xd1, 0xff, 0x20, 0x05, 0x30, 0x43,
0x5c, 0x1b, 0x2b, 0x07, 0xd1, 0xff, 0x23, 0x0a, 0x33, 0x5b, 0x5c, 0x01, 0x2b, 0x02, 0xd1,
0x00, 0x23, 0x53, 0x54, 0x43, 0x54, 0xf7, 0x46, 0xc0, 0x46, 0xed, 0x49, 0x02, 0x00, 0x99,
0x2d, 0x00, 0x00, 0xe9, 0x63, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0xb5, 0x80, 0x69,
0x00, 0x88, 0x02, 0x28, 0x13, 0xd1, 0x44, 0x48, 0x9c, 0x30, 0x01, 0x79, 0xff, 0x29, 0x0e,
0xd0, 0x00, 0x78, 0x03, 0x28, 0x03, 0xd0, 0x01, 0x28, 0x01, 0xd0, 0x02, 0x28, 0x07, 0xd1,
0x01, 0x20, 0x04, 0x1c, 0x86, 0x46, 0x4b, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x4b, 0x48, 0x04,
0x70, 0x10, 0xbd, 0x25, 0x00, 0x00, 0x00, 0x49, 0x8f, 0x03, 0x00, 0x85, 0x48, 0x02, 0x00,
0x10, 0xb5, 0xc0, 0x69,
0x01, 0x05, 0xff, 0xff, 0x70, 0x75, 0x08, 0x00, 0xfa, 0x80, 0x78, 0x80, 0x38, 0x00, 0x06,
0x00, 0x0e, 0x02, 0x28, 0x13, 0xd1, 0x32, 0x48, 0x9c, 0x30, 0x01, 0x79, 0xff, 0x29, 0x0e,
0xd0, 0x00, 0x78, 0x03, 0x28, 0x03, 0xd0, 0x01, 0x28, 0x01, 0xd0, 0x02, 0x28, 0x07, 0xd1,
0x01, 0x20, 0x04, 0x1c, 0x86, 0x46, 0x3a, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x39, 0x48, 0x04,
0x70, 0x10, 0xbd, 0xc0, 0x46, 0xff, 0x53, 0x08, 0x00, 0x10, 0xb5, 0x00, 0x69, 0xfe, 0x21,
0x09, 0x5c, 0x02, 0x29, 0x06, 0xd0, 0xd0, 0x21, 0x09, 0x58, 0x82, 0x8d, 0xd2, 0x00, 0x54,
0x23, 0x1b, 0x18, 0x05, 0xe0, 0x54, 0x21, 0x0b, 0x18, 0x02, 0x8d, 0x06, 0x20, 0x42, 0x43,
0xd9, 0x6f, 0x50, 0x18, 0x80, 0x01, 0x81, 0x09, 0xd8, 0x6d, 0x01, 0x24, 0xa6, 0x46, 0x27,
0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0x28, 0x12, 0xdc, 0x17, 0x48, 0x9c, 0x30, 0x01, 0x79,
0xff, 0x29, 0x0d, 0xd0, 0x00, 0x78, 0x03, 0x28, 0x03, 0xd0, 0x01, 0x28, 0x01, 0xd0, 0x02,
0x28, 0x06, 0xd1, 0x20, 0x1c, 0xa6, 0x46, 0x1f, 0x49, 0xfe, 0x44, 0x08, 0x47, 0x1f, 0x48,
0x04, 0x70, 0x10, 0xbd, 0x00, 0xb5, 0x0a, 0x48, 0x00, 0x68, 0x50, 0x28, 0x06, 0xd9, 0x06,
0x48, 0x00, 0x21, 0x01, 0x22, 0x96, 0x46, 0x1a, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0x00, 0xbd,
0xc0, 0x46, 0x4e, 0x05, 0x00, 0x00, 0xb5, 0xcc, 0x00, 0x00, 0xf8, 0x21, 0x19, 0x00, 0xb3,
0x08, 0x05, 0x00, 0x58, 0x66, 0x08, 0x00, 0x71, 0xcd, 0x01, 0x00, 0x4a, 0x24, 0x19, 0x00,
0x54, 0x24, 0x08, 0x00, 0x07, 0x0e, 0x00, 0x00, 0x21, 0xcb, 0x03, 0x00, 0x00, 0x66, 0xe3,
0x01, 0x0b, 0xc9, 0x03, 0x00, 0x2b, 0xf0, 0x04, 0x00, 0xff, 0xff, 0xff, 0x01, 0x95, 0x49,
0x05, 0x00, 0x5b, 0x32,
0x01, 0x05, 0xff, 0xd5, 0x6a, 0x76, 0x08, 0x00, 0xd0, 0x08, 0x00, 0xd1, 0xa1, 0x04, 0x00,
0x4c, 0x66, 0x08, 0x00, 0x50, 0x66, 0x08, 0x00, 0x48, 0x10, 0x08, 0x00, 0x3f, 0xa2, 0x04,
0x00, 0xab, 0xea, 0x01, 0x00, 0x3d, 0x1d, 0x03, 0x00, 0x54, 0x66, 0x08, 0x00, 0xfd, 0x06,
0x05, 0x00, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x2a, 0xff, 0xff, 0xbd, 0xff, 0xb5, 0x68,
0x46, 0xff, 0xf7, 0x1b, 0xfe, 0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x60, 0xfe,
0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x3b, 0xff, 0xff, 0xbd, 0xff, 0xb5, 0x68,
0x46, 0xff, 0xf7, 0xa8, 0xff, 0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x71, 0xff,
0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x4c, 0xff, 0xff, 0xbd, 0xff, 0xb5, 0x68,
0x46, 0xff, 0xf7, 0xe7, 0xfe, 0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0xf5, 0xfb,
0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x0e, 0xfc, 0xff, 0xbd, 0xff, 0xb5, 0x68,
0x46, 0xff, 0xf7, 0xd6, 0xfb, 0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0xdf, 0xfb,
0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x36, 0xfc, 0xff, 0xbd, 0xff, 0xb5, 0x68,
0x46, 0xff, 0xf7, 0xac, 0xfc, 0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x74, 0xfd,
0xff, 0xbd, 0xff, 0xb5, 0x68, 0x46, 0xff, 0xf7, 0x52, 0xfc, 0xff, 0xbd, 0xff, 0xb5, 0x68,
0x46, 0xff, 0xf7, 0x73, 0xfc, 0xff, 0xbd,
0x01, 0x05, 0xff, 0x8d, 0x78, 0x7b, 0x08, 0x00, 0x88, 0x00, 0xb5, 0xf8, 0xf0, 0xdb, 0xfa,
0x00, 0xbd, 0x6b, 0x66, 0x08, 0x00, 0xf5, 0x66, 0x08, 0x00, 0xd5, 0x65, 0x08, 0x00, 0x0d,
0x67, 0x08, 0x00, 0x79, 0x67, 0x08, 0x00, 0x95, 0x67, 0x08, 0x00, 0xad, 0x67, 0x08, 0x00,
0xc3, 0x67, 0x08, 0x00, 0xd1, 0x67, 0x08, 0x00, 0x01, 0x68, 0x08, 0x00, 0x15, 0x68, 0x08,
0x00, 0x2d, 0x68, 0x08, 0x00, 0xbd, 0x68, 0x08, 0x00, 0xc1, 0x6a, 0x08, 0x00, 0x0d, 0x6b,
0x08, 0x00, 0xc1, 0x6b, 0x08, 0x00, 0x11, 0x6d, 0x08, 0x00, 0x8d, 0x6d, 0x08, 0x00, 0xa7,
0x6d, 0x08, 0x00, 0xbd, 0x6d, 0x08, 0x00, 0xdd, 0x6d, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x67, 0x08, 0x00,
0x01, 0x05, 0xff, 0x85, 0x04, 0xf3, 0x1a, 0x00, 0x80, 0xce, 0xfb, 0x04, 0x00, 0xde, 0x33,
0x02, 0x00, 0x14, 0x29, 0x02, 0x00, 0xf4, 0x4b, 0x04, 0x00, 0x60, 0x13, 0x02, 0x00, 0xd6,
0x28, 0x05, 0x00, 0x74, 0x39, 0x02, 0x00, 0x88, 0xac, 0x00, 0x00, 0x0c, 0x76, 0x00, 0x00,
0x06, 0x0a, 0x02, 0x00, 0x50, 0x98, 0x00, 0x00, 0xb4, 0xc6, 0x01, 0x00, 0x7a, 0x95, 0x00,
0x00, 0xb8, 0x5e, 0x02, 0x00, 0x58, 0x95, 0x01, 0x00, 0xe8, 0x72, 0x00, 0x00, 0x2e, 0x49,
0x05, 0x00, 0x1c, 0x62, 0x03, 0x00, 0x0e, 0x73, 0x03, 0x00, 0x7e, 0x73, 0x03, 0x00, 0x34,
0xd0, 0x02, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x52, 0x48,
0x00, 0x00,
0x01, 0x05, 0xff, 0xff, 0x00, 0x00, 0x18, 0x00, 0xfa, 0x70, 0xb5, 0x37, 0x4d, 0xae, 0x7f,
0x01, 0x24, 0xa6, 0x46, 0x33, 0x48, 0xfe, 0x44, 0x00, 0x47, 0xb0, 0x42, 0xf8, 0xd1, 0x03,
0x20, 0x17, 0x21, 0x89, 0x01, 0xa6, 0x46, 0x2f, 0x4a, 0xfe, 0x44, 0x10, 0x47, 0xad, 0x7f,
0xa6, 0x46, 0x2c, 0x48, 0xfe, 0x44, 0x00, 0x47, 0xa8, 0x42, 0xf9, 0xd1, 0xfe, 0xe7, 0x10,
0xb5, 0x2b, 0x49, 0x08, 0x1f, 0x2b, 0x4a, 0x10, 0x60, 0x2e, 0x48, 0x02, 0x1c, 0x71, 0x3a,
0x93, 0x24, 0x01, 0x23, 0xa3, 0x54, 0x28, 0x4b, 0x0b, 0x60, 0x02, 0x23, 0x13, 0x71, 0x27,
0x4b, 0x4b, 0x60, 0x03, 0x23, 0x53, 0x71, 0x26, 0x4b, 0x8b, 0x60, 0x04, 0x23, 0x03, 0x70,
0x26, 0x4b, 0xcb, 0x60, 0x05, 0x23, 0x83, 0x73, 0x25, 0x4b, 0x0b, 0x61, 0x06, 0x23, 0x03,
0x73, 0x24, 0x4b, 0x4b, 0x61, 0x07, 0x23, 0x43, 0x71, 0x23, 0x4b, 0x8b, 0x61, 0x08, 0x24,
0x03, 0x1c, 0x33, 0x3b, 0x1c, 0x70, 0x21, 0x4b, 0xcb, 0x61, 0x09, 0x23, 0xd3, 0x74, 0x20,
0x4b, 0x0b, 0x62, 0x0a, 0x23, 0xd3, 0x71, 0x1f, 0x4b, 0x4b, 0x62, 0x0b, 0x23, 0x43, 0x77,
0x1e, 0x4b, 0x8b, 0x62, 0x0c, 0x24, 0x03, 0x1c, 0x3d, 0x3b, 0x1c, 0x70, 0x1c, 0x4b, 0xcb,
0x62, 0x0f, 0x38, 0x0d, 0x23, 0x03, 0x70, 0x1b, 0x4b, 0x0b, 0x63, 0x0e, 0x23, 0x03, 0x73,
0x1a, 0x4b, 0x4b, 0x63, 0x0f, 0x23, 0x43, 0x73, 0x19, 0x4b, 0x8b, 0x63, 0x10, 0x23, 0x03,
0x77, 0x18, 0x48, 0xc8, 0x63, 0x11, 0x20, 0x10, 0x70, 0x17, 0x48, 0x08, 0x64, 0x10, 0xbd,
0x25, 0x86, 0x04, 0x00, 0x1b, 0x90, 0x04, 0x00, 0x6c, 0x52, 0x08, 0x00, 0x08, 0x66, 0x08,
0x00, 0x20, 0x55, 0x08, 0x00, 0xf5, 0x76, 0x08, 0x00, 0x09, 0x77, 0x08, 0x00, 0xeb, 0x76,
0x08, 0x00, 0x95, 0x55,
0x01, 0x05, 0xff, 0xff, 0xfa, 0x00, 0x18, 0x00, 0xfa, 0x08, 0x00, 0x27, 0x77, 0x08, 0x00,
0xff, 0x76, 0x08, 0x00, 0xe1, 0x76, 0x08, 0x00, 0x31, 0x77, 0x08, 0x00, 0x13, 0x77, 0x08,
0x00, 0x1d, 0x77, 0x08, 0x00, 0xa5, 0x76, 0x08, 0x00, 0xd7, 0x76, 0x08, 0x00, 0x9b, 0x76,
0x08, 0x00, 0x91, 0x76, 0x08, 0x00, 0xaf, 0x76, 0x08, 0x00, 0xcd, 0x76, 0x08, 0x00, 0xc3,
0x76, 0x08, 0x00, 0xb9, 0x76, 0x08, 0x00, 0xf0, 0xb5, 0x2b, 0x4e, 0x0c, 0x22, 0x32, 0x70,
0x1a, 0x23, 0x73, 0x70, 0x09, 0x20, 0xb0, 0x70, 0x15, 0x20, 0xf0, 0x70, 0x03, 0x20, 0x28,
0x4d, 0x29, 0x1c, 0x01, 0x39, 0x01, 0x24, 0xa6, 0x46, 0x24, 0x4f, 0xfe, 0x44, 0x38, 0x47,
0xb2, 0x78, 0xf3, 0x78, 0x03, 0x20, 0x29, 0x1c, 0xa6, 0x46, 0x20, 0x4e, 0xfe, 0x44, 0x30,
0x47, 0x03, 0x20, 0x29, 0x1c, 0x01, 0x31, 0xa6, 0x46, 0x1f, 0x4a, 0xfe, 0x44, 0x10, 0x47,
0xa6, 0x46, 0x1e, 0x48, 0xfe, 0x44, 0x00, 0x47, 0x1d, 0x4b, 0x00, 0x21, 0x08, 0x1c, 0x1a,
0x68, 0x00, 0x2a, 0x04, 0xd0, 0x02, 0x07, 0x15, 0x0f, 0x22, 0x1c, 0xaa, 0x40, 0x11, 0x43,
0x02, 0x07, 0x12, 0x0f, 0x0f, 0x2a, 0x05, 0xd1, 0xc5, 0x08, 0x06, 0x22, 0x2a, 0x40, 0x15,
0x4d, 0xa9, 0x52, 0x00, 0x21, 0x04, 0x33, 0x01, 0x30, 0x20, 0x28, 0xe9, 0xd3, 0x14, 0x48,
0x01, 0x1c, 0x50, 0x31, 0x0c, 0x70, 0x0a, 0x21, 0x10, 0x4a, 0x11, 0x70, 0x2a, 0x21, 0x01,
0x70, 0x00, 0x25, 0x10, 0x48, 0x05, 0x60, 0x28, 0x1c, 0xa6, 0x46, 0x10, 0x49, 0xfe, 0x44,
0x08, 0x47, 0x0d, 0x49, 0x08, 0x60, 0x0e, 0x48, 0x05, 0x60, 0x07, 0x20, 0x0e, 0x49, 0x08,
0x70, 0xf0, 0xbd, 0xfc, 0x53, 0x08, 0x00, 0x31, 0x90, 0x04, 0x00, 0xc6, 0x05, 0x00, 0x00,
0x1b, 0x90, 0x04, 0x00,
0x01, 0x05, 0xff, 0x2d, 0xf4, 0x01, 0x18, 0x00, 0x28, 0x33, 0x00, 0x18, 0x00, 0x80, 0x7b,
0x08, 0x00, 0x84, 0xf3, 0x1a, 0x00, 0x6d, 0x22, 0x08, 0x00, 0x69, 0x53, 0x08, 0x00, 0x4c,
0x66, 0x08, 0x00, 0x50, 0x66, 0x08, 0x00, 0xd1, 0xa1, 0x04, 0x00, 0x58, 0x66, 0x08, 0x00,
0xb3, 0x11, 0x08, 0x00,
0x01, 0x83, 0xff, 0x14, 0x79, 0x7b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//
//
0x01, 0x0c, 0xfd, 0x09, 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x64, 0x00,
0x01, 0x09, 0xfd, 0x08, 0x58, 0x60, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x10,
0x01, 0x09, 0xfd, 0x08, 0x10, 0x60, 0x1a, 0x00, 0x10, 0x00, 0x10, 0x00,
0x01, 0x1c, 0xfd, 0x14, 0xff, 0x88, 0x13, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0x00, 0xfa, 0x00, 0xff, 0xff, 0x00,
//
//
// ##--------------------------------------------------------------------------------
// ## Description: ORCA_C Commercial PHY FW Initialization Script
// ##--------------------------------------------------------------------------------
0x01, 0x76, 0xfd, 0x31, 0x01, 0x21, 0x54, 0x00, 0x00, 0x61, 0x57, 0x00, 0x00, 0x14, 0x05,
0x0a, 0x05, 0x00, 0x07, 0x06, 0x0a, 0x04, 0x05, 0x08, 0x09, 0x0b, 0x0c, 0x0d, 0x0e, 0x10,
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,
// BTstack: added HCI_VS_SET_POWER_VECTOR(GFSK) 0xFD82 template
0x01, 0x82, 0xfd, 0x14, 0x00, 0x9c, 0x18, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xd2, 0xdc,
0xe6, 0xf0, 0xfa, 0x04, 0x0e, 0x18, 0xff, 0x00, 0x00,
// BTstack: added HCI_VS_SET_POWER_VECTOR(EDR2) 0xFD82 template
0x01, 0x82, 0xfd, 0x14, 0x01, 0x9c, 0xce, 0xce, 0xce, 0xce, 0xce, 0xce, 0xce, 0xce, 0xd8,
0xe2, 0xec, 0xf6, 0x00, 0x0a, 0x14, 0xff, 0x00, 0x00,
// BTstack: added HCI_VS_SET_POWER_VECTOR(EDR3) 0xFD82 for EDR3 template
0x01, 0x82, 0xfd, 0x14, 0x02, 0x9c, 0xce, 0xce, 0xce, 0xce, 0xce, 0xce, 0xce, 0xce, 0xd8,
0xe2, 0xec, 0xf6, 0x00, 0x0a, 0x14, 0xff, 0x00, 0x00,
// BTstack: added HCI_VS_SET_CLASS2_SINGLE_POWER 0xFD87 template
0x01, 0x87, 0xfd, 0x03, 0x0d, 0x0d, 0x0d,
0x01, 0x80, 0xfd, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x01, 0x80, 0xfd, 0x06, 0x3c, 0xf0, 0x5f, 0x00, 0x00, 0x00,
//
//
//
0x01, 0x38, 0xfe, 0x00,
//
// #################################################################
// ## START of CC2564 Adds-On
// #################################################################
//
// ## Enable fast clock XTAL support
0x01, 0x1c, 0xfd, 0x14, 0x01, 0x88, 0x13, 0x00, 0x00, 0xd0, 0x07, 0x00, 0x00, 0xff, 0xff,
0x04, 0xff, 0xff, 0xff, 0xfa, 0x00, 0x00, 0x00, 0x00,
//
// ## Enable eHCILL
0x01, 0x2b, 0xfd, 0x05, 0x10, 0x00, 0x50, 0x00, 0x96,
//
0x01, 0x0c, 0xfd, 0x09, 0x01, 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0x64, 0x00,
//
// #################################################################
// ## END of CC2564 Adds-On
// #################################################################
0x01, 0x5b, 0xfd, 0x02, 0x01, 0x01,
//
0x01, 0xdd, 0xfd, 0x01, 0x01,
};
const uint32_t cc256x_init_script_size = 5773;

View File

@ -0,0 +1,55 @@
//
// btstack_config.h for libusb port
//
#ifndef __BTSTACK_CONFIG
#define __BTSTACK_CONFIG
// Port related features
#define HAVE_MALLOC
#define HAVE_POSIX_FILE_IO
#define HAVE_BTSTACK_STDIN
#define HAVE_POSIX_TIME
// BTstack features that can be enabled
#define ENABLE_BLE
#define ENABLE_CLASSIC
#define ENABLE_HFP_WIDE_BAND_SPEECH
#define ENABLE_LE_CENTRAL
#define ENABLE_LE_PERIPHERAL
#define ENABLE_LE_SECURE_CONNECTIONS
#define ENABLE_LE_DATA_CHANNELS
#define ENABLE_MICRO_ECC_FOR_LE_SECURE_CONNECTIONS
#define ENABLE_LE_DATA_LENGTH_EXTENSION
#define ENABLE_ATT_DELAYED_RESPONSE
#define ENABLE_LOG_ERROR
#define ENABLE_LOG_INFO
#define ENABLE_SCO_OVER_HCI
#define ENABLE_SDP_DES_DUMP
#define ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE
#define ENABLE_SOFTWARE_AES128
// BTstack configuration. buffers, sizes, ...
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof BNEP header, avoid memcpy
#define NVM_NUM_DEVICE_DB_ENTRIES 20
// Mesh Configuration
#define ENABLE_MESH
#define ENABLE_MESH_ADV_BEARER
#define ENABLE_MESH_GATT_BEARER
#define ENABLE_MESH_PB_ADV
#define ENABLE_MESH_PB_GATT
#define ENABLE_MESH_PROXY_SERVER
#define ENABLE_MESH_PROVISIONER
#define MAX_NR_MESH_TRANSPORT_KEYS 16
#define MAX_NR_MESH_VIRTUAL_ADDRESSES 16
#define MAX_NR_MESH_SUBNETS 2
// allow for one NetKey update
#define MAX_NR_MESH_NETWORK_KEYS (MAX_NR_MESH_SUBNETS+1)
#endif

278
port/qt-h4/main.cpp Normal file
View File

@ -0,0 +1,278 @@
/*
* Copyright (C) 2019 BlueKitchen GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* 4. Any redistribution, use, or modification is done solely for
* personal benefit and not for any commercial purpose or for
* monetary gain.
*
* THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
* RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Please inquire about commercial licensing options at
* contact@bluekitchen-gmbh.com
*
*/
#define __BTSTACK_FILE__ "main.c"
// *****************************************************************************
//
// minimal setup for HCI code
//
// *****************************************************************************
#include <QCoreApplication>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include "btstack_config.h"
#include "bluetooth_company_id.h"
#include "btstack_debug.h"
#include "btstack_event.h"
#include "ble/le_device_db_tlv.h"
#include "classic/btstack_link_key_db_tlv.h"
#include "btstack_memory.h"
#include "btstack_run_loop.h"
#include "btstack_run_loop_qt.h"
#include "hal_led.h"
#include "hci.h"
#include "hci_dump.h"
#include "btstack_stdin.h"
#include "btstack_audio.h"
#include "btstack_tlv_posix.h"
#include "btstack_uart_block.h"
// chipsets
#include "btstack_chipset_bcm.h"
#include "btstack_chipset_csr.h"
#include "btstack_chipset_cc256x.h"
#ifdef Q_OS_WIN
#define TLV_DB_PATH_PREFIX "btstack"
#else
#define TLV_DB_PATH_PREFIX "/tmp/btstack_"
#endif
#define TLV_DB_PATH_POSTFIX ".tlv"
static char tlv_db_path[100];
static const btstack_tlv_t * tlv_impl;
static btstack_tlv_posix_t tlv_context;
static bd_addr_t local_addr;
static int is_bcm;
extern "C" int btstack_main(int argc, const char * argv[]);
static const uint8_t read_static_address_command_complete_prefix[] = { 0x0e, 0x1b, 0x01, 0x09, 0xfc };
static bd_addr_t static_address;
static int using_static_address;
static btstack_packet_callback_registration_t hci_event_callback_registration;
// H4
static hci_transport_config_uart_t config = {
HCI_TRANSPORT_CONFIG_UART,
115200,
0, // main baudrate
1, // flow control
NULL,
};
static void use_fast_uart(void){
printf("Using 921600 baud.\n");
config.baudrate_main = 921600;
}
static void local_version_information_handler(uint8_t * packet){
printf("Local version information:\n");
uint16_t hci_version = packet[6];
uint16_t hci_revision = little_endian_read_16(packet, 7);
uint16_t lmp_version = packet[9];
uint16_t manufacturer = little_endian_read_16(packet, 10);
uint16_t lmp_subversion = little_endian_read_16(packet, 12);
printf("- HCI Version 0x%04x\n", hci_version);
printf("- HCI Revision 0x%04x\n", hci_revision);
printf("- LMP Version 0x%04x\n", lmp_version);
printf("- LMP Subversion 0x%04x\n", lmp_subversion);
printf("- Manufacturer 0x%04x\n", manufacturer);
switch (manufacturer){
case BLUETOOTH_COMPANY_ID_CAMBRIDGE_SILICON_RADIO:
printf("Cambridge Silicon Radio - CSR chipset, Build ID: %u.\n", hci_revision);
use_fast_uart();
hci_set_chipset(btstack_chipset_csr_instance());
break;
case BLUETOOTH_COMPANY_ID_TEXAS_INSTRUMENTS_INC:
printf("Texas Instruments - CC256x compatible chipset.\n");
if (lmp_subversion != btstack_chipset_cc256x_lmp_subversion()){
printf("Error: LMP Subversion does not match initscript! ");
printf("Your initscripts is for %s chipset\n", btstack_chipset_cc256x_lmp_subversion() < lmp_subversion ? "an older" : "a newer");
printf("Please update CMakeLists.txt to include the appropriate bluetooth_init_cc256???.c file\n");
exit(10);
}
use_fast_uart();
hci_set_chipset(btstack_chipset_cc256x_instance());
#ifdef ENABLE_EHCILL
printf("eHCILL enabled.\n");
#else
printf("eHCILL disable.\n");
#endif
break;
case BLUETOOTH_COMPANY_ID_BROADCOM_CORPORATION:
printf("Broadcom/Cypress - using BCM driver.\n");
hci_set_chipset(btstack_chipset_bcm_instance());
use_fast_uart();
is_bcm = 1;
break;
default:
printf("Unknown manufacturer / manufacturer not supported yet.\n");
break;
}
}
static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
UNUSED(channel);
UNUSED(size);
if (packet_type != HCI_EVENT_PACKET) return;
switch (hci_event_packet_get_type(packet)){
case BTSTACK_EVENT_STATE:
if (btstack_event_state_get_state(packet) != HCI_STATE_WORKING) return;
gap_local_bd_addr(local_addr);
if (using_static_address){
memcpy(local_addr, static_address, 6);
}
printf("BTstack up and running on %s.\n", bd_addr_to_str(local_addr));
strcpy(tlv_db_path, TLV_DB_PATH_PREFIX);
#ifndef Q_OS_WIN
// bd_addr_to_str use ":" which is not allowed in windows file names
strcat(tlv_db_path, bd_addr_to_str(local_addr));
#endif
strcat(tlv_db_path, TLV_DB_PATH_POSTFIX);
tlv_impl = btstack_tlv_posix_init_instance(&tlv_context, tlv_db_path);
btstack_tlv_set_instance(tlv_impl, &tlv_context);
#ifdef ENABLE_CLASSIC
hci_set_link_key_db(btstack_link_key_db_tlv_get_instance(tlv_impl, &tlv_context));
#endif
#ifdef ENABLE_BLE
le_device_db_tlv_configure(tlv_impl, &tlv_context);
#endif
break;
case HCI_EVENT_COMMAND_COMPLETE:
if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_name)){
if (hci_event_command_complete_get_return_parameters(packet)[0]) break;
// terminate, name 248 chars
packet[6+248] = 0;
printf("Local name: %s\n", &packet[6]);
if (is_bcm){
btstack_chipset_bcm_set_device_name((const char *)&packet[6]);
}
}
if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){
local_version_information_handler(packet);
}
break;
default:
break;
}
}
static void sigint_handler(int param){
UNUSED(param);
printf("CTRL-C - SIGINT received, shutting down..\n");
log_info("sigint_handler: shutting down");
// reset anyway
btstack_stdin_reset();
// power down
hci_power_control(HCI_POWER_OFF);
hci_close();
log_info("Good bye, see you.\n");
exit(0);
}
static int led_state = 0;
void hal_led_toggle(void){
led_state = 1 - led_state;
printf("LED State %u\n", led_state);
}
#define USB_MAX_PATH_LEN 7
int btstack_main(int argc, const char * argv[]);
int main(int argc, char * argv[]){
QCoreApplication a(argc, argv);
/// GET STARTED with BTstack ///
btstack_memory_init();
btstack_run_loop_init(btstack_run_loop_qt_get_instance());
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
char pklg_path[100];
#ifdef Q_OS_WIN
strcpy(pklg_path, "hci_dump.pklg");
#else
strcpy(pklg_path, "/tmp/hci_dump.pklg");
#endif
printf("Packet Log: %s\n", pklg_path);
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// init HCI
#ifdef Q_OS_WIN
const btstack_uart_block_t * uart_driver = btstack_uart_block_windows_instance();
config.device_name = "/dev/tty.usbserial-A900K2WS"; // DFROBOT
#else
const btstack_uart_block_t * uart_driver = btstack_uart_block_posix_instance();
config.device_name = "\\\\.\\COM7";
#endif
const hci_transport_t * transport = hci_transport_h4_instance(uart_driver);
hci_init(transport, (void*) &config);
#ifdef HAVE_PORTAUDIO
btstack_audio_sink_set_instance(btstack_audio_portaudio_sink_get_instance());
btstack_audio_source_set_instance(btstack_audio_portaudio_source_get_instance());
#endif
// inform about BTstack state
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
// handle CTRL-c
signal(SIGINT, sigint_handler);
// setup app
btstack_main(argc, (const char **) argv);
// enter Qt run loop
return a.exec();
}