Espressif ESP32 User Manual

Espressif ESP32 User Manual

Bluetooth networking
Hide thumbs Also See for ESP32:

Advertisement

ESP32 Bluetooth Networking
User Guide
Version 1.1
Espressif Systems
Copyright © 2019

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Espressif ESP32

  • Page 1 ESP32 Bluetooth Networking User Guide Version 1.1 Espressif Systems Copyright © 2019...
  • Page 2 About This Guide This document provides a guide to using ESP32 in Bluetooth networking for IoT devices with examples. Release Note Date Version Release notes 2017.03 V1.0 First release. 2019.05 V1.1 Update figures. Documentation Change Notification Espressif provides email notifications to keep customers updated on changes to technical documentation.
  • Page 3: Table Of Contents

    2.2. APIs on ESP32 End ........................2.3. APIs on the EspBlufi APK End ....................3. ESP32 Bluetooth Networking Examples ................3.1. Hardware and Software Preparation ..................3.2. Setting ESP32 to Station Mode ....................3.3. Setting ESP32 as a SoftAP ......................
  • Page 4: Introduction

    1. Introduction Introduction 1.1. Overview The ESP32, as a single 2.4 GHz Wi-Fi and Bluetooth combo chip, supports Wi-Fi setups via both SmartConfig and Bluetooth. Users can use ESP32 for secure configuration of Wi- Fi networking for IoT devices. Using Bluetooth for configuring Wi-Fi network presents the following advantages: The Bluetooth protocol is open and scalable.
  • Page 5 The Configure button will be shown in the interface and click this button. • Figure 1-2. CONFIGURE Button Configure the length of BLE mtu, BLE device filtering, and check the version of the app • and Blufi repository. Figure 1-3. CONFIGURE Interface
 Espressif ! /! 2 13 2019.05...
  • Page 6: Apis For Networking Development

    In the program of ESP32, security-related processes such as key establishment are determined and developed by the users. The app sends the “negotiate data” to ESP32 and the data packets will be sent to the application layer. If the data is not handled by the application layer, DH algorithm provided by BluFi can be used to exchange the key.
  • Page 7: Apis On The Espblufi Apk End

    • Source code of EspBlufi for Android: https://github.com/EspressifApp/ EspBlufiForAndroid • Documentation of EspBlufi for Android: https://github.com/EspressifApp/ EspBlufiForAndroid/blob/master/doc/ Introduction_to_the_EspBlufi_API_Interface_for_Android__cn.md • Source code of EspBlufi for iOS: https://github.com/EspressifApp/EspBlufiForiOS • Documentation of EspBlufi for iOS: https://github.com/EspressifApp/EspBlufiForiOS/ blob/master/doc/Blufi_APP_API_for_iOS_CN.md Espressif ! /! 4 13 2019.05...
  • Page 8: Esp32 Bluetooth Networking Examples

    Examples 3.1. Hardware and Software Preparation • 1 × ESP32 module 1 × PC, connected to the module to supply power and print log for ESP32. • 1 × smartphone (Android 4.3 or above) • Download and install EspBlufi on the smartphone. Turn on the Wi-Fi and Bluetooth •...
  • Page 9 3. ESP32 Bluetooth Networking Examples Click on the ESP32 device in the interface as Figure 3-1 shows, and click Connect button ! to establish Bluetooth connection to it. Successful connection will yield the interface shown in Figure 3-2. Figure 3-2. Interface Showing Successful Connection Meanwhile, the following log will be output to the serial port tool: ��...
  • Page 10 3. ESP32 Bluetooth Networking Examples Figure 3-3. Network Configuration Interface 5. Select the device mode from the dropdown menu, as Figure 3-4 shows. (BluFi networking supports the following three modes: Station, SoftAP, and Station+SoftAP.) Figure 3-4. Selecting Device Mode Espressif ! /! 7 13 2019.05...
  • Page 11 3. ESP32 Bluetooth Networking Examples 6. Select Station mode as an instance, click on the refresh button ! , and choose the Wi- FI SSID. Then, enter the password. Figure 3-5. Configuring the Station Mode 7. Click on the ! button to complete the configuration.
  • Page 12: Setting Esp32 As A Softap

    Meanwhile, the following log will be output to the serial port tool: 3.3. Setting ESP32 as a SoftAP 1. Power up the module. Connect the EspBlufi app to ESP32 via Bluetooth. Set the device mode as SoftAP in the network configuration interface, as Figure 3-7 shows. For details of doing so, please refer to Steps 1 to 4 in Section 3.2.
  • Page 13 3. ESP32 Bluetooth Networking Examples Figure 3-8. Configuring the SoftAP Mode 3. Success of the SoftAP configuration will lead to the interface as Figure 3-9 shows. The current Wi-Fi mode and the connection status are shown in the interface. Figure 3-9. SoftAP Connection Information...
  • Page 14 4. Turn on the smartphone’s Wi-Fi capability. The SoftAP connected can be found in the WLAN interface, as Figure 3-10 shows. Figure 3-10. The Configured ESP32 SoftAP 5. Connect the smartphone to the ESP32 SoftAP. As shown in Figure 3-11, the prompt will appear, indicating that the Wi-Fi is connected.
  • Page 15 Figure 3-11. Wi Fi Connection Prompt Meanwhile, the following log will be output to the serial port tool: The ESP32 device is successfully connected to Wi-Fi via Bluetooth networking. �� Note: All values of connection time shown on the EspBlufi app screenshots in this document are provided only as examples.
  • Page 16 The Wi-Fi Alliance Member logo is a trademark of the Wi-Fi Alliance. The Bluetooth logo is a registered trademark of Bluetooth SIG. All trade names, trademarks and registered trademarks mentioned in this document are Espressif IoT Team property of their respective owners, and are hereby acknowledged. Copyright © 2019 Espressif Inc. All rights reserved. www.espressif.com...

Table of Contents

Save PDF