jacklund / libgatt Goto Github PK
View Code? Open in Web Editor NEWLibrary for Bluetooth 4.0 LE GATT access
License: GNU General Public License v2.0
Library for Bluetooth 4.0 LE GATT access
License: GNU General Public License v2.0
I performed the following:
sudo apt-get install glib2.0
git clone https://github.com/jacklund/libgatt.git
cd libgatt
./configure
make
make all-am
make[1]: Entering directory '/home/chip/libgatt'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -g -O2 -MT src/libgatt_la-att.lo -MD -MP -MF src/.deps/libgatt_la-att.Tpo -c -o src/libgatt_la-att.lo `test -f 'src/att.c' || echo './'`src/att.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -g -O2 -MT src/libgatt_la-att.lo -MD -MP -MF src/.deps/libgatt_la-att.Tpo -c src/att.c -fPIC -DPIC -o src/.libs/libgatt_la-att.o
In file included from src/att.c:37:0:
src/att.h:26:28: fatal error: bluetooth/uuid.h: No such file or directory
#include <bluetooth/uuid.h>
^
compilation terminated.
Makefile:434: recipe for target 'src/libgatt_la-att.lo' failed
make[1]: *** [src/libgatt_la-att.lo] Error 1
make[1]: Leaving directory '/home/chip/libgatt'
Makefile:280: recipe for target 'all' failed
make: *** [all] Error 2
Am I missing some dependency?
I was cross-compiling your libgatt for a MIPS processor under openWrt. I was getting an error with the att.h header file where it could not find "bluetooth/uuid.h". I've noticed it is the only header file that sets the path to "bluetooth/uuid.h" instead of just "uuid.h". WIth that change it cross-compiles successfully on my side.
It is not clear whether gatt library refers to bluez header files such as sdp.h or its own; especially that not all the header files available in src folder of the gatt library and required for compilation, are installed in /usr/local/include/gatt.
On Ubuntu 16.04, the libbluetooth-dev 5.37 package does not include the header file bluetooth/uuid.h
, which precludes using libgatt due to references to this file.
It seems that the upstream BlueZ project made this header file private back in 2013, renaming it to lib/uuid.h
:
https://www.spinics.net/lists/linux-bluetooth/msg33107.html
This probably means that the header file will need to be included in the libgatt repository for the library to be usable with newer versions of BlueZ?
Hello, I have a simple request. Are there any examples you can provide of the use of this library I could use as reference?
Thank you!
Linker was failed with undefined reference:
undefined reference to
gatt_read_char(GAttrib, unsigned short, void ()(unsigned char, unsigned char const, unsigned short, void_), void*)'`
libgatt configure prefix = /usr/local
libgatt lib: -L /usr/local/lib -lgatt
Something wrong with my libgatt build?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.