Error making gattlib with raspberrypi

Asked 2 years ago, Updated 2 years ago, 132 views

https://qiita.com/utsuki_protein/items/5e66b53c55359efbec66
I am trying to install gattlib on raspberrypi by referring to the site above.

Countermeasure 2 is working on it, but https://bitbucket.org/OscarAcena/pygattlib/downloads/
If you download the zip file from and unzip it, you get an error when you run make. How do you fix it?
The errors that occur are as follows.

bluez/btio/btio.c:In function 'set_le_imtu':
bluez/btio/btio.c:624:38:error:'BT_RCVMTU' undeclared(first use in this function)
  if(socksockopt(sock, SOL_BLUETOOTH, BT_RCVMTU, & imtu,

bluez/btio/btio.c:624:38:note:each undeclared identifier is reported only before each function it appears in
bluez/btio/btio.c:Infunction 'l2cap_get':
bluez/btio/btio.c:985:39:error:'BT_RCVMTU' undeclared(first use in this function)
   if(getsockopt(sock, SOL_BLUETOOTH, BT_RCVMTU,

bluez/btio/btio.c:1090:40:error:'BT_SNDMTU' undeclared(first use in this function)
    if(getsockopt(sock, SOL_BLUETOOTH, BT_SNDMTU,

<Built-in>: Target 'btio.o' recipe failed
make[1]: ***[btio.o] Error 1
make[1]—Out of directory '/home/pi/OscarAcena-pygattlib-a858e8626a93/src'
Makefile:4: Target 'all' recipe failed
make: ***[all] Error 2

python raspberry-pi bluetooth

2022-09-30 19:28

1 Answers

compiler error

bluez/btio/btio.c:624:38:error:'BT_RCVMTU' undeclared(first use in this function)

BT_RCVMTU referenced in bluez/btio/btio.c has not been declared.
BT_RCVMTU, BT_SNDMTU is declared in bluez/btio/btio.h, but why don't you add a header file include path to Makefile?

CFLAGS+=-Ibluez/btio


2022-09-30 19:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.