Skip to content
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

Bluetooth Server is not discoverable #489

Open
fromage9747 opened this issue Mar 22, 2024 · 0 comments
Open

Bluetooth Server is not discoverable #489

fromage9747 opened this issue Mar 22, 2024 · 0 comments

Comments

@fromage9747
Copy link

@atilag

When using this repo I am unable to discover my Device from multiple different Bluetooth Clients external to my device.

What I have done through various troubleshooting steps over a vast amount of forum posts pertaining to many other elements of a bluetooth/rfcomm server:

  1. Installed "apt-get install build-essential libbluetooth-dev"
  2. Installed node-gyp
  3. Modifed /usr/lib/systemd/system/bluetooth.service to the below:
ExecStart=/usr/lib/bluetooth/bluetoothd --compat
ExecStartPost=/bin/chmod 777 /var/run/sdp
  1. Run rfkill unblock bluetooth
  2. Tried various "C" codes ie: https://github.com/atwilc3000/sample/tree/master/Bluetooth without success, but I encounter compilation errors which may be related to the reason why this is not working for me.

I found some post stating that there is something wrong with BlueZ in Ubuntu 22 but running bluetoothctl works perfectly. The server is discoverable and can be connected to.

I am running Ubuntu 22.04, BlueZ 5.64, Node v16.20.2, tested with two dongles incase the built-in one had issues.

At a loss of what I can try next. I understand that this repo is no longer maintained, but do you still use it for your own devices? Do you have an example NodeJS app that I can peruse to try and troubleshoot mine? I am implementing it using NestJS.

If I could just get one bit of code to work externally of using the direct bluetoothctl commands, then perhaps I could find where the issue is coming from.

A lot of what I found online pertains to Unified Remote Control software, which I installed on my Ubuntu machine and worked without issue. I can only assume that this means SDP is working.

What I have been able to ascertain when having a look at your code is that you have done what Ionic has done where they create a bridge between Native code and JavaScript.

Interestingly enough, in order to not waste your time I dig some more searching online and found this repo: https://github.com/Niels-Be/node-bluez which has almost worked. My Bluetooth device is discoverable. Just having issues with pairing.

At least I can rule out my device being the issue.

Any help/advice would be greatly appreciated.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant