You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CYW43439 adapter can have one of three firmwares flashed: bluetooth, wifi and both. The way that the driver package is written at the moment means that the last call to (*cyw43439.Device).Init wins; the returned device from cyw43439.NewPicoWDevice() is local, but shares the backing flashed firmware, resulting in unexpected behaviour. This mixed scope needs some way to be resolved and this would need to happen in the cyw43439 package, but the issue is surfaced here, so this is why I'm raising it here.
ISTM that the best way to do this would be to expose the firmware flash operation in the API and make it so that multiple calls to flash can only succeed if they flash compatible firmware, subsequent valid flash calls would be no-ops. This would allow the client code to flash the desired firmware and then the flash call that come from calling bluetooth.Default.Adapter would either succeed (if the bluetooth or the wifi+bluetooth firmware had already been flashed, or none had been flashed) or fail (if only the wifi firmware had been flashed).
The CYW43439 adapter can have one of three firmwares flashed: bluetooth, wifi and both. The way that the driver package is written at the moment means that the last call to
(*cyw43439.Device).Init
wins; the returned device fromcyw43439.NewPicoWDevice()
is local, but shares the backing flashed firmware, resulting in unexpected behaviour. This mixed scope needs some way to be resolved and this would need to happen in the cyw43439 package, but the issue is surfaced here, so this is why I'm raising it here.ISTM that the best way to do this would be to expose the firmware flash operation in the API and make it so that multiple calls to flash can only succeed if they flash compatible firmware, subsequent valid flash calls would be no-ops. This would allow the client code to flash the desired firmware and then the flash call that come from calling
bluetooth.Default.Adapter
would either succeed (if the bluetooth or the wifi+bluetooth firmware had already been flashed, or none had been flashed) or fail (if only the wifi firmware had been flashed)./cc @soypat
The text was updated successfully, but these errors were encountered: