134fd36daSMatthias Ringwald# BTstack Port for Windows Systems with Intel Wireless 8260/8265 Controllers 2f61339eaSMatthias Ringwald 3f61339eaSMatthias RingwaldSame as port/windows-winusb, but customized for Intel Wireless 8260 and 8265 Controllers. 4f61339eaSMatthias RingwaldThese controller require firmware upload and configuration to work. Firmware and config is downloaded from the Linux firmware repository. 5f61339eaSMatthias Ringwald 698918ebdSMatthias RingwaldThe 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). 798918ebdSMatthias Ringwald 898918ebdSMatthias Ringwald 9f61339eaSMatthias Ringwald## Access to Bluetooth USB Dongle with Zadig 10f61339eaSMatthias Ringwald 11f61339eaSMatthias RingwaldTo 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. 12f61339eaSMatthias Ringwald 13f61339eaSMatthias RingwaldIt works like this: 14f61339eaSMatthias Ringwald 15f61339eaSMatthias Ringwald- Download [Zadig](http://zadig.akeo.ie) 16f61339eaSMatthias Ringwald- Start Zadig 17f61339eaSMatthias Ringwald- Select Options -> “List all devices” 18f61339eaSMatthias Ringwald- Select USB Bluetooth dongle in the big pull down list 19f61339eaSMatthias Ringwald- Select WinUSB (libusb) in the right pull pull down list 20f61339eaSMatthias Ringwald- Select “Replace Driver” 21f61339eaSMatthias Ringwald 2298918ebdSMatthias Ringwald## Visual Studio 2022 23f61339eaSMatthias Ringwald 2498918ebdSMatthias RingwaldVisual Studio can directly open the provided `port/windows-windows-h4-zephyr/CMakeLists.txt` and allows to compile and run all examples. 25f61339eaSMatthias Ringwald 2698918ebdSMatthias Ringwald## mingw64 2798918ebdSMatthias Ringwald 2898918ebdSMatthias RingwaldIt can also be compiles with a regular Unix-style toolchain like [mingw-w64](https://www.mingw-w64.org). 2998918ebdSMatthias Ringwaldmingw64-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.' 30f61339eaSMatthias Ringwald 31*9085f7a5SMatthias RingwaldIn the MSYS2 shell, you can install everything with pacman: 32f61339eaSMatthias Ringwald 33f61339eaSMatthias Ringwald $ pacman -S git 34*9085f7a5SMatthias Ringwald $ pacman -S cmake 35*9085f7a5SMatthias Ringwald $ pacman -S make 36*9085f7a5SMatthias Ringwald $ pacman -S mingw-w64-x86_64-toolchain 37*9085f7a5SMatthias Ringwald $ pacman -S mingw-w64-x86_64-portaudio 38f61339eaSMatthias Ringwald $ pacman -S python 39f61339eaSMatthias Ringwald $ pacman -S winpty 40f61339eaSMatthias Ringwald 41*9085f7a5SMatthias Ringwald### Compilation with CMake 42f61339eaSMatthias Ringwald 43*9085f7a5SMatthias RingwaldWith mingw64-w64 installed, just go to the port/windows-h4 directory and use CMake as usual 44f61339eaSMatthias Ringwald 45*9085f7a5SMatthias Ringwald $ cd port/windows-h4 46*9085f7a5SMatthias Ringwald $ mkdir build 47*9085f7a5SMatthias Ringwald $ cd build 48*9085f7a5SMatthias Ringwald $ cmake .. 49f61339eaSMatthias Ringwald $ make 50f61339eaSMatthias Ringwald 510af1bfd9SMatthias RingwaldNote: When compiling with msys2-32 bit and/or the 32-bit toolchain, compilation fails 520af1bfd9SMatthias Ringwaldas `conio.h` seems to be mission. Please use msys2-64 bit with the 64-bit toolchain for now. 530af1bfd9SMatthias Ringwald 54f61339eaSMatthias Ringwald## Console Output 55f61339eaSMatthias Ringwald 56f61339eaSMatthias RingwaldWhen 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: 57f61339eaSMatthias Ringwald 5898918ebdSMatthias Ringwald $ winpty ./gatt_counter.exe 59f61339eaSMatthias Ringwald 6098918ebdSMatthias RingwaldThe packet log will be written to hci_dump.pklg 61