Go to file
rgot-org cec3fca4ad Fix BluetoothSerial crash when restart (#3471)
* Update esp32-hal-bt.c

BluetoothSerial crash when restart:  this is because the BT controller remains in state  ESP_BT_CONTROLLER_STATUS_INITED instead of state  ESP_BT_CONTROLLER_STATUS_IDLE after the end() method.
in file esp_bt.h it is specified

> @brief Enable BT controller.
>                Due to a known issue, you cannot call esp_bt_controller_enable() a second time
>                 to change the controller mode dynamically. To change controller mode, call
>                esp_bt_controller_disable() and then call esp_bt_controller_enable() with the new mode.

after **esp_bt_controller_disable()** the controller remains in state INITED so we do call the **esp_bt_controller_deinit()** function to put the controller into state IDLE.

i have modified the **esp32-hal-bt.c** file
line 57 and next
(i have insert the esp_bt_controller_deinit() function so the controller go into Idle state)
```c++
bool btStop(){
    if(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_IDLE){
		log_i("bt stopped");
        return true;
    }
    if(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_ENABLED){
		log_i("bt enabled");
        if (esp_bt_controller_disable()) {
            log_e("BT Disable failed");
            return false;
        }
        while(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_ENABLED);
    }
    if(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_INITED){
		log_i("inited");
		if (esp_bt_controller_deinit()) {
			log_e("BT deint failed");
			return false;
		}
		while (esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_INITED);
        return true;
    }
    log_e("BT Stop failed");
    return false;
}
```

* Update esp32-hal-bt.c

remove while to avoid infinite loop
2019-11-11 18:31:09 +01:00
.github CI can be used on windows desktop with msys 2019-10-02 20:03:43 +03:00
cores/esp32 Fix BluetoothSerial crash when restart (#3471) 2019-11-11 18:31:09 +01:00
docs Docs for lib builder (#3415) 2019-11-11 15:30:52 +01:00
libraries Fixed incorrect usage of xEventGroupWaitBits (#3446) 2019-11-11 17:34:01 +01:00
package Add ARM toolchain 2019-10-01 21:48:03 +03:00
tools Fix CI Builds for Linux (#3313) 2019-10-01 23:13:08 +03:00
variants Added board defintion for VintLabs boards (#3252) 2019-09-24 12:26:15 +03:00
.gitignore Expand gitignore to cover files created by Visual Micro (#2934) 2019-07-09 19:28:04 +03:00
.gitmodules Set ESP-IDF to 3.2 (#2662) 2019-04-12 15:43:53 +02:00
.travis.yml Use Github Actions for release (#3309) 2019-10-01 10:44:04 +03:00
boards.txt Add menu items Partition Scheme and Debug Level for node32s (#3455) 2019-11-11 15:47:26 +01:00
CMakeLists.txt Ignore Werror-maybe-uninitialized from Azure IoT Library (#2824) 2019-06-05 13:42:08 +02:00
component.mk Fix compilation errors when used as IDF component 2019-01-26 21:37:03 +01:00
Kconfig.projbuild Make a selective menuconfig option for FFat (#2966) 2019-07-09 19:14:53 +03:00
LICENSE.md Add LGPL 2.1 License 2019-04-16 03:08:50 +02:00
Makefile.projbuild Remove duplicate ota_data flashing under IDF 2018-08-16 13:34:47 +02:00
package.json Initial version of build script for @PlatformIO; CI integration for Linux, macOS and Windows (#153) 2017-01-28 14:19:56 +02:00
platform.txt Allow sketches to have custom partitions (#3328) 2019-10-07 02:07:15 +03:00
programmers.txt initial import 2016-10-06 07:09:44 -06:00
README.md Update README.md (#3353) 2019-10-14 20:38:04 +03:00

Arduino core for the ESP32

Build Status

Need help or have a question? Join the chat at https://gitter.im/espressif/arduino-esp32

Contents

Development Status

Latest stable release Release Version Release Date Downloads

Latest development release Development Version Development Date Downloads

Installation Instructions

Decoding exceptions

You can use EspExceptionDecoder to get meaningful call trace.

Issue/Bug report template

Before reporting an issue, make sure you've searched for similar one that was already created. Also make sure to go through all the issues labelled as for reference.

Finally, if you are sure no one else had the issue, follow the ISSUE_TEMPLATE while reporting any issue.

ESP32Dev Board PINMAP

Pin Functions

Tip

Sometimes to program ESP32 via serial you must keep GPIO0 LOW during the programming process