-
-
Notifications
You must be signed in to change notification settings - Fork 187
Initial Bluetooth LE Central/Client implementation #2409
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
Initial Bluetooth LE Central/Client implementation #2409
Conversation
Bluetooth Central changes
Automated fixes for code style.
Automated fixes for code style.
…d-fdc7-4b24-8f81-b89cdb361030' into Bluetooth-central
…4-45e7-428f-a014-a99f4b066fd0' into Bluetooth-central
…d8c4-45e7-428f-a014-a99f4b066fd0 Code style fixes for nanoframework/nf-interpreter PR#2409
Automated fixes for code style.
…41fd-5e90-46e6-8a0c-c9072c25a8a2 Code style fixes for nanoframework/nf-interpreter PR#2409
…f-interpreter into Bluetooth-central
Automated fixes for code style.
…cb53-7219-4998-b9e4-87340ccbbc27 Code style fixes for nanoframework/nf-interpreter PR#2409
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WOW!! Lot's of work here. Great job. 👏🏻
Just some minor changes requested. 😅
...k.Device.Bluetooth/sys_dev_ble_native_nanoFramework_Device_Bluetooth_BluetoothNanoDevice.cpp
Outdated
Show resolved
Hide resolved
...etooth/sys_dev_ble_native_nanoFramework_Device_Bluetooth_BluetoothLEAdvertisementWatcher.cpp
Outdated
Show resolved
Hide resolved
...ork.Device.Bluetooth/sys_dev_ble_native_nanoFramework_Device_Bluetooth_BluetoothLEDevice.cpp
Show resolved
Hide resolved
...ork.Device.Bluetooth/sys_dev_ble_native_nanoFramework_Device_Bluetooth_BluetoothLEDevice.cpp
Outdated
Show resolved
Hide resolved
Also added some missing defines(no change to behaviour)
…f-interpreter into Bluetooth-central
Automated fixes for code style.
…e4dc-b618-4dd2-b1f1-2dffe83e54eb Code style fixes for nanoframework/nf-interpreter PR#2409
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nf-interpreter/targets/ESP32/_nanoCLR/nanoFramework.Device.Bluetooth/nimble_utils.cpp
Line 85 in 189eaa8
| int map[16]{15, 14, 13, 12, 11, 10, 9, 8, 6, 7, 4, 5, 0, 1, 2, 3}; |
I need to change this so that custom uuid to Guid would work.
int map[16]{12, 13, 14, 15, 10, 11, 8, 9, 7, 6, 5, 4, 3, 2, 1, 0};
Can you please explain where you are seeing a problem. I tried BluetoothLEDevcie.GetGattServices() and it returns correct UUID. Also the line you are changing is not called by anything so it won't make any difference. I made the GuidToNimbleUUID() method but didn't change the code to call it. |
…f-interpreter into Bluetooth-central
Automated fixes for code style.
…00bf-2ca8-441a-add9-ed3159a13cb5 Code style fixes for nanoframework/nf-interpreter PR#2409
Sorry for pointing to the wrong line, it should be line 25 under the function NimbleUUID128ToGuid. Below is what I get from running the Ble Central and displaying the UUID of the services and Characteristic of the BluetoothLESample3. The incorrect one is only the Custom Services and Characteristics. The correct uuid should be |
…f-interpreter into Bluetooth-central
Automated fixes for code style.
…bc4b-5129-43dc-98b1-5cc05a4b084b Code style fixes for nanoframework/nf-interpreter PR#2409
|
Looks like a good time to merge now. More things to be done but these can be done in next PR |
Added Bluetooth Central
|
If I scan, stop, connect the client, and continue scanning while connecting, will it affect the connected client? Because I want to connect five different Bluetooth client devices, but I'm not sure when they start up, so I need to scan regularly. |
|
@bbhxwl this is a question, nothing related with PR workflow. Can you please use our Discord server for these? |
Added Bluetooth Central

Description
Initial implementation of Bluetooth Central/Client.
This covers the base implementation for : -
See nanoFramework.Device.Bluetooth for full details/examples code
Currently no support for pairing/bonding and authentication. This will be in next PR
There is still a fair amount of commented/disabled code and you may also find some TODO comments
Motivation and Context
How Has This Been Tested?
Tested with sample code in separate PR. Will be available once main parts merges and nuget available.
Types of changes
Checklist