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

BLE advertising #32

Open
mrquincle opened this issue Jul 26, 2018 · 3 comments
Open

BLE advertising #32

mrquincle opened this issue Jul 26, 2018 · 3 comments

Comments

@mrquincle
Copy link

This is a very sweet, tiny library. I've already used it to read out the bits in the overflow area in iOS advertisements.

Do you perhaps mind to also add an example on how to advertise with this utility? I've now to use hcitool cmd and hciconfig hci0 leadv 0 (or 3), etc. It would be swell to be quickly configure my laptop as an iBeacon.

@edrosten
Copy link
Owner

I haven't touched on that side of things yet, I'm afraid!

Currently the library serves two purposes. The first (main) is to act as a BLE client. The second is to poke the HCI device into scanning for servers.

Since it sounds like you're messing with the HCI directly, it sounds like the lescan.cc might have some useful things since it pokes at the HCI device, albeit via the thin C wrapper of libbluetooth.

Can you post the commands you're constructing and sending to the device?

@mrquincle
Copy link
Author

Something like:

sudo hcitool -i hci0 cmd 0x08 0x0008 1e 02 01 1a 1a ff 4c 00 02 15 e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 00 00 00 00 c5 00 00 00 00 00 00 00 00 00 00 00 00 00
sudo hciconfig hci0 leadv 0

For example, nice question at SO: https://stackoverflow.com/questions/23483086/using-hcitool-to-set-ad-packets

@edrosten
Copy link
Owner

edrosten commented Sep 5, 2018

Oh I see. Yes I think this would be a new module for my library. I've not had a chance to look at it yet.

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

2 participants