BLE to WIFI Gateway

toastedowl
Posts: 8
Joined: Wed Sep 02, 2020 12:25 am

BLE to WIFI Gateway

Postby toastedowl » Wed Sep 02, 2020 12:51 am

Hello,

I am using ESP-IDF v4.1 and want to make a bluetooth to wifi gateway.

The idea is (and what is working so far):
1) Boot and check if provisioned, if not use the built in wifi_prov_mgr in BLE Mode
2) Add up to 10 devices to the whitelist and scan for advertisements
3) Hook up to AWS Iot to publish and subscribe to shadow updates (for config)

My first question:
BLE and WIFI appear to be running on the same core (0) because I added debug statements to the prov and wifi callbacks and included (xPortGetCoreID) Should they be running on the same core? If not, how to change them?

Do you see any issues/limitations if I proceed to:
4) Update the white list on the fly (without resetting) when I get a shadow update
5) Publish ~1K of data to MQTT every minute (aggregate of 1 advertisement for each sensor per minute)
6) Occasionally, every 10-15 minutes connect to one of the sensors and upload about 1K of data and publish it over MQTT

In a nutshell, trying to figure out the right configuration for BLE/Wi-Fi coexistence and get a heads up on any issues I might face if I try to implement the new features (4, 5).

Thanks!

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: BLE to WIFI Gateway

Postby chegewara » Mon Sep 07, 2020 12:03 pm

toastedowl wrote: My first question:
BLE and WIFI appear to be running on the same core (0) because I added debug statements to the prov and wifi callbacks and included (xPortGetCoreID) Should they be running on the same core? If not, how to change them?
Yes, it is good to run both on the same core. Since they are sharing hardware radio there is no reason to run both on separate cores and make it parallel access.
toastedowl wrote: Do you see any issues/limitations if I proceed to:
4) Update the white list on the fly (without resetting) when I get a shadow update
5) Publish ~1K of data to MQTT every minute (aggregate of 1 advertisement for each sensor per minute)
6) Occasionally, every 10-15 minutes connect to one of the sensors and upload about 1K of data and publish it over MQTT
All should be easy doable as long as you wont hit memory shortage issue.

Who is online

Users browsing this forum: Google [Bot] and 117 guests