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

wifi country #942

Merged
merged 3 commits into from
Apr 28, 2016
Merged

wifi country #942

merged 3 commits into from
Apr 28, 2016

Conversation

m-mcgowan
Copy link
Contributor

@m-mcgowan m-mcgowan commented Apr 7, 2016

adds support for setting the wifi country code. This is used to set the available channels, and in the case of japan, the transmit power.

This changes the default country setting to UK, which gives channels 1-13 (previously the default was japan.) This change is so that the default is still full power.

The country code JP2 can be used to set the region to Japan, with lower transmit power for TELEC conformance.

# set to japan
echo -n "JP2" > jp2
dfu-util -d 2b04:d006 -a 1 -s 1758:leave -D jp2

# set to us
echo -n "US4" > us
dfu-util -d 2b04:d006 -a 1 -s 1758:leave -D us


# reset to default
echo "0: 00000000" | xxd -r > null
dfu-util -d 2b04:d006 -a 1 -s 1758:leave -D null

In theory, the JP2 setting should have 25% less transmit power than the default setting. Looking at the Signal/Noise and SNR on my router, I could see some correlation, although I would welcome further testes to be certain the power level is being altered.


  • Review code
  • Test on device
  • Add documentation (N/A)
  • Add to CHANGELOG.md

…he available channels, and in the case of japan, the transmit power.
@m-mcgowan m-mcgowan added this to the 0.5.1 milestone Apr 27, 2016
@m-mcgowan
Copy link
Contributor Author

OMG, this was meant to be in 0.5.0. Scheduling for 0.5.1 as a bugfix release.

@monkbroc monkbroc self-assigned this Apr 28, 2016
@monkbroc
Copy link
Member

monkbroc commented Apr 28, 2016

Code looks good. I'll flash it and see if I see the transmit power reduction.

@monkbroc
Copy link
Member

I can't really see any difference in the transmit power. My laptop and phone are not able to pick up that kind of difference.

I see 2 areas of the DCT that change when I poke values with DFU. I don't know yet how to decode the DCT so I assume that's correct.

Setting JP2:

08005d70: 4a50 0002 0000 0000 0000 0000 c0ac de1a  JP..............
08006450: ffff ffff ffff ffff ffff 4a50 32ff 0078  ..........JP2..x

Setting US4:

08005d70: 5553 0004 0000 0000 0000 0000 c0ac de1a  US..............
08006450: ffff ffff ffff ffff ffff 5553 34ff 0078  ..........US4..x

Setting erased (all 0xFF):

08005d70: 4742 0000 0000 0000 0000 0000 c0ac de1a  GB..............
08006450: ffff ffff ffff ffff ffff ffff ffff 0078  ...............x

@monkbroc
Copy link
Member

This is ready to merge.

@m-mcgowan m-mcgowan merged commit 36a25ad into develop Apr 28, 2016
@m-mcgowan
Copy link
Contributor Author

Where should the documentation go? It's not really part of our firmware API.

@technobly technobly deleted the feature/wifi_country branch October 27, 2016 17:28
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.

2 participants