Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build gatttool #249

Open
arkadiy-telegin opened this issue Apr 16, 2022 · 1 comment
Open

How to build gatttool #249

arkadiy-telegin opened this issue Apr 16, 2022 · 1 comment

Comments

@arkadiy-telegin
Copy link

arkadiy-telegin commented Apr 16, 2022

Could you please add the instructions to build the gatttool to the README.md?

After building the main package as described in README.md, I tried to build examples/gatttool using the same commands:

cd examples/gatttool
mkdir build && cd build
cmake ..
make

However when running cmake .. it produces the following error:

CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:890 (message):
  None of the required 'gattlib' found
Call Stack (most recent call first):
  CMakeLists.txt:26 (pkg_search_module)

Thanks!

@HTCmivi
Copy link

HTCmivi commented Aug 15, 2022

In your build directory you should be able to run the code from the terminal directly ->
/build# ./examples/discover/discover D2:1F:73:D5:6A:81
To access gattlib outside of the repo, type ->
sudo make install
This will install the library in the expected folder (usr/local/lib)
Then you need to ensure that usr/local/lib is in your library path ->
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
With that the library should be available and the "None of the required 'gattlib' found" error should not appear again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants