1# BTstack Port for Windows Systems with Intel Wireless 8260/8265 Controllers 2 3Same as port/windows-winusb, but customized for Intel Wireless 8260 and 8265 Controllers. 4These controller require firmware upload and configuration to work. Firmware and config is downloaded from the Linux firmware repository. 5 6The port provides both a regular Makefile as well as a CMake build file. It uses native Win32 APIs for file access and does not require the Cygwin or mingw64 build/runtine. All examples can also be build with Visual Studio 2022 (e.g. Community Edition). 7 8 9## Access to Bluetooth USB Dongle with Zadig 10 11To allow WinUSB to access an USB Bluetooth dongle, you need to install a special device driver to make it accessible to user space processes. 12 13It works like this: 14 15- Download [Zadig](http://zadig.akeo.ie) 16- Start Zadig 17- Select Options -> “List all devices” 18- Select USB Bluetooth dongle in the big pull down list 19- Select WinUSB in the right pull down list 20- Select “Replace Driver” 21 22 23 24After the new driver was installed, your device is shown in the Device Manager with Device Provider 'libwdi' 25 26 27 28## Visual Studio 2022 29 30Visual Studio can directly open the provided `port/windows-winusb-intel/CMakeLists.txt` and allows to compile and run all examples. 31 32## mingw64 33 34It can also be compiles with a regular Unix-style toolchain like [mingw-w64](https://www.mingw-w64.org). 35mingw64-w64 is based on [MinGW](https://en.wikipedia.org/wiki/MinGW), which '...provides a complete Open Source programming tool set which is suitable for the development of native MS-Windows applications, and which do not depend on any 3rd-party C-Runtime DLLs.' 36 37In the MSYS2 shell, you can install everything with pacman: 38 39 $ pacman -S git 40 $ pacman -S cmake 41 $ pacman -S make 42 $ pacman -S mingw-w64-x86_64-toolchain 43 $ pacman -S mingw-w64-x86_64-portaudio 44 $ pacman -S python 45 $ pacman -S winpty 46 47### Compilation with CMake 48 49With mingw64-w64 installed, just go to the port/windows-h4 directory and use CMake as usual 50 51 $ cd port/windows-h4 52 $ mkdir build 53 $ cd build 54 $ cmake .. 55 $ make 56 57Note: When compiling with msys2-32 bit and/or the 32-bit toolchain, compilation fails 58as `conio.h` seems to be mission. Please use msys2-64 bit with the 64-bit toolchain for now. 59 60## Console Output 61 62When running the examples in the MSYS2 shell, the console input (via btstack_stdin_support) doesn't work. It works in the older MSYS and also the regular CMD.exe environment. Another option is to install WinPTY and then start the example via WinPTY like this: 63 64 $ winpty ./gatt_counter.exe 65 66The packet log will be written to hci_dump.pklg 67