-
Notifications
You must be signed in to change notification settings - Fork 220
Conversation
esp32/network_bluetooth.c: Initial changes for bluetooth esp32/network_bluetooth.h: Initial changes for bluetooth
esp32/modnetwork.c: Added a Bluetooth object esp32/network_bluetooth.*: Early development; some test code esp32/skdconfig: Added define to enable BT
esp32/network_bluetooth.c: incremental changes esp32/sdconfig.h: Enabled bluetooth
Currently broken, as the call to network_bluetooth_set_ble_adv_param in network_bluetooth_init_helper to set defaults causes a segfault
Nowhere near ready for prime time
I've updated the first comment for this PR with a checklist, which presently is just a mashup of suggestions here. I'm not heavily invested in the present API; I like it, but the API should match what exists in other µPy modules. I would, however, only like to change it once, so let's hammer this out. I'll take on the work of making the API whatever is decided upon, but the API shouldn't make some use-cases too onerous to implement. I do feel that removing callbacks makes the device less-friendly for multitasking. My own use case involves the "main" task doing sensor reads or other non BLE stuff, and relies heavily on the BT callbacks. What about using |
@chrismas9 I draw the line where I think functionality is commonly grouped amongst microcontrollers. The intent is to make it easier to understand the functionality available on a particular port. I would split Ethernet and Wifi myself since boards may offer one or the other. However, if there are higher level TCP classes for example, I'd separate out the shared functionality too. I think its fine to have many, smaller modules. It makes it clearer what functionality code uses and reduces memory usage when the modules actually need to be loaded in. (
|
Right now, WiFi is started when you |
esp32/bluetooth_docs.md: All properties now functions
Is the bluetooth implemented in the oficial firmware (esp32-20170716-v1.9.1-219-g3580284e.bin) for me to try it ? |
No, just a PR right now, but you can check out the branch the PR is based
on.
…On Jul 16, 2017 11:26, "Gustavo Voltani von Atzingen" < ***@***.***> wrote:
Is the bluetooth implemented in the oficial firmware
(esp32-20170716-v1.9.1-219-g3580284e.bin) for me to try it ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYHCIJmUMI6Xh89tbgg6LnZlSPmLf0Gks5sOlXqgaJpZM4NZmY1>
.
|
@MrSurly any ETA when your bluetooth PR will be merged? |
Since this PR is a bit out of sync with this repository, it took me a long time to get it working. For anybody that wants to try it out, this is how I got it working on a fresh machine:
|
Fix docs > `adv_enable` needs `ble_` prefix Merged, thank you.
@MrSurly Do you think you could upload the current version of the firmware to somewhere? I would be interested in testing the bluetooth implementation, but haven't the time to set up the development environment. Thanks. |
I put a release here, buuuut ... this is very alpha. https://github.com/MrSurly/micropython-esp32/releases/tag/dev-bluetooth-A1 |
@MrSurly |
Since this looks the most attractive high level BLE API I've found I think I'll be implementing a complex(for me) prototype using this, my first dig in micropython and been 7 years i've touched a python code, hope I can provide useful feedback. I too think bluetooth deserves to live outside the network module, and use network maybe for tcp over bluetooth. Maybe someday I get confident enough to try some PRs Beautiful work btw 👍 |
The IDF implementation has changed considerably. Closing this, will submit a new PR when new code is ready. |
It's not perfect, but it's working pretty well for me.
API docs are here: https://github.com/MrSurly/micropython-esp32/blob/dev-bluetooth/esp32/bluetooth_docs.md
Merge Checklist:
Should do:
Maybe:
network.Bluetooth
to top-level modulebluetooth
bluepy
API as closely as possible-- or --
service.start()
andservice.stop()
becomeservice.listen()
andservice.unlisten()
(?)select
interface for services (or should this be at the characteristic / descriptor level)