micropython icon indicating copy to clipboard operation
micropython copied to clipboard

OnBluetoothDisconnected event in radio module

Open niutech opened this issue 5 years ago • 2 comments

MakeCode for Micro:bit supports the OnBluetoothDisconnected event. Can the same be supported in Radio module, e.g. radio.on_disconnected(callback)? Thanks!

niutech avatar Mar 30 '20 15:03 niutech

as far as I understand, the radio module does not have the concept of connected or disconnected, but just of on and off.

As far as I understand from the code and the discussion in the pull request introducing the feature MakeCode and MicroPython use different software layers to get Radio working (MakeCode uses the DAL while MicroPython does not), so I would expect different features to be available in those two...

kopp avatar Mar 30 '20 21:03 kopp

The radio module doesn't use a pairing/bonding mechanism like Bluetooth does. Additionally, I don't see the underlying implementation using an auto-ACK feature, so there is no way to know if there is a connection at all. If there was an auto-ACK feature, it would negate using the term "group", since 1 transmission could be acknowledged by only 1 receiver.

Simply put, this request cannot be satisfied in any way.

2bndy5 avatar Aug 07 '21 22:08 2bndy5