---
layout: post
title: "btstack compiled on windows with msys"
description: "btstack compiled on windows with msys"
category: 
tags: [bluetooth, windows, msys]
---
{% include JB/setup %}

## Official resource
github
[https://github.com/bluekitchen/btstack](https://github.com/bluekitchen/btstack)

manuual
[http://bluekitchen-gmbh.com/btstack/](http://bluekitchen-gmbh.com/btstack/)


### Install

follow the installation instructions at 'manual'

install python, msys2 (POSIX command line), mingw64 (gcc), git, winpty

```text
To install with MSYS2 : pacman -S mingw-w64-x86_64-gcc
To install with unzip : pacman -S unzip
To install with git   : pacman -S git
To install with winpty: pacman -S winpty
```

(compiling-the-example)[http://bluekitchen-gmbh.com/btstack/quick_start/#compiling-the-examples-and-loading-firmware]

### Modify Makeifle
Use ~/git_home/btstack/port/windows-winusb  as sample

Modify ~/git_home/btstack/port/windows-winusb/Makefile
```
Example=lecounter hfp_hf_demo
```
to
```
Example=lecounter hfp_hf_demo gap_inquiry
```

### Run sample

1. winpty ./gap_inquiry.exe

Inquiry near bluetooth devices

2. winpty ./hfp_hf_demo.exe

Use a phone as hfp ag and connect to this demo

Press 'X' or 'W' in winpty console to show-status or do redial action



Add msys to run btstack on windows by msys example
Add msys to run btstack on windows by msys example
