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

Restore the default WICED country to Japan #1014

Merged
merged 1 commit into from
Jun 25, 2016

Conversation

monkbroc
Copy link
Member

@monkbroc monkbroc commented Jun 1, 2016

Proposal to make the WiFi country behavior backwards compatible with previous firmware versions.

For the country code, we can leave the default country code sent to WICED as JP2 (used in firmware <= 0.5.0). If someone explicitly sets the country code in the Particle DCT section, then we send that to WICED and if that country is Japan we decrease the power.

<0.5.1 to 0.5.2 (upgrade)

Behavior Particle DCT country returned WICED DCT country as write WICED DCT country WiFi NVRAM image
Default behavior blank JP2 JP2 full power
Japan JP2 JP2 JP2 reduced power
Other country (for example, UK) GB0 GB0 GB0 full power
Other country (for example, USA) US4 US4 US4 full power

0.5.1 to 0.5.2 (upgrade)

Behavior Particle DCT country returned WICED DCT country as write WICED DCT country WiFi NVRAM image
Default behavior blank JP2 JP2 (dct will have previously contained GB0) full power
Japan JP2 JP2 JP2 reduced power
Other country (for example, UK) GB0 GB0 GB0 full power
Other country (for example, USA) US4 US4 US4 full power

0.5.2 to 0.5.0 (downgrade)

Behavior Particle DCT country (ignored) returned WICED DCT country as write WICED DCT country WiFi NVRAM image
Default behavior n/a JP2 JP2 full power

0.5.2 to 0.5.1 (downgrade)

Behavior Particle DCT country returned WICED DCT country as write WICED DCT country WiFi NVRAM image
Default behavior blank JP2 GB0 (dct will have previously contained JP2) full power
Japan JP2 JP2 JP2 reduced power
Other country (for example, UK) GB0 GB0 GB0 full power
Other country (for example, USA) US4 US4 US4 full power

This would also solve the credentials loss during downgrade, unless the user explicitly sets anything other than JP2,0x00, or 0xff ( such as GB0 or US4).


Doneness:

  • Contributor has signed CLA
  • Problem and Solution clearly stated
  • Code peer reviewed
  • API tests compiled
  • Run unit/integration/application tests on device
  • Add documentation
  • Add to CHANGELOG.md after merging (add links to docs and issues)

@andyw-lala
Copy link
Contributor

Doesn't Japan have an extra channel, when compared to the US ?

You may need to ensure that the device never transmits outside the US band
when it shouldn't (e.g. AP mode).

On Wed, Jun 1, 2016 at 10:01 AM, Julien Vanier [email protected]
wrote:

Proposal to make the WiFi country behavior backwards compatible with
previous firmware versions.

For the country code, we can leave the default country code sent to WICED
as JP2 (used in firmware <= 0.5.0). If someone explicitly sets the country
code in the Particle DCT section, then we send that to WICED and if that
country is Japan we decrease the power.
Behavior Particle DCT country WICED DCT country WiFi NVRAM image
Default behavior blank JP2 full power
Japan JP2 JP2 reduced power
Other country (for example, UK) UK UK full power

This would also solve the credentials loss during downgrade

Doneness:

  • Contributor has signed CLA
  • Problem and Solution clearly stated
  • Code peer reviewed
  • API tests compiled
  • Run unit/integration/application tests on device
  • Add documentation
  • Add to CHANGELOG.md after merging (add links to docs and issues)

You can view, comment on, or merge this pull request online at:

#1014
Commit Summary

  • Restore the default WICED country to Japan

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1014, or mute the thread
https://github.com/notifications/unsubscribe/ADv7QOHDZU_EFcBr9aeddCIpcc7jtFrWks5qHZ6_gaJpZM4IrpPN
.

Andy

@monkbroc
Copy link
Member Author

monkbroc commented Jun 1, 2016

I'll need to have someone else weigh in on the regional differences in WiFi. My intent here was to bring the default behavior back to the same one as previous firmware versions.

One thing that could help would be asking the country where the device will be used during setup (mobile and CLI) to ensure development kits don't transmit outside the allowed range.

@andyw-lala
Copy link
Contributor

It may be that the WICED behaviour is designed to be the most restrictive -
to ensure that without intervention power levels are the lowest constraint
and channel selections are limited to those common across all
implementations. Or it could just be that they picked a default and used
it, expecting the device to be configured correctly before deployment...

On Wed, Jun 1, 2016 at 1:07 PM, Julien Vanier [email protected]
wrote:

I'll need to have someone else weigh in on the regional differences in
WiFi. My intent here was to bring the default behavior back to the same one
as previous firmware versions.

One thing that could help would be asking the country where the device
will be used during setup (mobile and CLI) to ensure development kits don't
transmit outside the allowed range.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1014 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ADv7QMjWS1StMZ_8PCnVVDGXDzg2XXH8ks5qHcpegaJpZM4IrpPN
.

Andy

@monkbroc monkbroc force-pushed the feature/country-japan-default branch from f080f42 to bf7a49b Compare June 1, 2016 20:26
@m-mcgowan
Copy link
Contributor

I propose a new default country code that is safe. The code will be 'AAA' for access all areas.

  • the STA mode will be able to access a router on all channels - 1-14.
  • in AP mode, it will be conservative and only start on channels 1-11.

If the user then actually sets a real country code for the wifi setup, then it will use the channels available to that country. E.g. JP2 will select channels 1-14 for both STA and AP mode. Selecting US will use only channels 1-11 for both modes.

The rationale behind the new 'AAA' country is that it is backwards compatible with the previous behavior.

@monkbroc
Copy link
Member Author

monkbroc commented Jun 4, 2016

Can you clarify Mat? We now have 2 country codes: the Particle DCT country code and the WICED DCT country code. Which one would be set to AAA and what would be the impact?

@m-mcgowan
Copy link
Contributor

m-mcgowan commented Jun 4, 2016

Sure - I was writing on a noisy train so possibly not expressing myself clearly as I'd like.

On re-reading your proposal, it makes a lot of sense, and solves all the issues at hand. (and essentially codifies the AAA mode I had in mind, so our thoughts are two sides of the same coin!)

The only fly in the ointment will come when we expose AP mode and then we have to distinguish between a "real" setting of JP2 and a default setting, and for the default setting, restrict the channels that can be assigned to the AP mode.

@monkbroc
Copy link
Member Author

monkbroc commented Jun 5, 2016

The only fly in the ointment will come when we expose AP mode and then we have to distinguish between a "real" setting of JP2 and a default setting, and for the default setting, restrict the channels that can be assigned to the AP mode.

True that. Maybe we can defer the default WICED country code change to a later version where the changes of someone downgrading a remote device from say 1.0.0 to 0.5.0 is less likely.

@m-mcgowan m-mcgowan added this to the 0.5.2 milestone Jun 8, 2016
@technobly technobly self-assigned this Jun 15, 2016
@technobly technobly merged commit bf7a49b into develop Jun 25, 2016
@technobly technobly removed their assignment Jun 25, 2016
@technobly technobly deleted the feature/country-japan-default branch October 27, 2016 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants