-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hello!
Firstly - let me thank you for your effort - I was looking for a way to control my lamp from Home Assistant and your project would be a great starting point. I have this ceiling lamp with hidden fans that I can control with its remote or via FanLamp Pro (Android app).
I tried to compile your project on a Raspberri PI 3 (running a fresh install of Raspberry Pi OS) but make failed:
/usr/bin/ld: /tmp/ccKXiblm.o: in function `hciSetParams':
lampify.c:(.text+0xa8c): undefined reference to `hci_send_req'
/usr/bin/ld: /tmp/ccKXiblm.o: in function `sendPacket':
lampify.c:(.text+0xacc): undefined reference to `hci_get_route'
/usr/bin/ld: lampify.c:(.text+0xad8): undefined reference to `hci_open_dev'
/usr/bin/ld: lampify.c:(.text+0xb38): undefined reference to `hci_send_req'
/usr/bin/ld: lampify.c:(.text+0xb64): undefined reference to `hci_send_cmd'
/usr/bin/ld: lampify.c:(.text+0xb7c): undefined reference to `hci_le_set_advertise_enable'
/usr/bin/ld: lampify.c:(.text+0xb9c): undefined reference to `hci_le_set_advertise_enable'
/usr/bin/ld: lampify.c:(.text+0xbac): undefined reference to `hci_close_dev'
/usr/bin/ld: /tmp/ccKXiblm.o: in function `decodeCommand':
lampify.c:(.text+0xe18): undefined reference to `notify_init'
/usr/bin/ld: lampify.c:(.text+0xe28): undefined reference to `notify_notification_new'
/usr/bin/ld: lampify.c:(.text+0xe34): undefined reference to `notify_notification_set_timeout'
/usr/bin/ld: lampify.c:(.text+0xe40): undefined reference to `notify_notification_show'
collect2: error: ld returned 1 exit status
make: *** [Makefile:9: all] Error 1
After some research, I understood that it is a common issue that should be solved by using pkg-config, so my Makefile became:
`gcc -Wall -Ofast -o lampify `pkg-config --cflags glib-2.0 gdk-pixbuf-2.0` lampify.c `pkg-config --libs glib-2.0 gdk-pixbuf-2.0 libnotify` -lbluetooth`
In this way, make succeeds, but unfortunately lampify still doesn't pair with the lamp (setup doesn't result in the lamp blinking 3 times).
When I try verbose mode for setup, I get right away [W] Failed to send notification!, without any timeout, so I am not even sure if it tries to send anything.
Any idea?
Thanks!