This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3220SF: Country code in production vs runtime

Part Number: CC3220SF
Other Parts Discussed in Thread: UNIFLASH, CC3235SF, CC3235S, CC3135, CC3200STK-WIFIMK

We plan to use a CC3220MODSF in our devices that will be used world wide. 

I have seen in the docs that the Country code (EU, US, JP) can be set both runtime and in the image created by Uniflash.

  1. I assume that if we set it runtime, we would only need a single image for all supported regions. If we only set it with Uniflash during production, would we be required to create separate images for each region?
  2. Can the Country code be automatically set? E.g. Based on the Access point or similar?
  3. Is it required to set the correct Country code before launching a Soft AP?

  • Hi,

    1. If you have a method to dynamically identify and update the country code (using the run-time API) you can use one image. In such case, the Uniflash will set default country code that you will need to update later. Otherwise, you will need to use one image per region.

    2. This is not supported by the CC3220 NWP, but you can implement this in your application (you can read the country code of nearby APs with sl_WlanGetExtNetworkList).

    3. Yes

    Br,

    Kobi

  • 2. Are you sure we can implement this on the CC3220 application using sl_WlanGetExtNetworkList? According to swru455j [1], Table A-1. Host APIs, it says sl_WlanGetExtNetworkList (CC313x and CC323x only)

    [1] http://www.ti.com/lit/ug/swru455j/swru455j.pdf

  • Unfortunately, you are right. the API is not supported on CC3220.

    You can enable the transceiver mode to get the beacons of local routers. You will need to parse the beacons to get the Country Code IE.  

    Br,

    Kobi

  • I noticed in Appendix C of Programmer's Guide (swru455j) that there is a World wide country code "00". Is it correct that it can only be used for CC3135, CC3235S, and CC3235SF? Or can it also be used for the CC3220?

  • The "00" is the least common denominator – its contains all channels classified according to what the device can do on that channels when the country code is unknown (max Tx power for dynamic scan and passive scan for all the rest).

    The idea is that using this country code you can develop a scan that provides you the actual country you are in (which can only be possible with CC3235). The intention is that the system will not stay in this mode but switch to the actual country code. The CC3x35 can run a scan with this country code on all channels and by getting the results, the host can check what the published country code of each AP is, and then choose his country code based on that.

    Br,

    Kobi

  • Hi,

    Sorry to butt in on 's thread, but I'm in the same boat: a CC3220MODASF being used in a product to ship in at least North America, Europe, Africa, and Australasia. Most of the time the product will be a WLAN station, but it will sometimes be an AP so an app can provide configuration data over the WLAN.

    Within SWRU455J 2020-02...

    • 4.3.2 says EU is default in station mode.
    • 4.4.2 says EU, channel 6, is default in AP mode.
    • Page 49 can be read as CC3220 may only set EU, JP, or US as CC when a station.
    • Page 59 is more clear that CC3220 supports only those three codes as an AP.

    Empirically, I find that only EU, US, and JP may be set as the country code. None of the others in Appendix C, including 00 for worldwide, are accepted.

    Of the three codes, EU and JP allow channels 1-13 for both station and AP, but US limits channels to 1-11 for both station and AP.

    Is my understanding correct...

    The LaunchPad ships with EU set because as a station it will not transmit on a channel without first passively detecting it has traffic, e.g. a beacon from the local APs? Whether the CC3220 is asked to connect to a particular SSID, or if it's asked to scan for SSIDs, they're both done passively, by which I mean without TXing on a channel without first RXing on it, thus the EU's range of 1-13 for a station doesn't violate the US's 1-11 subset until a packet is RX'd on 12-13 which has been TX'd by another?

    As an AP, using EU is okay as the channel defaults to 6 and again this means no TX will occur on channels 12-13. As long as the user isn't allowed to change the AP channel to 12 or 13 the fact the country code for a US product is EU which defines AP range as 1-13 doesn't matter as 12-13 won't be used.

    It follows that a shipped product can employ the same logic and just stick with CC=EU, AP_channel<=11?

    Are there other 2.4 GHz criteria which must vary by country other than channel number? Linux has the its CRDA database of per-country restrictions which includes things like the maximum EIRP, Equivalent Isotropically Radiated Power, and the maximum antenna gain. https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/tree/db.txt?id=HEAD

    Does the CC3220 offer adjustment of extra parameters which must take into account per-country regulatory limits?

    Thanks, Ralph.

  • Hi Ralph,

    The country code defines the available channels and the TX power restrictions.

    For CC3220 the CRDA equivalent is hard-coded and you can only set the master power (offset from the MAX power).

    With CC3235, you much more contol (through uniflash, i.e. for production phase) on setting restrictions on the power per channel.

    For the station, basically you are right - there shouldn't be an issue for a station.

    For AP, if you use channel 1-11, you can work in each of the regions as long as the power constraint are met. 

    The FCC set some rules for taking reg-domain decisions (e.g. you should hear at least 3 AP, etc). 

    Br,

    Kobi 

  • Does this mean that it is possible to have "multi region" WiFi by:

    1. Setting country code = EU (or US)
    2. Reduce master power to lowest allowed in X countries
    3. Only enable allowed channels in X countries

    And this would be allowed for both STA and AP?

    It may give degraded performance in certain countries?

    I am not familiar with CRDA.

    We are using CC3220.

  • Hi Kobi,

    A bit of research makes me think EU and JP limit maximum TX power for the CC3220's 2.4 GHz to 100 mW = 20 dBm whereas the US is 1 W = 30 dBm. Does this mean the maximum TX power of 30 dBm would only be achieved if the country code was US? Or does 802.11 apply limits which are under the US's maximum and would kick in first, e.g. b = 18 dBm, g/n = 20 dBm?

    SWRU455J 2020-02 page 49 has the Tx Output Power v. Tx Power Setting chart. 1DSSS would be 802.11b? 54OFDM is 802.11g? What's 60FDM? 1DSSS starts at 18, is that the 18 dBm which I think is 802.11b's limit?

    Does max power, SL_WLAN_GENERAL_PARAM_OPT_STA_TX_POWER = 0, vary by EU/JP/US so I should try and set it correctly to benefit in non-EU codes?

    Those FCC rules you mention sound interesting. Have you anything further on it I could search for?

    Page 80 says a connection scan is active, not passive. The next page the default channel mask is 0x1fff (1-13). Is that default channel mask clipped to 1-11 when the country code is US? Otherwise, probes will be sent on 12 and 13. I don't see how a CC3220 station with CC EU can connect to a given SSID: if the mask misses out 12-13 then the EU AP on 12 won't be found, and if the mask scans 1-13 then 12-13 will be probed in the US?

    Thanks, Ralph.

  • Hi jonarnp,

    No. Let we assump usage of STA mode:

    • Device in ETSI (EU) country with set country code US. In case access point/router will use channels 12 or 13, your device will not be able connect to this access point/router => fail of your product
    • Device in USA (FCC regulatory) with set country code EU. Device will do active scan at channels at 12, 13 and this is not allowed. In case customer will have access point/router with wrong country code (allowed channels 12, 13) your device will be able to connect to this access point/router and this will be violating of law. Not properly set external device can no cause violating law by your device at particular regulatory domain.

    You can set country code to EU and limit channels (e.g. 12, 13) by scan mask, but there is not any benefit in comparison of set proper country code.

    Jan

  • Hi Jan,

    My reading about the scan masks meant I was just coming to that conclusion about a station myself.

    So when fresh out of the box and wanting to be an AP for configuration, setting CC=EU or CC=JP with channel from 1-11 would be okay as those two are very similar in frequencies and the same maximum TX power according to CRDA. And it would also be compliant in the US because channels 12-13 aren't used and the US has a higher maximum TX power.

    As an AP, the CC3220 can be told by a WLAN app about the environment, including what CC to use. It then sets CC to EU, JP, or US before becoming a station.

    Does that sound like a compliant plan to avoid factory configuration of the destination CC?

    This still leaves places like Australia where maximum TX power is 36 dBm, but I guess that just can't be achieved with this device. It either can't be told to do it, or the hardware may be incapable anyway. https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/tree/db.txt#n126

    Thanks, Ralph.

  • Hi Ralph,

    > So when fresh out of the box and wanting to be an AP for configuration, setting CC=EU or CC=JP with channel from 1-11 would be okay as those two are very similar in frequencies and the same maximum TX power according to CRDA. And it would also be compliant in the US because channels 12-13 aren't used and the US has a higher maximum TX power.

    Yes, but this is not 100% correct. Because you will need to set mask for scan channels or disable background scanning by the scan policy. Because you should not forgot to channel scanning at background.

    > As an AP, the CC3220 can be told by a WLAN app about the environment, including what CC to use. It then sets CC to EU, JP, or US before becoming a station.

    I am not sure about your question. But if you want to set from country code from your GUI when CC3220 is running at AP mode, there is no technical problem. But I am not sure about legal aspects. I think there are come countries where is prohibited to be able set country code by end user. Also there can be issue if your device is battery power and can be hold at hand. Because you will need to deal with SAR. And this can be pretty tricky. For example I remember issue CC3200STK-WIFIMK where even TI designers had issue with SAR and FCC certification.

    If you want to detect country code automatically you will need to use transitive mode and create some kind of network canning algorithm by yourself. But I am not sure how much this can be hard...

    > Does that sound like a compliant plan to avoid factory configuration of the destination CC?

    You should to discuss this with your test house. Because you will need to do separate certification for some countries and this can be pretty expensive.

    Jan

  • Hi Jan,

    > Yes, but this is not 100% correct. Because you will need to set mask for scan channels or disable background scanning by the scan policy. Because you should not forgot to channel scanning at background.

    Hmm, out of the box the device will know it has no user-AP configured and thus shouldn't attempt to become a station. Table B-1 says SL_WLAN_POLICY_SCAN is system persistent and sl_WlanPolicySet() can be passed it and SL_WLAN_DISABLE_SCAN=0 so I would hope no PHY TX will occur until I start the AP on a 1-11 channel. Presumably, I can check this by putting a nearby WLAN interface into monitor mode and looking for packets with the CC3220's MAC address, e.g. with Wireshark.

    > But if you want to set from country code from your GUI when CC3220 is running at AP mode, there is no technical problem. But I am not sure about legal aspects. I think there are come countries where is prohibited to be able set country code by end user.

    Yes, I see your point. I was thinking the custom app on a consumer device is in prior contact with the cloud server before switching to the CC3220's AP and could learn the country that way, e.g. through GeoIP. The user configuring the country in their cloud account wouldn't help because it's still indirectly allowing the user to choose EU/JP/US.

    > Also there can be issue if your device is battery power and can be hold at hand. Because you will need to deal with SAR. And this can be pretty tricky.

    Thanks, https://en.wikipedia.org/wiki/Specific_absorption_rate is a new TLA to me. :-) It's a battery powered device, but not one the user is intended to carry or hold in normal operation. More like move it to the desired location and then leave as the CC3220 is monitoring the environment. The user may decide to stay in the proximity, of course.

    I'm aware of TI's PDF SWRU512, 2017-08, ‘CC3220MODASx SimpleLink Wi-Fi and IoT Solution with MCU LaunchPad Hardware User's Guide’ which talks about the FCC approval TI have already obtained for the CC3220 in this module form as long as it's a 'mobile', not 'portable', device. I'm hoping this will be sufficient for the product, and one of the attractions of the CC3220MODASF.

    I really don't fancy switching to Transceiver mode and observing packets as a vote on country code. :-)  A scan of SSIDs here shows mainly UK with one DE!

    Thanks again, Ralph.

  • Hi Ralph,

    By disabling background WLAN scan this should be fine, I think.

    I think your approach with reading country code from cloud sounds reasonable. I think this should be relatively bulletproof concept.

    btw ... comment to module with integrated antenna. It is nice idea to have module with integrated antenna, but depending on construction of your device, it can get worse RF performance in comparison module without integrated antenna. In case of using module without antenna (using SMD or some flexible antenna), you can properly tune your RF circuits to your device design (e.g. enclosure). But with MODA it is not possible. This is nice video where is described way is important to properly tune your antenna at radio devices.

    Jan

  • Hi Jan, Thanks for considering it, and for the antenna-design video. Cheers, Ralph.