SWRU455M February   2017  – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF

 

  1. Overview
    1. 1.1 Trademarks
  2. Introduction
    1. 1.1 Features
    2. 1.2 Key Features
    3. 1.3 Block Diagram
    4. 1.4 Host Driver Overview
      1. 1.4.1 Host Interface
      2. 1.4.2 OS versus Non-OS
      3. 1.4.3 Quick Reference
      4. 1.4.4 Porting to Different Platforms
    5. 1.5 Acronyms and Terminologies
  3. Networking Application
    1. 2.1 Introduction
      1. 2.1.1 Wi-Fi Connectivity
      2. 2.1.2 Traffic Types
      3. 2.1.3 Security
      4. 2.1.4 User Experience
      5. 2.1.5 Power Consumption
      6. 2.1.6 Provisioning
    2. 2.2 Basic Examples
      1. 2.2.1 Wi-Fi Doorbell
        1. 2.2.1.1 Description
        2. 2.2.1.2 Design Considerations
      2. 2.2.2 Power Socket
        1. 2.2.2.1 Description
        2. 2.2.2.2 Design Constraints
      3. 2.2.3 Wi-Fi Tag
        1. 2.2.3.1 Description
        2. 2.2.3.2 Design Consideration
  4. Device
    1. 3.1  Introduction
    2. 3.2  Key Features
    3. 3.3  Start and Stop
      1. 3.3.1 Start
      2. 3.3.2 Stop
      3. 3.3.3 Hibernate and Shutdown
      4. 3.3.4 Lock State
      5. 3.3.5 Initialization Sequence
    4. 3.4  Host Interface
      1. 3.4.1 SPI Interface
      2. 3.4.2 UART Interface
        1. 3.4.2.1 Change UART Baud Rate
    5. 3.5  Version
    6. 3.6  Event Mask
    7. 3.7  Time and Date
    8. 3.8  MAC Address
    9. 3.9  Device Name
    10. 3.10 Domain Name
    11. 3.11 Device Status
    12. 3.12 Persistent Configuration
    13. 3.13 Device Statistics
    14. 3.14 Errors
  5. WLAN
    1. 4.1  Introduction
    2. 4.2  Key Features
    3. 4.3  Station (STA)
      1. 4.3.1 General Description
      2. 4.3.2 Configurations and Settings
        1. 4.3.2.1 Set Mode
        2. 4.3.2.2 Set General STA Parameters
      3. 4.3.3 Connection
        1. 4.3.3.1 Connection Policies
        2. 4.3.3.2 Preferred Networks (Profiles)
        3. 4.3.3.3 Manual Connection
      4. 4.3.4 Events and Errors
      5. 4.3.5 RSSI Trigger
      6. 4.3.6 Soft-Roaming
      7. 4.3.7 Beacon Interval and DTIM Period
      8. 4.3.8 Agile Multiband
      9. 4.3.9 Triggered Roaming
    4. 4.4  Access Point
      1. 4.4.1 General Description
      2. 4.4.2 Configurations and Settings
        1. 4.4.2.1 Set Mode
        2. 4.4.2.2 Set General AP Parameters
        3. 4.4.2.3 Get General AP Parameters
        4. 4.4.2.4 Black List
      3. 4.4.3 Set Network Configuration
        1. 4.4.3.1 Set AP IP Parameters
      4. 4.4.4 Station Management
        1. 4.4.4.1 Get Connected Stations
        2. 4.4.4.2 Disconnect a Station
      5. 4.4.5 Events and Errors
      6. 4.4.6 Limitations
    5. 4.5  Wi-Fi Direct
      1. 4.5.1 General Description
      2. 4.5.2 Supported Features
      3. 4.5.3 Configurations and Settings
        1. 4.5.3.1 Configuring Wi-Fi Direct General Parameters
        2. 4.5.3.2 Set Wi-Fi Direct Policy
        3. 4.5.3.3 Configure Connection Policy
      4. 4.5.4 Connection
      5. 4.5.5 Events and Errors
      6. 4.5.6 Limitations
    6. 4.6  WLAN Security
      1. 4.6.1 Personal Security
      2. 4.6.2 Enterprise Security
      3. 4.6.3 WPS
    7. 4.7  Scan
      1. 4.7.1 General Description
      2. 4.7.2 Connection Scan
      3. 4.7.3 Configuration (AP/STA)
      4. 4.7.4 Usage
      5. 4.7.5 Miscellaneous
    8. 4.8  Antenna Diversity
      1. 4.8.1 Overview
      2. 4.8.2 Configuration
      3. 4.8.3 Pad Selection
    9. 4.9  Calibrations
      1. 4.9.1 2.4-GHz Wi-Fi Calibration Modes
      2. 4.9.2 5-GHz Wi-Fi Calibration Modes
        1. 4.9.2.1 Serving Channel Calibrations
        2. 4.9.2.2 Non-Serving Channel Calibrations
        3. 4.9.2.3 Storing Calibration Data
        4. 4.9.2.4 Transceiver Socket
    10. 4.10 BLE / 2.4-GHz Radio Coexistence
      1. 4.10.1 Key Features
      2. 4.10.2 Configuration and Settings
      3. 4.10.3 Operation
        1. 4.10.3.1 Calibration
  6. Network Addresses
    1. 5.1 Introduction
    2. 5.2 Key Features
    3. 5.3 Addressing
      1. 5.3.1 IPv4 Addresses
      2. 5.3.2 IPv6 Addresses
        1. 5.3.2.1 Local Link
        2. 5.3.2.2 Link-Global
      3. 5.3.3 DNS Addresses
    4. 5.4 DHCPv4 Client
      1. 5.4.1 Modes
      2. 5.4.2 Address Release
    5. 5.5 DHCPv4 Server
      1. 5.5.1 Enable and Disable the DHCP Server
      2. 5.5.2 Set DHCP Server Parameters
    6. 5.6 DNS Server
    7. 5.7 Errors and Asynchronous Events
  7. Socket
    1. 6.1 Introduction
    2. 6.2 Key Features
    3. 6.3 Socket Types
    4. 6.4 BSD API
    5. 6.5 Socket Working Flow
      1. 6.5.1 TCP
        1. 6.5.1.1 Client Side
        2. 6.5.1.2 Server Side
        3. 6.5.1.3 TCP Keep Alive
      2. 6.5.2 UDP
        1. 6.5.2.1 Multicast
        2. 6.5.2.2 Packet Boundary
      3. 6.5.3 RAW
        1. 6.5.3.1 Layer 4: Transport
        2. 6.5.3.2 Layer 3: Network
        3. 6.5.3.3 Layer 2: Data Link (Transceiver Mode, Not Connected)
      4. 6.5.4 Network Bypass Mode
    6. 6.6 DNS
    7. 6.7 Operation Modes
      1. 6.7.1 Nonblocking Mode
      2. 6.7.2 Trigger Mode
        1. 6.7.2.1 Trigger Mode for Accept
        2. 6.7.2.2 Trigger Mode for Data Reception
      3. 6.7.3 Multiple Select
    8. 6.8 IP Fragmentation
    9. 6.9 Errors
  8. Secure Socket
    1. 7.1 Introduction
    2. 7.2 Key Features
    3. 7.3 Opening a Secure Socket
    4. 7.4 Trusted Root-Certificate Catalog
    5. 7.5 Options and Features Use
      1. 7.5.1 Set TLS Version
      2. 7.5.2 Set Cipher Suites
      3. 7.5.3 Set Certificates, Root CA, Private Key, and DH Files
      4. 7.5.4 Disable the Use of the Trusted Root-Certificate Catalog
      5. 7.5.5 Set ALPN List
        1. 7.5.5.1 ALPN Fixed List
        2. 7.5.5.2 ALPN Generic
      6. 7.5.6 Set Domain Name for Verification and SNI
      7. 7.5.7 Enable OCSP Check
      8. 7.5.8 Upgrade Nonsecured Socket to Secured
      9. 7.5.9 Get Connection Parameters
    6. 7.6 Supported Cryptographic Algorithms
    7. 7.7 Common Errors and Asynchronous Events
      1. 7.7.1 Using Socket Asynchronous Events in TLS
      2. 7.7.2 Common Errors
  9. File System
    1. 8.1  Introduction
    2. 8.2  Key Features
    3. 8.3  File System Characteristics
    4. 8.4  Write a File
      1. 8.4.1 Introduction
      2. 8.4.2 Create a File versus Open for Write
      3. 8.4.3 Create a File
        1. 8.4.3.1 Secure File Creation Notes
        2. 8.4.3.2 Forced Creation Flags
      4. 8.4.4 Open a File for Write
      5. 8.4.5 Write an Opened File
      6. 8.4.6 Close an Opened File (for Write)
      7. 8.4.7 Close an Opened Secure-Signed File (for Write)
    5. 8.5  Read a File
      1. 8.5.1 Open a File for Read
      2. 8.5.2 Read an Opened File
      3. 8.5.3 Close an Opened File (for Read)
    6. 8.6  Delete a File
    7. 8.7  Rename a File
    8. 8.8  File System Helper Functions
      1. 8.8.1 Get File Information
      2. 8.8.2 Get Storage Information
      3. 8.8.3 Get List of Files
    9. 8.9  Bundle Protection
      1. 8.9.1 Bundle File States
      2. 8.9.2 Bundle States
        1. 8.9.2.1 STOPPED
        2. 8.9.2.2 STARTED
        3. 8.9.2.3 PENDING_COMMIT
      3. 8.9.3 Commit a Bundle
      4. 8.9.4 Rollback a Bundle
      5. 8.9.5 Retrieve the Bundle and Files State
      6. 8.9.6 M4 Host Application Bundle Aspects
    10. 8.10 File Commit Feature
      1. 8.10.1 File Commit Process
    11. 8.11 File Rollback Process
    12. 8.12 Programming
      1. 8.12.1 Creation of the Programming Image
        1. 8.12.1.1 Programming Image Types
        2. 8.12.1.2 Program the Device
          1. 8.12.1.2.1 Image Creator Tool (UART) Programming
          2. 8.12.1.2.2 Host Programming
          3. 8.12.1.2.3 External Tool Programming
    13. 8.13 Restore to Factory
      1. 8.13.1 Restore to Factory by the Host
      2. 8.13.2 Restore to Factory by Using the SOP
        1. 8.13.2.1 CC31xx
        2. 8.13.2.2 CC32xx
    14. 8.14 Security Alerts
    15. 8.15 Design Consideration
      1. 8.15.1 Choosing SFLASH Type
      2. 8.15.2 Software Design Consideration
      3. 8.15.3 Retrieving Info Regarding SFLASH Usage
      4. 8.15.4 SFLASH Size
        1. 8.15.4.1 Restore to Factory is Disabled
        2. 8.15.4.2 Restore to Factory is Enabled
      5. 8.15.5 Storage Usage Information
  10. HTTP Server
    1. 9.1 Introduction
      1. 9.1.1 Built-in Configuration Pages
      2. 9.1.2 RESTful APIs
        1. 9.1.2.1 Changing Configuration
        2. 9.1.2.2 Reading Configuration
      3. 9.1.3 Custom Static Pages
        1. 9.1.3.1 Custom Pages With Device Tokens
        2. 9.1.3.2 Static Pages With Host Tokens
      4. 9.1.4 Host Application Interface
    2. 9.2 Key Features
    3. 9.3 Configurations and Settings
    4. 9.4 RESTful API Processing
      1. 9.4.1  Ping
      2. 9.4.2  IP Configuration
      3. 9.4.3  URN Configuration
      4. 9.4.4  WLAN Profiles
      5. 9.4.5  WLAN Scan
      6. 9.4.6  Provisioning Confirmation
      7. 9.4.7  Connection Policy
      8. 9.4.8  Station Action
      9. 9.4.9  AP Black List
      10. 9.4.10 Date and Time
    5. 9.5 Device Parameter Querying Through HTTP (Device Tokens)
      1. 9.5.1  Retrieving Tokens Through GET Request
      2. 9.5.2  Embedded Tokens
      3. 9.5.3  System Information
      4. 9.5.4  Version Information
      5. 9.5.5  Network Information
      6. 9.5.6  Ping Results
      7. 9.5.7  Connection Policy Status
      8. 9.5.8  Provisioning
      9. 9.5.9  Display Profile Information
      10. 9.5.10 P2P Information
      11. 9.5.11 Host Tokens
    6. 9.6 Resource Search Order
      1. 9.6.1 GET Request Search Order
      2. 9.6.2 POST Request Search Order
      3. 9.6.3 PUT and DELETE Request Search Order
    7. 9.7 Host HTTP Requests Processing
      1. 9.7.1 Metadata (TLVs) Description
      2. 9.7.2 GET Processing
        1. 9.7.2.1 Fragmentation
      3. 9.7.3 POST Processing
        1. 9.7.3.1 Long Requests and Delayed Responses
      4. 9.7.4 PUT Processing
      5. 9.7.5 DELETE Processing
    8. 9.8 Security
      1. 9.8.1 Authentication
        1. 9.8.1.1 HTTP Realm
      2. 9.8.2 Secure Connection
    9. 9.9 Processing of Parallel Requests
  11. 10mDNS
    1. 10.1 Introduction
    2. 10.2 Key Features
    3. 10.3 Configurations and Settings
    4. 10.4 Query
      1. 10.4.1 One Shot Query
      2. 10.4.2 Continuous Query
      3. 10.4.3 Mask Services
    5. 10.5 Get Service List
    6. 10.6 Advertisement
      1. 10.6.1 Registering mDNS Services
      2. 10.6.2 Unregistering mDNS Services
      3. 10.6.3 Advertisement Settings
        1. 10.6.3.1 Timing
        2. 10.6.3.2 Update Text
    7. 10.7 Limitations
  12. 11Rx Filters
    1. 11.1 Introduction
    2. 11.2 Matching Process
      1. 11.2.1 Filter Matching
      2. 11.2.2 Tree Traversal
    3. 11.3 Examples of Filter Use
      1. 11.3.1 Example 1
      2. 11.3.2 Example 2
    4. 11.4 Filter Creation
      1. 11.4.1 Filter Type
      2. 11.4.2 Filter Flags
      3. 11.4.3 Rule Structure for Header Filters
        1. 11.4.3.1 Field
        2. 11.4.3.2 Compare Functions
        3. 11.4.3.3 Rule Fields
        4. 11.4.3.4 Pattern-Matching Rule Fields
      4. 11.4.4 Rule Structure for Combined Filters
      5. 11.4.5 Filter Trigger
        1. 11.4.5.1 Parent Filter ID
        2. 11.4.5.2 Connection State and Role
        3. 11.4.5.3 Filter During Transceiver Mode
      6. 11.4.6 Rx Filter Action
        1. 11.4.6.1 Send Events Action
        2. 11.4.6.2 Multiple Bits Set on the Same Event
        3. 11.4.6.3 Multiple Events From the Same Rx Frame
        4. 11.4.6.4 Code Example
        5. 11.4.6.5 Counter Action
    5. 11.5 Managing Filters
      1. 11.5.1 Enable and Disable Filters
      2. 11.5.2 Get Filter Status
      3. 11.5.3 Removing a Filter
      4. 11.5.4 Storing Filters into the SFLASH
      5. 11.5.5 Update Filter Arguments
  13. 12Ping
    1. 12.1 General Description
    2. 12.2 Start and Stop Ping
    3. 12.3 Limitations
  14. 13Transceiver
    1. 13.1 Introduction
    2. 13.2 Key Features
    3. 13.3 Configurations and Setting
      1. 13.3.1 Open Transceiver Socket
      2. 13.3.2 Close Transceiver Socket
      3. 13.3.3 Send Data
      4. 13.3.4 Receive Data
    4. 13.4 Internal Packet Generator
    5. 13.5 CW
    6. 13.6 Changing Socket Properties
      1. 13.6.1 Change Operating Channel
      2. 13.6.2 Change Default PHY Data Rate
      3. 13.6.3 Change Tx Power
      4. 13.6.4 Change Number of Frames to Transmit (Internal Packet Generator)
      5. 13.6.5 Change 802.11b Preamble
      6. 13.6.6 Set CCA Threshold
      7. 13.6.7 Set Tx Frames Time-out
      8. 13.6.8 Enable or Disable Sending ACKs
    7. 13.7 Limitations
  15. 14Real-Time RSSI
    1. 14.1 Introduction
    2. 14.2 Data Structure
    3. 14.3 Configurations and Settings
      1. 14.3.1 Connect to an AP
      2. 14.3.2 Opening Real-Time RSSI Socket
      3. 14.3.3 Example Code
    4. 14.4 Constraints
  16. 15Power Management
    1. 15.1 Introduction
      1. 15.1.1 Key Features
      2. 15.1.2 LPDS
      3. 15.1.3 802.11 Power Save
        1. 15.1.3.1 LSI (Long Sleep Interval)
      4. 15.1.4 WFA IoT Low Power
      5. 15.1.5 Low Power versus Latency
      6. 15.1.6 Power Modes versus Device Modes
    2. 15.2 Configurations and Settings
      1. 15.2.1 Changing Power Policy
      2. 15.2.2 Enabling Fast Connect
    3. 15.3 Network Applications and Power Consumption
      1. 15.3.1 mDNS
      2. 15.3.2 HTTP Server
    4. 15.4 Design Guidelines
      1. 15.4.1 LSI and Packet Loss
      2. 15.4.2 PHY Calibration Mode
  17. 16Provisioning
    1. 16.1  Introduction
    2. 16.2  Key Features
    3. 16.3  Provisioning Process Overview
      1. 16.3.1 Configuring a Profile
      2. 16.3.2 Confirming a Profile
    4. 16.4  Host Provisioning Application Flow
    5. 16.5  Configuration Modes
      1. 16.5.1 AP Provisioning
      2. 16.5.2 SC Provisioning
      3. 16.5.3 AP and SC Provisioning
      4. 16.5.4 AP and SC and External Configuration Provisioning
    6. 16.6  Starting and Stopping the Provisioning Process
    7. 16.7  Auto-Provisioning
    8. 16.8  Delivering Feedback to the User
      1. 16.8.1 External Confirmation
    9. 16.9  External Configuration
    10. 16.10 Common Events and Errors
      1. 16.10.1 Provisioning Status Event
      2. 16.10.2 Provisioning Profile-Added Event
      3. 16.10.3 Reset Request Event
      4. 16.10.4 Errors
      5. 16.10.5 Host Commands During Provisioning
    11. 16.11 Usage Examples
      1. 16.11.1 Successful SmartConfig Provisioning
      2. 16.11.2 Unsuccessful SmartConfig Provisioning
      3. 16.11.3 Successful SmartConfig Provisioning With AP Fallback
      4. 16.11.4 Successful AP Provisioning
      5. 16.11.5 Successful AP Provisioning With Cloud Confirmation
      6. 16.11.6 Using External Configuration Method: WAC
      7. 16.11.7 Successful SmartConfig Provisioning While External Configuration Enabled
  18. 17Crypto Utilities
    1. 17.1 Introduction
      1. 17.1.1 API and Usage
        1. 17.1.1.1 Install and Uninstall Key-Pairs and Certificates
        2. 17.1.1.2 Create or Remove Temporary Key
        3. 17.1.1.3 Get Public Key
        4. 17.1.1.4 Certificate Creation
        5. 17.1.1.5 Sign Buffer
        6. 17.1.1.6 Verify Buffer
        7. 17.1.1.7 True Random Number
      2. 17.1.2 Limitations and Constraints
      3. 17.1.3 Errors
    2. 17.2 Secured Content Delivery
      1. 17.2.1 SimpleLink Wi-Fi Side Process Flow
      2. 17.2.2 Encrypted File Format
  19. 18Hostless Mode
    1. 18.1 Introduction
    2. 18.2 Script Overview
    3. 18.3 Conditions
      1. 18.3.1 Pre-Initialization
      2. 18.3.2 System Event
      3. 18.3.3 Timer Expiration
      4. 18.3.4 Counter Threshold
      5. 18.3.5 Internal Errors
    4. 18.4 Sub-Conditions
    5. 18.5 Actions
      1. 18.5.1 Pre-Initialization Actions
        1. 18.5.1.1 Set Role
        2. 18.5.1.2 Delete All Profiles
        3. 18.5.1.3 Hardware GPIO
      2. 18.5.2 Run-Time Actions
        1. 18.5.2.1 Send Transceiver Packet
        2. 18.5.2.2 Send UDP Packet
        3. 18.5.2.3 Send TCP Packet
        4. 18.5.2.4 Set/Increment Counter
        5. 18.5.2.5 Timer Control
        6. 18.5.2.6 Set GPIO
        7. 18.5.2.7 Enter Hibernate
  20. 19Porting the Host Driver
    1. 19.1 Introduction
    2. 19.2 Create Platform Porting File
    3. 19.3 Select Capabilities Set
    4. 19.4 Bind the Device Enable/Disable Line
    5. 19.5 Implement the Interface Communication Abstract Layer
    6. 19.6 Choose Memory-Management Model
    7. 19.7 Implement OS Adaptation Layer
      1. 19.7.1 Sync Objects
      2. 19.7.2 Locking Objects
    8. 19.8 Implement Timestamp Services
    9. 19.9 Set Asynchronous Event Handler Routines
  21. 20Debug
    1. 20.1 Capture NWP Logs
      1. 20.1.1 Overview
      2. 20.1.2 Instructions
        1. 20.1.2.1 Configuring Pin Mux for CC32xx
        2. 20.1.2.2 Terminal Settings
        3. 20.1.2.3 Run Your Program
        4. 20.1.2.4 Send to TI Engineer
          1.        A Host APIs
            1.         A.1 Host APIs
              1.          B Persistency
                1.           B.1 Persistency
                  1.            C Regulatory Domain
                    1.             C.1 Regulatory Domain
                      1.              D Supported Host Interfaces
                        1.               D.1 SPI Host Interface
                          1.                D.1.1 Introduction
                          2.                D.1.2 Abbreviations
                          3.                D.1.3 SPI Modes
                          4.                D.1.4 SPI Configurations (Shared SPI)
                          5.                D.1.5 SPI Initialization
                          6.                D.1.6 Host Interface Protocol - SPI Perspective
                        2.               D.2 UART Host Interface
                          1.                D.2.1 Introduction
                          2.                D.2.2 Host Low Power Modes
                          3.                D.2.3 UART Host Topologies
                            1.                 D.2.3.1 5-Wire UART Topology
                            2.                 D.2.3.2 4-Wire UART Topology
                            3.                 D.2.3.3 3-Wire UART Topology
                          4.                D.2.4 UART Configuration
                          5.                D.2.5 UART Initialization
                            1.                 D.2.5.1 Changing the UART Baud Rate
                          6.                D.2.6 Implementing the UART Driver - Concept and Terminology
                            1.                 D.2.6.1 UART Read API Implementation
                            2.                 D.2.6.2 UART Write API Implementation
                          7.                D.2.7 Register/Unregister Interrupt Handler API Implementation
                          8.                D.2.8 Host Interface Protocol – UART Perspective
                            1.                 D.2.8.1 UART Host Command Flow
                            2.                 D.2.8.2 Synchronization Words
                              1.                  Revision History

Set Certificates, Root CA, Private Key, and DH Files

Set filenames to be used during the TLS handshake. The files must be programmed to the NWP file system. The files should be in PEM or DER format. The client can successfully connect to a server that does not require client authentication without any files (the server would not be verified, because no root CA is programmed). The server must provide a server certificate during the TLS handshake, and therefore the sl_SetSockOpt command must be used to provide the certificate and private key of the server.

DH files are Diffie Hellman parameters files. These parameter files contain parameters for generating a DH key when using DHE cipher suites in server mode.

In server mode; if there is no DH file, the DH cipher suites are not available, even if a secured mask is used to peek certain cipher suites with DH. If an ECDSA signature is used in the server certificate, the RSA ciphers are not available and vice versa.

Table 7-2 Related Files
FileClientServer
Root CA file
Format: PEM/DER.
The self-signed certificate that signed the other peer chain
Validates the remote peer (the remote server)
If file does not exist, connection success with error SL_ERROR_BSD_ESECSNOVERIFY
Enables client verification when programmed (not mandatory).
If programmed and peer did not send its certificate, a socket asynchronous event is raised with error SL_ERROR_BSD_ESEC_NO_PEER_CERT.
Cert
Format: PEM/DER.
A certificate issued to this peer side.
Client Cert or certificate chain if server requires client authentication. Chain can only be programmed in a PEM format, where the client certificate is the first, followed by all the intermediate CAs.
If file does not exist, and the server requires client authentication, the server returns ALERT of peer verify error in the sl_Connect command.
The user must program private key with this file, or else connection fails with SL_ERROR_BSD_ESECBADPRIVATEFI LE.
Server certificate or certificate chain.
Chain could only be programmed in PEM format. The server cert should be the first in the list.
The file must be configured. If not configured, error SL_ERROR_BSD_ESECBADCERTFILE occurs.
Private Key
Format: PEM/DER.
RSA or ECDSA key.
Client private key if server requires client auth.
The user must program cert with this file, or else connection fails with SL_ERROR_BSD_ESECBADCERTFILE.
The private key of the server.
Must be configured. If not configured, error SL_ERROR_BSD_ESECBADPRIVATEFILE is raised.
DH (server) or PEER Cert (client)
Format: PEM/DER.
Other side certificate or DH parameters.
Configuring this file enables the domain verification by full server cert comparison.
This file is the server expected cert. This is being compared to the server certificate that was received from the server during the handshake phase, to validate that this is truly the domain to connect to (stronger than the domain name verification).
DH file –Diffie Hellman parameters file. Contains parameters for generating DH key when using DHE cipher suites in server mode.
Enables the DH ciphers.

Binding a file to a socket is done using sl_SetSockOpt, before the sl_Connect or sl_Listen commands.

  • SL_SO_SECURE_FILES_PRIVATE_KEY_FILE_NAME
  • SL_SO_SECURE_FILES_CERTIFICATE_FILE_NAME
  • SL_SO_SECURE_FILES_CA_FILE_NAME
  • SL_SO_SECURE_FILES_PEER_CERT_OR_DH_KEY_FILE_NAME

Example:

_i16 status;
status = sl_SetSockOpt(sd,SL_SOL_SOCKET,SL_SO_SECURE_FILES_CA_FILE_NAME,"ca.der",strlen("ca.der"));
Note:

For unique device authentication it is possible to create a unique device key pair with the crypto utils (see Section 18) and use the keys to either create a CSR for external certificate signing or create a self signed certificate. The unique device key is stored on the device's file system as system file and cannot be accessed from the application processor. The unique key path and the certificate path of the created key could be used as the input values for the private key of one of the value in the table above.