Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telegesis scan for quietest channel #1009

Closed
triller-telekom opened this issue Mar 20, 2020 · 0 comments · Fixed by #1010
Closed

Telegesis scan for quietest channel #1009

triller-telekom opened this issue Mar 20, 2020 · 0 comments · Fixed by #1010

Comments

@triller-telekom
Copy link
Contributor

Related to #958 I like to propose an implementation for Telegesis similar to #1003 for Ember.

Passing the channel ZigBeeChannel.UNKNOWN to the ZigbeeNetworkManager#setZigBeeChannel() method now triggers a network scan and select the quietest channel.

Since Ember has already a resttriction in place for the 2GHz channels, see

public ZigBeeStatus setZigBeeChannel(ZigBeeChannel channel) {
if (channel != ZigBeeChannel.UNKNOWN && (ZigBeeChannelMask.CHANNEL_MASK_2GHZ & channel.getMask()) == 0) {
logger.debug("Unable to set channel outside of 2.4GHz channels: {}", channel);
return ZigBeeStatus.INVALID_ARGUMENTS;
}
networkParameters.setRadioChannel(channel.getChannel());
return ZigBeeStatus.SUCCESS;
}

I am also doing a scan for the 2Ghz channels only, in the Telegesis implementation.

To be able to implement something like this, I need to get access to the private class ScanResult insideTelegesisEnergyScanCommand. I have changed the code generator to make those classes public in general, but I am not sure if this is a feasible solution.

Also I have fixed an issue in the autocoder that I introduced with #1007. because the "AT" was removed it crashed with an StringIndexOutOfBoundEexception.

triller-telekom added a commit to triller-telekom/com.zsmartsystems.zigbee that referenced this issue Mar 20, 2020
@cdjackson cdjackson added enhancement and removed bug labels Mar 20, 2020
cdjackson pushed a commit that referenced this issue Mar 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants