Skip to content

Commit

Permalink
add first draft of the bluetooth feature. swtiching between wifi and …
Browse files Browse the repository at this point in the history
…bt is done via wifiEnabled flag and reboot
  • Loading branch information
grch87 committed Jan 12, 2021
1 parent f1883f7 commit af71640
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 308 deletions.
14 changes: 7 additions & 7 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lib_deps_external =
ESP Async WebServer
https://github.com/me-no-dev/AsyncTCP
https://github.com/bblanchon/ArduinoJson.git
; https://github.com/pschatzmann/ESP32-A2DP.git
https://github.com/pschatzmann/ESP32-A2DP.git

[env:common]
platform = espressif32
Expand All @@ -36,7 +36,7 @@ platform = espressif32
board = esp-wrover-kit
framework = arduino
monitor_speed = 115200
board_build.partitions = no_ota.csv
board_build.partitions = huge_app.csv
build_flags = -DHAL=2
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
Expand All @@ -52,7 +52,7 @@ platform = espressif32
board = lolin32
framework = arduino
monitor_speed = 115200
board_build.partitions = no_ota.csv
board_build.partitions = huge_app.csv
lib_deps =
${common.lib_deps_builtin}
${common.lib_deps_external}
Expand All @@ -68,7 +68,7 @@ platform = espressif32
board = lolin_d32
framework = arduino
monitor_speed = 115200
board_build.partitions = no_ota.csv
board_build.partitions = huge_app.csv
lib_deps =
${common.lib_deps_builtin}
${common.lib_deps_external}
Expand All @@ -84,7 +84,7 @@ platform = espressif32
board = lolin_d32_pro
framework = arduino
monitor_speed = 115200
board_build.partitions = no_ota.csv
board_build.partitions = huge_app.csv
lib_deps =
${common.lib_deps_builtin}
${common.lib_deps_external}
Expand All @@ -102,7 +102,7 @@ platform = espressif32
board = nodemcu-32s
framework = arduino
monitor_speed = 115200
board_build.partitions = no_ota.csv
board_build.partitions = huge_app.csv
lib_deps =
${common.lib_deps_builtin}
${common.lib_deps_external}
Expand All @@ -118,7 +118,7 @@ platform = espressif32
board = az-delivery-devkit-v4
framework = arduino
monitor_speed = 115200
board_build.partitions = no_ota.csv
board_build.partitions = huge_app.csv
lib_deps =
${common.lib_deps_builtin}
${common.lib_deps_external}
Expand Down
Loading

2 comments on commit af71640

@biologist79
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got a question: saw you added request->send_P(200, "text/html", management_HTML, templateProcessor);=> so have you been able to serve the big mgmt-html-file (including your filebrowser) via flash?
However, thanks for your contribution. I'm lagging a bit at the moment regarding pull request - sorry :-)

Got a suggestion regarding toggling between BT and WiFi/audio: what about using a modification-card? So default would be Wifi/audio (or maybe default via GUI). But as you apply such a mod-card, it's toggled to BT. When I got you right, reboot isn't necessary to toggle, right?

@grch87
Copy link
Owner Author

@grch87 grch87 commented on af71640 Jan 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I tried to directly branch this feature from your master. I'm still a git noob, something might gone wrong. However, the html bug is now fixed and commited in my master.
And this shouldn't be a pull request for your master. It should only show, that bluetooth support is possible and how it can maybe achieved.

Nevertheless, if I have time, I can create a proper pull request with a "proper" implementation.
Regarding to the implemtation questions:
Yes, a modification card to toggle between the modes makes sense. But in a first step I would do the reboot. The reboot is quite fast. Without reboot you have to assure that all memory is released from the previous mode. With all these library dependencies it is hard to guarantee, that all libraries are freeing their memory properly.
Apart from the modification card it is maybe as well an option to switch into Bluetooth Mode, when a button is pressed during power on?

Please sign in to comment.