-
Notifications
You must be signed in to change notification settings - Fork 5
core: Reconsider PROP_MAC_SCAN_STATE behavior #4
Comments
Other changes include: * PROP_POWER_STATE is now always required, with CAP_POWER_STATE indicating if it can be written to. * PROP_MAC_SCAN_STATE: SCAN_STATE_DISCOVER is marked as deprecated. Will add new property for this. See #4 for more details. * Elaborated on purpose of PROP_MAC_DATA_POLL_PERIOD.
Discover scan provides additional capabilities and level of control. For example, for discover scan, it's possible to request for "joiner" only, or enable/disable EUI64 filtering and/or PANID filtering. I think it'd be good and useful to keep the different scan types clearly distinct. In the existing model, there are a bunch of properties that together determine the scan behavior: user needs to set
If we are considering (possibly compatibility breaking) changes to spinel, I would like that that we consider maybe changing this model. My suggestion is to define scan operation as (one or more) spinel command(s) which would then expect a bunch of input arguments (maybe in one or more struct) to control the behavior.
Different scan types can be defined as different commands which makes them distinct (or they can be the same command with a type argument - I prefer former). We can keep the Thoughts? |
My big concern is that we've taken the "default" way to discover nearby networks and replaced it with a thread-specific mechanism.
It is fundamentally still a scan for nearby networks. We are also currently not exposing all of those additional capabilities, so I'm not sure how that helps the case for keeping them separate.
Separate properties for different attributes is a fundamental design decision for Spinel. Doing this helps keep things portable and flexible for the future.
Aren't we already do this with everything?
The user isn't setting these properties, software is. If a property was set, it means the software was aware of it. If software is setting it (changing the value to something other than the reset value), it can also set it back. Software doesn't forget to do things, humans do. That being said, we could certainly take a step back and try to re-think things.
You keep implying that a beacon scan and a discovery scan are somehow fundamentally different, but are they not both as mechanisms to find nearby networks? That one sends out 802.15.4 beacon requests and the other sends out a Thread-specific MLE request seems like an implementation detail that the user of this interface shouldn't have to worry about. My original point was that we should be doing discovery scans by default. But doing scans for all networks that can return beacons is useful during forming (although it is a capability we don't expose) and so I proposed adding an (optional) property for that. Knowing nothing about the Thread specialization for Spinel, it should be possible for me to successfully perform a scan for nearby networks. What that scan looks like under the hood isn't a huge concern, it just aught to get the job done in a reasonable way. This whole conversation seems familiar. How are we currently specifying those fields you are referring to? |
We actually expose/support all discovery scan capabilities through spinel and they are also supported in
These are all set for a discovery scan from wpantund SpinelNCPTaskScan.cpp On the spinel property model for different attributes, I do like it and think it works well in a lot of cases and for controlling network behavior. But for scan operation I sort of feel it may not fit what we would ideally want. Most of other properties/attributes mirror some state/info stored the OpenThread core, so typically we just set/get it directly through an OT API. For scan we need to store the parameters in I am fine with discovery scan being the default type of scan, but may driver/wpantund layer can make that selection. My key point is that at spinel/NCP level, the host/driver is expected to provide/set more attributes for discovery scan compared to a 15.4 beacon scan (e.g., discover MLE scan requires the OT thread interface to be up so if we are offline, |
Originally, we only had three values for
PROP_MAC_SCAN_STATE
:SCAN_STATE_IDLE
: No scanning is going onSCAN_STATE_BEACON
: Scanning for networksSCAN_STATE_ENERGY
: Scanning for channel energyHowever, the
SCAN_STATE_DISCOVER
was added in an ill-advised attempt at supporting traditional 802.15.4 beacon scans as well as the new Thread-specific discovery scans. This is confounding to the user. Which one should they use?I propose we eliminate
SCAN_STATE_DISCOVER
entirely, and add an entirely new propertyPROP_MAC_SCAN_ONLY_COMPATIBLE
, which would default to true. On a thread device, if this property is true, then doing a beacon scan would actually do a Thread discovery scan. If set to false, it would perform a standard 802.15.4 scan, presumably also returning the results from incompatible networks (to avoid conflicts).Thoughts?
The text was updated successfully, but these errors were encountered: