alex20465 / deskbluez

Connects to a low energy actuator system via bluetooth and allows remote control via command line or internal managed interface.
MIT License
65 stars 12 forks source link

Service unavailable on first run (Fedora) #27

Open alex20465 opened 1 year ago

alex20465 commented 1 year ago

Environment

Fedora Linux 37 (Workstation Edition) Linux 6.1.14-200.fc37.x86_64

Reproduce

Just wait until the bluetooth adapter isn't used and run a single UP command deskbluez up, the error response is:

Service notification [99fa0020-338a-1024-8a49-009c0215f78a] not available.

once the command is repeated it will be executed as expected, the issue is the first run.

my theory is that the bluetooth adapter or service has somekind of idle or power-save state which requires some check before continue to the service discovery of the paired device.

alex20465 commented 1 year ago

Todo: check the powered status at: https://github.com/alex20465/deskbluez/blob/master/src/lib/bluetooth.ts#L21