CC3000 First Time Configuration

From Texas Instruments Wiki
Jump to: navigation, search
 
The purpose of this wiki is to provide background on the “First Time Configuration” process for CC3000 based devices


Starting from V1.10 service pack, Smartconfig replaces the First Time Configuration.

For additional details: CC3000 SmartConfig Guide


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.

Cc3000 ftc process.PNG


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:

Cc3000 ftc host mcu.PNG


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:


Cc3000 ssid fields.PNG


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.


Exclamation-icon.jpg 

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


Cc3000 ftc iphone2.PNG
Enter Settings ->  Wi-Fi Networks and select Other..
.



Cc3000 ftc iphone3.PNG
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.


Exclamation-icon.jpg It might be necessary to perform the steps several times until the CC3000 indicates it has finished Simple Config

 

Blackberry

The following pictures depict using a Blackberry device to connect a CC3000 to an AP with the name "DemoAP":

Cc3000 ftc blackberry1.PNG
Cc3000 ftc blackberry2.PNG
Cc3000 ftc blackberry3.PNG
Cc3000 ftc blackberry4.PNG
Enter the Simple Config information in the SSID field and select next
Cc3000 ftc blackberry5.PNG
Select Save and Connect to begin the Simple Configuration process
Cc3000 ftc blackberry6.PNG
The Blackberry is sending probe Requests to the CC3000
Cc3000 ftc blackberry7.PNG

The Blackberry will alert that it has failed to connect to the
network, which is correct since the network name does not exist. However it has sent the probe requests. This step will need to be repeated until the CC3000 successfully receives the probe request




Android

The following pictures depict using an Android device to connect a CC3000 to an AP with the name "DemoAP":

Cc3000 android ftc 1.png
Enter Settings

Cc3000 android ftc 2.png
Select Wireless Networks

Cc3000 android ftc 3.png
Select Wi-Fi Settings

Cc3000 android ftc 4.png
Scroll to the bottom of the menu
Cc3000 android ftc 5.png
Enter Add Wi-Fi Network
Cc3000 android ftc 6.png
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).
Cc3000 pc probesimpleconfig1.PNG

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.
Cc3000 pc probesimpleconfig2.PNG


A dialog box appears to notify you that security encyption is disabled for the network (see Figure 21). Click Continue Anyway.
Cc3000 pc probesimpleconfig3.PNG

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
Exclamation-icon.jpg Ensure that the CC3000 device is in a first-time configuration before triggering the laptop to transmit a beacon

Right-click the Wireless Network icon on the laptop to display the menu and click Repair (see Figure 22).

Cc3000 pc probesimpleconfig4.PNG

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” :
NetworkAndSharing.PNG

Choose “Manually connect to a wireless network” :

Manualconnect.PNG

Fill in the SSID information as required for FTC, and choose “No authentication (open)” as the “Security Type”:
Details.PNG

Return to “Network and Sharing Center” and choose “Manage Wireless Networks”.

Networks.PNG

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 :

ConnectEven.PNG

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'.

Connect.PNG

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