craggmire 1 Posted October 15, 2014 Share Posted October 15, 2014 The CC3200 stopped connecting to an Access Point (AP) after working fine for a while. It transpired that he SSID had been configured for channel 13 which is beyond the CC3200's range (1 to 11) . Some APs can now be configured to look for the channel with least interference so this may prove an intermittent issue if it decides on 12 or 13. Quote Link to post Share on other sites
pabigot 355 Posted October 15, 2014 Share Posted October 15, 2014 Note that channels 12-14 are not legal for full-power use in North America, so depending on your location the fault may be in the configuration of your AP. (I haven't unboxed my CC3200, but I'd be pretty surprised if it couldn't handle at least channels 12 and 13, but not surprised if its default configuration excludes them.) spirilis and abecedarian 2 Quote Link to post Share on other sites
spirilis 1,265 Posted October 15, 2014 Share Posted October 15, 2014 I do know there is some API for setting the regulatory compliance country code in the SimpleLink API. See SWRU368 (no version specified), page 136 - http://ti.com/lit/swru368 sl_WlanSet - Enables the user the configure different WLAN related parameters. The main parameters used are ConfigID and ConfigOpt. The possible ConfigID and ConfigOpt combinations are: * SL_WLAN_CFG_GENERAL_PARAM_ID - The different general WLAN parameters are: - WLAN_GENERAL_PARAM_OPT_COUNTRY_CODE - WLAN_GENERAL_PARAM_OPT_STA_TX_POWER - Sets STA mode Tx power level, a number from 0 to 15, as the dB offset from max power (0 will set maximum power) - WLAN_GENERAL_PARAM_OPT_AP_TX_POWER - Sets AP mode Tx power level, a number from 0 to 15, as the dB offset from max power (0 will set maximum power) There are equivalent config ID's for AP mode and P2P mode for setting country code/regulatory crap. The argument to this country code is a buffer of two bytes, and I think it is just 2 ASCII characters, e.g. 'U' and 'S' for US. That's an assumption based on the help text for "WLAN_AP_OPT_CHANNEL" right above it. Likewise, CC31xx Host Documentation - http://software-dl.ti.com/ecs/cc31xx/APIs/public/cc31xx_simplelink/latest/html/index.html - look at the WLAN section, help for sl_WlanSet function. Quote Link to post Share on other sites
energia 484 Posted October 15, 2014 Share Posted October 15, 2014 A list of country codes can be found here: http://www.cisco.com/en/US/products/ps6305/products_configuration_guide_chapter09186a00804ddd8a.html Not sure if country code can be set after WiFi.begin(...) but you can give it a try. Put this right after your WiFi.begin(..). uint8_t country[] = "CN"; sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, WLAN_GENERAL_PARAM_OPT_COUNTRY_CODE, 2, country); CN is for China and that regulatory domain allows channel 1-13. Make sure that you replace the country code with the appropriate country code you intend to run the CC3200 LaunchPad. Quote Link to post Share on other sites
energia 484 Posted October 15, 2014 Share Posted October 15, 2014 I think it would be good to add an API to Energia that allows to set the regulatory domain. WiFi.setCountryCode() perhaps or even extend WiFi.begin() with an additional optional parameter specifying the country code? Quote Link to post Share on other sites
spirilis 1,265 Posted October 15, 2014 Share Posted October 15, 2014 @@energia Yeah should be doable. Just not sure where in the whole process you are supposed to set it, but the SDK examples should shed some light on that. Sent from my Galaxy Note II with Tapatalk 4 Quote Link to post Share on other sites
SixSixSevenSeven 23 Posted October 15, 2014 Share Posted October 15, 2014 The CC3200 stopped connecting to an Access Point (AP) after working fine for a while. It transpired that he SSID had been configured for channel 13 which is beyond the CC3200's range (1 to 11) . Some APs can now be configured to look for the channel with least interference so this may prove an intermittent issue if it decides on 12 or 13. Shouldnt be using 12 or 13 in the UK (not that any body is going to know). Quote Link to post Share on other sites
pabigot 355 Posted October 15, 2014 Share Posted October 15, 2014 Shouldnt be using 12 or 13 in the UK (not that any body is going to know). Although sources(1,2) conflict, IEEE Std 802.11-2012 annex D "Regulatory References" and Table E-2 "Operating classes in Europe" strongly suggests that the UK falls under ECC/ETSI/CEPT's regulatory domain and does permit use of channels 1 through 13 in the 2.4 GHz ISM band for Wi-Fi. That may not have been the case at the time of the 2006 reference Cisco cites. Quote Link to post Share on other sites
spirilis 1,265 Posted October 16, 2014 Share Posted October 16, 2014 Playing with sl_WlanGet(), looks like it is just a 2-character ASCII pair: sl_WlanGet(WLAN_GENERAL_PARAM_OPT_COUNTRY_CODE) return value = -2001 ConfigOpt = 9 Return data length = 2 Country code: US (Not exactly sure why sl_WlanGet returns -2001, as it's supposed to be 0 for success and -1 for error, but obviously it seems to work.) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.