-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not get "poweredOn" event in Ubuntu #341
Comments
I had the same issue with "poweredOn" event that never happen. But I'm on Ubuntu 24.04. I investigated and the "first" problem comes from Hci.prototype.setSocketFilter(), the filter pass seems to be invalid for the HCI : "EINVAL, Invalid argument". ` hci set all phys supporting - writing: 01312003000505 +0ms hci setting filter to: 1600000020c10800000000400000 +0ms hci set event mask - writing: 01010c08fffffbff07f8bf3d +1ms hci set le event mask - writing: 010120081fff000000000000 +0ms hci read local version - writing: 01011000 +0ms hci write LE host supported - writing: 016d0c020100 +0ms hci read LE host supported - writing: 016c0c00 +0ms hci le read buffer size - writing: 01022000 +0ms hci read bd addr - writing: 01091000 +0ms hci set scan enabled - writing: 01422006000100000000 +5s ` |
@ollivierv Thanks for your info. I always on same machine and it's always Ubuntu 20.04 LTS. Just stopped working at early this before, before that, it always works. I am afraid it's some dependencies on my system has changed but cannot recall what's that. Where do you get these HCI level log information? Can you teach me? Thanks. -woody |
Please try older version to find if it is regression or not ? |
Are capabilities set correctly as shown in readme? Try if it works with sudo. If yes then the capabilities should be the reason. |
I'm having the same problem in Fedora 40. The sample program in the quickstart example just doesn't work for me at all. I've verified with However in node-poweredup nothing happens, and in the noble same program I never receive the poweredOn event or any events at all. This program prints 'Starting' and then just waits forever.
|
I set hci setting filter to: 1600000020c10800000000400000 +0ms |
Same issue is happing with Ubuntu 22.04. Nearly 6 months ago, I was able to get the discovered peripherals in my computer. |
I dug into this a bit further and I think there might be something else going on. Forgive me if I get this all wrong, as I haven't done C programming in years. But I wrote a sample program to try to replicate what Noble + HCI were doing and found that setsockopt would only work if the option passed in was sized as 16 bytes, not 14 as the setSocketFilter was doing.
This outputs 16. Yay! Except that the program still doesn't work. The noble test program still does nothing and my node poweredup program still doesn't work. I noticed that many places in hci.js use non-multiples of 32 for the buffers to mimic the C structures, so I wonder if maybe that is the issue? But I'm just speculating as I'm in over my head here given the last time I programmed in C was in the 90s. Edited to add: I tried adding |
I had the same issue on Ubuntu 24 and decided to run the entire app in qemu/KVM virtual machine with Node.js 20 and Ubuntu 22. I redirect the USB Bluetooth dongle to the VM on boot. Maybe not the easiest workaround but it does the job for now. |
Hi,
Since a week ago, my small noble application cannot work in my Ubunut, which can scan and connection BLE devices before. But for unknown reason, without any code change in my application, it can no longer work and I found it's because it did not the the "poweredOn" event. But the Bluetooth functionality from the OS point of view is working fine because Ubuntu's bluetooth menu can list and connect to devices as before.
Ubuntu version: 20.04 LTS
Noble version: 1.9.2-25.
What kind problem could it possible be? Where can I find some debug/log information? Thanks.
Kr,
woody
The text was updated successfully, but these errors were encountered: