Code Monkey home page Code Monkey logo

esp32_ble_ota's Introduction

BLE OTA Ready ESP Project + Python Client Code

This project contains OTA update capabilities via BLE implemented using the NimBLE stack and a Python-based client code using the Bleak library.

References

The ESP code is based on the official example provided by Espressif:

The Python client code is implemented using Bleak:

License

http://www.apache.org/licenses/LICENSE-2.0

Blog Post

The concept behind this project is fully explained in the following blog post:

esp32_ble_ota's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

esp32_ble_ota's Issues

Python script not working

I am trying to test this but the python code doesn't write the characteristics of the esp. And the execution is stuck at this -
Searching for ESP32...
ESP32 found!
Sending packet size: 253.
Sending OTA request.

Python script error

Hello, I'm trying to run esp32_ble_ota/ble_client/main.py , but getting this error:

File "main.py", line 82
while chunk := file.read(packet_size):
^
SyntaxError: invalid syntax

Python 3.7.3 is installed on my PC.
Please, advice?

unable to change advertised name

Hi Michael,
Thanks for the project, it works pretty well on my side. One thing I am unable to change is the advertised device name, it seems to always defaults to "esp32".
So far I understand to only place to change in your code would be:
static const char device_name[] = "esp32";

Anything I am missing?
Thanks

Revertion to factory after hard reset

Hi Michael,

Great tutorial and example code! It works great and I am able to transfer not only your example, but I am able to transfer my test app. After it completes the transfer, the app reboots as intended and runs my app successfully.

However, after I perform a hard reboot, it reverts back to the factory image. I also transferred the stock hello_world.bin app and that runs as well the first time but then reverts to the factory partition without the hard reset when it calls esp_restart()

When I transfer the esp32_ble_ota.bin app it runs as well. But when I hard reset it, I can no longer talk on the jtag/openocd interface. I was able to transfer a new bin file. Maybe its running out of the ota partition but I cannot be certain. (BTW, I plan to toggle an IO and scope it out to determine what image is actually running I an experiment...)

I starting looking at the reference code and the gatt_svr.c code to see if I can figure out why. I just started, but I thought I would just post an issue to see if you might have run into this or maybe someone else?

Thank you for any info you might have.

Dan

BTW, I am running on an esp32-C3DevKitM-1

Note: I moved to the usb interface and I can confirm that when loading the esp32_ble_ota.bin file the esp32 will use that partition. I assume I must add something to my app to not have it revert to the factory image....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.