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 libusb or 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 (libusb) in the right pull pull down list 20- Select “Replace Driver” 21 22## Visual Studio 2022 23 24Visual Studio can directly open the provided `port/windows-windows-h4-zephyr/CMakeLists.txt` and allows to compile and run all examples. 25 26## mingw64 27 28It can also be compiles with a regular Unix-style toolchain like [mingw-w64](https://www.mingw-w64.org). 29mingw64-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.' 30 31In the MSYS2 shell, you can install everything with pacman: 32 33 $ pacman -S git 34 $ pacman -S cmake 35 $ pacman -S make 36 $ pacman -S mingw-w64-x86_64-toolchain 37 $ pacman -S mingw-w64-x86_64-portaudio 38 $ pacman -S python 39 $ pacman -S winpty 40 41### Compilation with CMake 42 43With mingw64-w64 installed, just go to the port/windows-h4 directory and use CMake as usual 44 45 $ cd port/windows-h4 46 $ mkdir build 47 $ cd build 48 $ cmake .. 49 $ make 50 51Note: When compiling with msys2-32 bit and/or the 32-bit toolchain, compilation fails 52as `conio.h` seems to be mission. Please use msys2-64 bit with the 64-bit toolchain for now. 53 54## Console Output 55 56When 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: 57 58 $ winpty ./gatt_counter.exe 59 60The packet log will be written to hci_dump.pklg 61