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

Need an code example that advertises bluetooth services #262

Open
IHNEL opened this issue Oct 4, 2023 · 2 comments
Open

Need an code example that advertises bluetooth services #262

IHNEL opened this issue Oct 4, 2023 · 2 comments

Comments

@IHNEL
Copy link

IHNEL commented Oct 4, 2023

Hello, I have searched around but couldn't find any example with SimpleBLE or SimpleBluez that demonstrates how to advertise new Bluetooth services that other bluetooth devices (like iphone) can scan and connect to.

My purpose is that implementing an application runs on Linux that provide some interesting features. Once the app's running, other mobile phone can connect to the app via Bluetooth and communicate to send data.
I can make the same application on Android with Android Bluetooth APIs. On Linux, the bluetooth API is very complicated to use in C/C++ so I hope I can find an easier way using SimpleBLE.

Thanks in advance.

@eriklins
Copy link
Contributor

eriklins commented Oct 4, 2023

SimpleBLE does not support BLE peripheral role and hence there is no support for BLE advertising or accepting connections from other devices. Not sure if it is planned to add support for this.

@ibokou
Copy link

ibokou commented Oct 5, 2023

You can try and look into mynewt-nimble.
But I had no success with it. The linux example out of the box (which includes advertising) didn't work and I couldn't get it to work so far. The code runs but I see no device being advertised.

It is the same library that has been ported to the esp platform.

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

3 participants