xref: /btstack/port/windows-winusb-intel/README.md (revision da8e14c5aa3783b6bb7dd63e71572a901bcf168b)
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 git, python, and, winpty with pacman:
32
33    $ pacman -S git
34    $ pacman -S python
35    $ pacman -S winpty
36
37## Compilation
38
39With mingw64-w64 installed, just go to the port/windows-winusb-intel directory and run make
40
41    $ cd btstack/port/windows-winusb
42    $ make
43
44Note: When compiling with msys2-32 bit and/or the 32-bit toolchain, compilation fails
45as `conio.h` seems to be mission. Please use msys2-64 bit with the 64-bit toolchain for now.
46
47## Console Output
48
49When 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:
50
51    $ winpty ./gatt_counter.exe
52
53The packet log will be written to hci_dump.pklg
54