CC3000 First Time Configuration
From Texas Instruments Embedded Processors Wiki
The purpose of this wiki is to provide background on the “First Time Configuration” process for CC3000 based devices
Contents
|
Overview
Associating a WiFi enabled device with an Access Point is usually a simple process. The process usually relies on a user selecting the AP to which the device should connect. This simple scenario is invariably complicated by the limited Input and Output present in devices being increasingly enabled with WiFi. These devices are expected to be embedded in a wide variety of applications where displays and a keyboards are not likely to be present. Although it is possible to fix the parameters used for association, such as the AP's name, this introduces several other issues that are not acceptable in many applications.
First Time Configuration is a unique CC3000 feature that leverages the standard mechanisms present in WiFi to configure a CC3000's association information on the fly, regardless of whether any I/O is available. In First Time Config, a WiFi enabled device such as a mobile phone or a laptop is used to send the association information to the CC3000. The network configuration information is transported in an Ad-Hoc Beacon or Probe Request packet that is received by CC3000 device in a first-time configuration state.
Benefits
- Uses WiFi’s standard mechanisms – no special software support or devices required
- Does not depend on the Host Microcontroller's I/O capabilities, thereby usable by deeply embedded applications
- Can be used to associate multiple devices together to same AP at the same time
The Simple Configuration Process
As previously shown, the simple configuration process enables associating a CC3000 device with an Access point. This is done using the following process:
- The CC3000 is placed in Simple Configuration mode and begins looking for beacons or probes
- An external device is configured to send probes(universally supported) or beacons(supported by Access Points and soft Access Point devices)
- The CC3000 receives the probe or beacon and interprets it.
After the CC3000 successfully inteprets the probe or beacon, it creates a profile in the EEPROM which will be used to connect to the access point. From this point, the CC3000 is enabled to automatically manage the connection with the AP and it is no longer necessary to perform first time config or request that the CC3000 connect, unless the details of the connection have changed (such as passphrase, security type or AP name).
Starting the First Time Configuration Process
In order to perform the first time config procedure, the CC3000 must enter that mode. In this section it is assumed that the first-time configuration process can be triggered externally on the CC3000 device. For example, a user may press a button to initiate the process. The configuration process is initiated by an API which commands the CC3000 to enter the First Time Configuration mode. When the configuration process is triggered, the CC3000 device performs the following:
- Enters the Factory Reset state and scans for the SSID of beacons and probes starting with the 3-character vendor prefix configured by the device vendor in EEPROM or the wlan_smart_config_set_prefix API call. This prefix can be changed in the application. Both the prefix sent by the Phone or other WiFi device, as well as the prefix used by the CC3000 must match.
- When a Probe or a Beacon with the vendor prefix is found and contains the association information, the CC3000 generates a SIMPLE_CONFIG_DONE asynchronous event and uses the first-time configuration structure received in the SSID to generate the profile describing the target AP. The following figure shows this process as seen by the Host MCU and CC3000 device itself:
First Time Config Probe and Beacon Definition
A device such as a mobile phone or tablet used for performing a first time Configuration needs to be configured to connect to an AP with a specially crafted SSID. This SSID includes the name of the SSID to which we want the CC3000 to connect, as well as information about security options such as security type and key.
An ad hoc beacon/probe request conveys AP information and is broadcast over the air. The CC3000 device is configured to detect a packet (beacon or probe) with a specific prefix and, on detection, to extract the information required to connect to the target AP. Figure 2 shows a First-time configuration packet structure:
| Field Name | Field Length (Bytes or Characters) |
Field Description
|
|---|---|---|
| Vendor Prefix | 3 bytes | Identifies the CC3000 device vendor. Programmed into CC3000 EEPROM. Published by Device vendor in the Quick Setup Guide |
| SSID LEN | 1 byte | SSID Length in Hex format. Values from 1 (1 Character) to F (15 Characters) |
| SSID | | A string of length SSID_LEN which incorporates the SSID of the destination AP. |
| Security Type | 1 byte | Connection Security type: None (0), WEP (1), WPA (2), WPA2 (3) |
| Security Key | | Security Key as ASCII characters in the format defined by Security Type |
The combination of SSID and Security Key (if required) cannot exceed 27 characters.
| In the following sections, the prefix "TTT" is used. Please note that this is the default prefix in some Demo Applications. In other Demo applications, the prefix "PDE" is used. |
The prefix is an option that is configured in the application code using a Host Driver API. The CC3000 uses this prefix when searching for the First Time Configuration packet. The prefix
used when sending probes, as well as the prefix configured in the application that is used by the CC3000, must match for the First Time Configuration procedure to work.
Example- Associating CC3000 to AP with No Security
An example SSID used for first-time configuration is:
TTT5Demo10
The SSID will be interpreted by the CC3000 device as follows:
- TTT: Prefix. The CC3000 device will looks for a beacon starting with TTT indicating Texas Instruments
- 5: SSID length of 0x05 characters
- Demo1: Name of the SSID to which we want the CC3000 to connect
- 0: Security type - No Security
- No security key is needed.
If "TTT5Demo10" is used as the AP to which we want to connect, and the CC3000 is in First time config mode and receives the probe requests, it will attempt to connect to the AP called Demo1.
Example- Associating CC3000 to AP with WEP Security
An example SSID used for first-time configuration is:
TTT5Demo111234567890
The SSID will be interpreted by the CC3000 device as follows:
- TTT: Prefix. The CC3000 device will looks for a beacon starting with TTT indicating Texas Instruments
- 5: SSID length of 0x05 characters
- Demo1: Name of the SSID to which we want the CC3000 to connect
- 1: Security type (WEP)
- 1234567890- The WEP security key (no white spaces are allowed following the Security type field).
If "TTT5Demo111234567890" is used as the AP to which we want to connect, and the CC3000 is in First time config mode and receives the probe requests, it will attempt to connect to the AP called Demo1 using WEP and 1234567890 as the passphrase.
Example- Associating CC3000 to AP with WPA Security
An example SSID used for first-time configuration is:
TTT5Demo12testtest
The SSID will be interpreted by the CC3000 device as follows:
- TTT: Prefix. The CC3000 device will looks for a beacon starting with TTT indicating Texas Instruments
- 5: SSID length of 0x05 characters
- Demo1: Name of the SSID to which we want the CC3000 to connect
- 2: Security type (WPA)
- testtest - The WPA security key (no white spaces are allowed following the Security type field).
If "TTT5Demo12testtest" is used as the AP to which we want to connect, and the CC3000 is in First time config mode and receives the probe requests, it will attempt to connect to the AP called Demo1 using WPA and testtest as the passphrase.
Example- Associating CC3000 to AP with WPA2 Security
An example SSID used for first-time configuration is:
TTT5Demo13testtest
The SSID will be interpreted by the CC3000 device as follows:
- TTT: Prefix. The CC3000 device will looks for a beacon starting with TTT indicating Texas Instruments
- 5: SSID length of 0x05 characters
- Demo1: Name of the SSID to which we want the CC3000 to connect
- 3: Security type (WPA2)
- testtest - The WPA2 security key (no white spaces are allowed following the Security type field).
If "TTT5Demo12testtest" is used as the AP to which we want to connect, and the CC3000 is in First time config mode and receives the probe requests, it will attempt to connect to the AP called Demo1 using WPA and testtest as the passphrase.
Examples using Laptops/Smart Phones
The First Time config process is supported by all WiFi enabled devices. Some of these devices include:
- WiFi Enabled Laptops
- WiFi enabled Mobile devices such as iPhone, Blackberry and Android
Please note that the CC3000 is in First Time Configuration mode before sending the probe requests using any of the methods outlined in the next sections or the process will not complete successfully.
Probe requests in WiFi enabled devices are usually sent every 5-6 seconds, with each device acting differently. Because the CC3000 cannot assume the channel on which
these probe requests are sent, it must scan all channels and, due to relative few transmissions of probe requests, might miss them. Therefore, it is possible for the process of
sending probe requests (as shown in the sections below) to be repeated until the CC3000 successfully performs the FIrst Time Configuration
Using a Smart Phone for First Time Configuration
The following sections show how to generate probe requests using various mobile devices. Please ensure that the CC3000 is in first-time configuration mode
before you begin.
iPhone
|
Enter Settings -> Wi-Fi Networks and select Other.. . |
Enter the Simple Config information in the Name field,
ensuring that Security is set to none (this field is not used even when security is enabled in the AP). Press Join to initiate the Simple Config Process. |
| |
Blackberry
The following pictures depict using a Blackberry device to connect a CC3000 to an AP with the name "DemoAP":
| Enter the Simple Config information in the SSID field and select next | Select Save and Connect to begin the Simple Configuration process | The Blackberry is sending probe Requests to the CC3000 |
|
The Blackberry will alert that it has failed to connect to the | | |
Android
The following pictures depict using an Android device to connect a CC3000 to an AP with the name "DemoAP":
| Enter Settings | Select Wireless Networks | Select Wi-Fi Settings | ||
| Scroll to the bottom of the menu
| Enter Add Wi-Fi Network
| Enter the Simple Configuration information in the Network SSID field and select Save
| | |
The CC3x Config Tool is an Android application that automates the First Time Config process. This link here describes how to operate the application.
Using a Laptop
Configuring Laptop to broadcast Probe Request
This section describes an example of how to configure a laptop to broadcast a probe request with the defined structure.
Disconnecting from all networks
Before actually performing the First Time Configuration, the wireless interface needs to be disconnected from any
network. This can be done by pressing on the wireless configuration in the taskbar and double clicking on the currently
connected network's name. Windows will disconnect from that network and place it in manual mode. This needs to be performed for
each network that the computer is connected or will connect until the wireless interface is not connected to any of them.
Win XP
Add Network
From the Preferred networks area of the Wireless Network Connection 2 Properties dialog box, click Add (see Figure 19).The Windows network properties dialog box appears with the Association tab displayed (see Figure 20):
- In the Network name (SSID) field, type the SSID as required by the first-time configuration.
- Click to check the box to connect even if this network is not broadcasting.
- In the Network Authentification field, select Open.
- In the Data Encryption field, select Disabled.
- Click OK.
A dialog box appears to notify you that security encyption is disabled for the network (see Figure 21). Click Continue Anyway.
Removing networks to which Windows Might Connect
It is important to remove any wireless networks to which we are currently connected or that we might connect to from the list. This is because Windows will automatically attempt to connect to them if it is able to see them instead of sending the probe request. For example, if your wireless interface is currently connected to a network called "Demo1" you will need to remove this network from the list. Please ensure you can later restore it.
Trigger Probe Transmission on Laptop
| |
Right-click the Wireless Network icon on the laptop to display the menu and click Repair (see Figure 22).
The operation triggers the generation of a probe request which will be received by the CC3000
Win 7
Add Network
Go to “Network and Sharing Center” and choose “Setup a Connection or Network” :Choose “Manually connect to a wireless network” :
Fill in the SSID information as required for FTC, and choose “No authentication (open)” as the “Security Type”:
Return to “Network and Sharing Center” and choose “Manage Wireless Networks”.
Choose the SSID that was added, press the right mouse button, then choose “Properties”.
Check the “Connect even if the network is not broadcasting its name (SSID)” checkbox :
Disable networks to which Windows Might Connect
In “Manage wireless networks” please ensure that the new SSID is in the top of the list. It can be done by the help of 'Move Up' button.
Trigger Probe Transmission on Laptop
Return to “Network and Sharing Center” and choose “Connect to a network”, then choose the SSID that was added by right clicking it and then choose 'connect'.
Using Beacons
Besides Probes, it is also possible to use beacons to perform a First Time Configuration. For information please see the CC3000 First Time Configuration using Beacons Wiki
Because of the speed at which beacons are sent (100ms in most cases), they enable a faster First Time Configuration process.
Related Documents
- CC3000 Host Driver API document
- CC3000 Host Driver Overview
Site Map
