tinygo-org / bluetooth

Cross-platform Bluetooth API for Go and TinyGo. Supports Linux, macOS, Windows, and bare metal using Nordic SoftDevice or HCI
https://tinygo.org
Other
764 stars 138 forks source link

enable setting MACAddr for cyw43439 #280

Closed taigrr closed 3 months ago

taigrr commented 4 months ago

cyw43439 boards don't seem to consistently set a MAC address from a seeded value, and always use a hardcoded MACAddr of 43:43:A2:12:1F:AC

Therefore, in order to use two Picos near each other, it's necessary to provide a Set() call for changing the address.

This issue is highlighted by others as well below: https://github.com/raspberrypi/pico-sdk/issues/1323

I initially opened an issue here: https://github.com/soypat/cyw43439/issues/52

However, after implementing it I felt it made more sense to get the code into this repo with build tags.

This change has been tested and validated against my gopher2040-w badges from Gophercon 2024, which use a pico board.

This is my first PR into this repo, so feel free to hit me with style nits or have me change my function names/signatures or just tell me it should go into the other repo.

taigrr commented 4 months ago

cc @soypat @deadprogram @conejoninja

taigrr commented 4 months ago

Thanks @soypat I've responded to each. Let me know which should become changes

deadprogram commented 3 months ago

Seems like all feedback has been addressed :smiling_face_with_tear:

Now merging, thanks @taigrr for the addition and all the reviewers for such great feedback!