TIDUE59A May   2018  – September 2020

 

  1.   Description
  2.   Resources
  3.   Features
  4.   Applications
  5. 1System Description
    1. 1.1 Key System Specifications
  6. 2System Overview
    1. 2.1 Block Diagram
    2. 2.2 Design Considerations
    3. 2.3 Highlighted Products
      1. 2.3.1 CC3220
      2. 2.3.2 CC2640R2F
      3. 2.3.3 DRV8837
    4. 2.4 System Design Theory
      1. 2.4.1 CC3220S to CC2640R2F Interface
      2. 2.4.2 CC3220S to DRV8837 Interface
      3. 2.4.3 Software Architecture
      4. 2.4.4 Network Connection Management
      5. 2.4.5 Provisioning
        1. 2.4.5.1 AP Provisioning and SmartConfig™
        2. 2.4.5.2 Wi-Fi Provisioning Over BLE
      6. 2.4.6 Sending and Receiving Messages Through Cloud
        1. 2.4.6.1 Message Queue Telemetry Transport Protocol
        2. 2.4.6.2 MQTT Client Implementation
      7. 2.4.7 Over-the-Air Updates
        1. 2.4.7.1 HyperText Transfer Protocol
      8. 2.4.8 Security Enablers
        1. 2.4.8.1 Secure Boot
        2. 2.4.8.2 Secure Sockets
          1. 2.4.8.2.1 Hardware Accelerators
          2. 2.4.8.2.2 Simple Network Time Protocol
        3. 2.4.8.3 File System Security
          1. 2.4.8.3.1 Failsafe Files and Bundle Protection
      9. 2.4.9 Low-Power Consumption
  7. 3Hardware, Software, Testing Requirements, and Test Results
    1. 3.1 Required Hardware and Software
      1. 3.1.1 Hardware
        1. 3.1.1.1 CC3220S LaunchPad™ Development Kit
        2. 3.1.1.2 CC2640R2F LaunchPad™ Development Kit
        3. 3.1.1.3 Sensor BoosterPack™ Connections (BMI160)
        4. 3.1.1.4 DRV8837EVM Modifications and Connections
        5. 3.1.1.5 Assembling EVMs
      2. 3.1.2 Software
        1. 3.1.2.1 Getting Started With Software
          1. 3.1.2.1.1 Build simple_np Application and Flash CC2640R2F
          2. 3.1.2.1.2 Use Premade UniFlash ImageCreator Project
          3. 3.1.2.1.3 Importing Project Source Files Into CCS
        2. 3.1.2.2 User Files
        3. 3.1.2.3 Run Wi-Fi® Doorlock Demo
          1. 3.1.2.3.1 Connect CC3220 to Network
          2. 3.1.2.3.2 Networking Functions
            1. 3.1.2.3.2.1 Get Current Date and Time (SNTP)
            2. 3.1.2.3.2.2 Send and Receive Messages (MQTT)
            3. 3.1.2.3.2.3 Perform Software Update Using Dropbox (OTA Update)
    2. 3.2 Testing and Results
      1. 3.2.1 Pass or Fail Tests
      2. 3.2.2 Power Measurements
      3. 3.2.3 Test Setup
        1. 3.2.3.1 CC3220S
        2. 3.2.3.2 CC2640R2F
        3. 3.2.3.3 DRV8837
      4. 3.2.4 Test Results
      5. 3.2.5 Battery Life Estimate
  8. 4Design Files
  9. 5Software Files
  10. 6Related Documentation
    1. 6.1 Trademarks
  11. 7Terminology
  12. 8About the Author
  13. 9Revision History
Connect CC3220 to Network

When the example is run out-of-the-box, the example starts by first executing the provisioning process. BLE provisioning starts automatically, but the system can be switched to AP provisioning or SmartConfig by holding the switch on the right side of the CC3220S LaunchPad for 3 seconds.

  • To provision the device using BLE provisioning, first download the SimpleLink SDK Explorer mobile application for Android or iOS. Then follow the instructions in the README.html for the ble_wifi_provisioning example of the SimpleLink SDK Bluetooth Plugin.
  • To provision the device using AP provisioning or SmartConfig, download SimpleLink Starter Pro mobile application for Android or iOS. Then follow the instructions in the mobile application or see the instructions in Task 3 of the SimpleLink Academy Training for Wi-Fi Provisioning.

Note:

AP provisioning for the Wi-Fi doorlock demo has one main difference from the SimpleLink Academy training – the SimpleLink AP is password protected. When prompted by SimpleLink Starter Pro, enter 1234567890 as the security key, to connect to the mysimplelink-xxxxxx device. The default password (1234567890) is only intended to keep the demo simple and must be changed when implementing a real application to maintain security.

Multiple print statements are made to the terminal during provisioning. The device prints when a new profile is added, a successful connection to the AP is made, an IP address is acquired, and when the mobile device used to provision the CC3220 confirms that provisioning succeeded.

Note:

A default confirmation method is built into the AP provisioning and SmartConfig process, but the message can be changed by the developer for the final design. If a confirmation message is not received during AP provisioning or SmartConfig (even though the terminal shows that a profile was added and the device connects to the AP), the profile is still valid and stored on the device. Resetting the CC3220S-LaunchPad causes the application to restart and the device to attempt to connect to the stored profile.

The first time BLE provisioning is run, the mobile device used to provision the TIDC-01005 system must pair with the system using BLE secure-simple pairing. When the mobile device first connects to the TIDC-01005 system over BLE, the device prompts the user to enter a key. The key needed to pair with the system is displayed in the terminal application running on the PC, as shown in Figure 3-9. Successfully entering the key allows the two devices to pair.

GUID-21AFBF30-0BC0-4F6A-B3EF-A6F76242E4EF-low.gifFigure 3-9 BLE Secure-Simple Pairing Key Displayed in PC Terminal

When paired, the user must enter the AP credentials in the SimpleLink SDK Explorer mobile application (see Figure 3-10) and then press the Provision button to send them to the system over BLE.

GUID-49B53809-57A4-4436-B630-8116A761A640-low.gifFigure 3-10 SimpleLink™ SDK Explorer GUI For BLE Provisioning

When the credentials are successfully written, the CC3220S MCU reads them from the CC2640R2 over the NPI and tests the connection. If the connection succeeds and confirmation is successfully provided to the user, a profile is added to the CC3220S file system and used for the remainder of the application.

The CC3220S automatically connects to a profile on the file system for all subsequent restarts of the application.