2

I have a AWS Greengrass setup where I would like to have a Raspberry Pi constantly scanning for BLE devices and if anything is found publish a message via MQTT.

I've gotten the script to work locally on the raspberry PI (running via cron) but when I upload the script to Lambda and publish through Greengrass I am getting an issue with the main python Bluetooth package bluez.

I've tried to use the function as a long running function and also a function invoked via a message to an MQTT topic. Both result in the same error.

The error is coming from inside one of the main python packages responsible for wrapping native linux Bluetooth commands in python.

from beacontools import BeaconScanner

[2018-09-25T08:37:35.311-07:00][ERROR]- self.run() [2018-09-25T08:37:35.311-07:00][ERROR]- File "beacontools/scanner.py", line 92, in run [2018-09-25T08:37:35.311-07:00][ERROR]- self.socket.setsockopt(self.bluez.SOL_HCI, self.bluez.HCI_FILTER, filtr) [2018-09-25T08:37:35.311-07:00][ERROR]-error: (9, 'Bad file descriptor')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.