Live data from Hacker News

Updating STM32 Over-The-Air using ESP32

github.com

51–60 of 63 posts

Re: Updating STM32 Over-The-Air using ESP32

#53

Cool project! If I need physical access to the board, why would I not program it with a physical interface

This project is a part of a commercial usage, where the entire product was located remotely, thus it was not possible to manually flash the STM everytime.

Re: Updating STM32 Over-The-Air using ESP32

#55

Earlier quoted context omitted.

for switching BOOT0, reset etc?

You can automate that using flipflops or maybe MOSFETs.

Not my point though. Use case for over the air update is when one has no access to the device or its debug interfaces. So, the implementation must provide for a way to remotely handle entering programming mode, etc. IMO, the disclaimer section should be a part of the implementation.

Re: Updating STM32 Over-The-Air using ESP32

#56
post #20
post #16

Earlier quoted context omitted.

Just a basic board comparable to the ESP32 modules you can but for DIY stuff

I generally recommend going for the highest-spec board that suits your requirements. The STM32L4+, STM32L5, and STM32H7 are all amazing microcontrollers.

Are any of those available multi-core? It's one thing that's pretty nice on the ESP32, especially for the cost and lack of complexity for simple cases. I couldn't find a similar STM32 part that was relatively cheap, low pin count (eg 48 pin with ethernet Mac support), and had dual core.

Re: Updating STM32 Over-The-Air using ESP32

#57
post #29

Earlier quoted context omitted.

So this is totally off-topic and a bit you are going to think I am very rude for intruding: I was just looking around whether it is possible to create custom apps (on phones) to sync with smart watches (generic ones from places like aliexpress). I have no experience with bluetooth, but is there anything that would prevent you from making something like that? Even if it is just for myself, I don't need to release or a…

There are no hardware obstacles to doing that, and BLE (BT4 and 5) support custom protocols. That said, I think you will find that working with the proprietary operating systems and architectures on watches and phones is much more difficult than you anticipate.

I figured it is most likely too difficult. For the amount of work it would take I could just buy an Apple watch and be done with the privacy concerns I have with cheaper trackers, but once the seed of an idea is planted it starts having a life of its own.

I think this is an idea I shouldn't water though ;).

Re: Updating STM32 Over-The-Air using ESP32

#58

Earlier quoted context omitted.

So this is totally off-topic and a bit you are going to think I am very rude for intruding: I was just looking around whether it is possible to create custom apps (on phones) to sync with smart watches (generic ones from places like aliexpress). I have no experience with bluetooth, but is there anything that would prevent you from making something like that? Even if it is just for myself, I don't need to release or a…

try gadgetbridge, it's an OSS project that already does this for cheap fitness trackers and some watches. https://gadgetbridge.org/

Wow this is amazing! It is exactly what I was looking for except for it being on Android only, but at least I now have a whole code base to learn from. Thanks!

Re: Updating STM32 Over-The-Air using ESP32

#59

Earlier quoted context omitted.

If you're throwing an ESP on there anywhere, wouldn't an I2C or SPI ADC be way cheaper than a whole nother MPU for the same performance?

Actually not that clear cut. You can get a small STM32 with multiple multiplexed 12bit ADC channels, with ~2MSPS sampling speed and 256x hardware oversampling (~16bit), for less than half a buck (per 1000)[1]. Cheapest independent 12bit ADC with >500kSPS I could find on DigiKey were all over a buck (per 1000)[2], and they were all single-channel parts. Now keep in mind that the ADC only does ADC, while the STM32G030…

What're the comparative impacts on battery life of those?

Re: Updating STM32 Over-The-Air using ESP32

#60

Earlier quoted context omitted.

I'm afraid Bluetooth for esp32 hasn't been implemented yet (only WiFi and ESP-Now - patches welcome…). https://api.riot-os.org/group__cpu__esp32.html#esp32_feature... You could do a mesh with ESP-Now and RPL though.

Thank you for the suggestion. Concerning the contribution of code for adding Bluetooth support - if a company would want to allocate some time and a person for this cause, would there be someone who can guide them in the process? Perhaps the challenge could be broken down into smaller components? Assume that you get a rational human being at the input, they know various programming languages (including C and C++), bu…

> if a company would want to allocate some time and a person for this cause, would there be someone who can guide them in the process?

A good first step would probably be to create an issue on the issue tracker, so the relevant people can be informed and you can get some information about what was already tried / what needs to be done. I'd also recommend the IRC/Matrix channel, but the main esp* maintainer (@gschorcht) doesn't hang out there.

> Assume that you get a rational human being at the input, they know various programming languages (including C and C++), but have no experience with RIOT whatsoever - would this work out?

RIOT is a rather simple system IMHO, I found it easy to get into it and the community is pretty helpful. With Bluetooth and esp32 you have picked a pretty hard project to start. The esp32 is notoriously bad documented and Bluetooth is a complex beast on it's own.

Currently Bluetooth is only implemented on nrf51/nrf52 using the NimBLE stack.

To get to know RIOT a bit it's probably good to play around a bit and fix small things that you find are broken / need improving if you notice any.

You probably want to

- install the esp32 toolchain for RIOT: https://doc.riot-os.org/group__cpu__esp32.html#esp32_manual_...

- flash the networking example: make BOARD=esp32-wroom-32 -C examples/gnrc_networking flash term

This will default to esp_now, you'll get a shell can can ping other esps.

- flash the border router example: make BOARD=esp32-wroom-32 -C examples/gnrc_border_router UPLINK=wifi WIFI_SSID=your_ssid WIFI_PASS=secret_password flash term

This should connect to your WiFi and act as a border router to the esp_now network. All your esp_now esps should now be online, given that your WiFi provides an IPv6 connection and DHCPv6.

If you enable the sock_dns module, you should be able to ping hosts on the internet directly by name

Configuration is done through the application Makefile, there is an ongoing effort to move to Kconfig but this is not finished yet.

Post reply on HN